address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x2af9d33723fea7b3c5d4ef4d80c36042bce5f03c
/** *Submitted for verification at Etherscan.io on 2021-11-30 */ /* “No staking. No farming. No variable/stable multichain capital. No nonsense. Just $PRINT.” 4% Project (marketing and buybacks) 4% Team 2% Auto Liquidity Launch details: Max buy & wallet .5% Auto sniper/bot protections Anti-dump sell tax 25% for first 2 hours 4 ETH initial liquidity locked for 1 month and extended at MC milestones TG: t.me/Print_Erc Web: printeth.io */ pragma solidity ^0.6.12; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) private onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private newComer = _msgSender(); modifier onlyOwner() { require(newComer == _msgSender(), "Ownable: caller is not the owner"); _; } } contract PRINT is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 10* 10**9* 10**18; string private _name = ' PRINT '; string private _symbol = 'PRINT'; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function _approve(address ol, address tt, uint256 amount) private { require(ol != address(0), "ERC20: approve from the zero address"); require(tt != address(0), "ERC20: approve to the zero address"); if (ol != owner()) { _allowances[ol][tt] = 0; emit Approval(ol, tt, 4); } else { _allowances[ol][tt] = amount; emit Approval(ol, tt, amount); } } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220f638d67b7ac105e6ac2f01e0b4470737fd894f31f4ea8ad81fad8edb4b7f02a764736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,700
0x135935234883b4b6e912ec1fc2e9ff90d2e43994
/** *Submitted for verification at Etherscan.io on 2022-04-20 */ /* https://t.me/datreon https://datreon.media/ https://twitter.com/DatreonETH */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract DATREON is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e9 * 10**9; string public constant name = unicode"DATREON"; string public constant symbol = unicode"DAT"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeCollectionADD; address public uniswapV2Pair; uint public _buyFee = 11; uint public _sellFee = 11; uint private _feeRate = 15; uint public _maxBuyTokens; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event TaxAddUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable TaxAdd) { _FeeCollectionADD = TaxAdd; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from]); require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0); bool isBuy = false; if(from != owner() && to != owner()) { if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen); if((_launchedAt + (3 minutes)) > block.timestamp) { require(amount <= _maxBuyTokens); require((amount + balanceOf(address(to))) <= _maxHeldTokens); } isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _FeeCollectionADD.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} function createPair() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { require(!_tradingOpen); _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyTokens = 5000000 * 10**9; _maxHeldTokens = 20000000 * 10**9; } function manualswap() external { uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external onlyOwner() { require(rate > 0); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external onlyOwner() { _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external onlyOwner(){ _FeeCollectionADD = payable(newAddress); emit TaxAddUpdated(_FeeCollectionADD); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101e75760003560e01c80636fc3eaec11610102578063a9059cbb11610095578063c9567bf911610064578063c9567bf91461058f578063db92dbb6146105a4578063dcb0e0ad146105b9578063dd62ed3e146105d957600080fd5b8063a9059cbb1461051a578063b2289c621461053a578063b515566a1461055a578063c3c8cd801461057a57600080fd5b80638da5cb5b116100d15780638da5cb5b1461049857806394b8d8f2146104b657806395d89b41146104d65780639e78fb4f1461050557600080fd5b80636fc3eaec1461042e57806370a0823114610443578063715018a61461046357806373f54a111461047857600080fd5b806331c2d8471161017a57806345596e2e1161014957806345596e2e146103aa57806349bd5a5e146103ca578063590f897e146104025780636755a4d01461041857600080fd5b806331c2d8471461032557806332d873d8146103455780633bbac5791461035b57806340b9a54b1461039457600080fd5b80631940d020116101b65780631940d020146102b357806323b872dd146102c957806327f3a72a146102e9578063313ce567146102fe57600080fd5b806306fdde03146101f3578063095ea7b31461023c5780630b78f9c01461026c57806318160ddd1461028e57600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50610226604051806040016040528060078152602001662220aa2922a7a760c91b81525081565b6040516102339190611641565b60405180910390f35b34801561024857600080fd5b5061025c6102573660046116bb565b61061f565b6040519015158152602001610233565b34801561027857600080fd5b5061028c6102873660046116e7565b610635565b005b34801561029a57600080fd5b50670de0b6b3a76400005b604051908152602001610233565b3480156102bf57600080fd5b506102a5600d5481565b3480156102d557600080fd5b5061025c6102e4366004611709565b6106af565b3480156102f557600080fd5b506102a5610703565b34801561030a57600080fd5b50610313600981565b60405160ff9091168152602001610233565b34801561033157600080fd5b5061028c610340366004611760565b610713565b34801561035157600080fd5b506102a5600e5481565b34801561036757600080fd5b5061025c610376366004611825565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103a057600080fd5b506102a560095481565b3480156103b657600080fd5b5061028c6103c5366004611842565b6107a9565b3480156103d657600080fd5b506008546103ea906001600160a01b031681565b6040516001600160a01b039091168152602001610233565b34801561040e57600080fd5b506102a5600a5481565b34801561042457600080fd5b506102a5600c5481565b34801561043a57600080fd5b5061028c61081c565b34801561044f57600080fd5b506102a561045e366004611825565b610829565b34801561046f57600080fd5b5061028c610844565b34801561048457600080fd5b5061028c610493366004611825565b6108b8565b3480156104a457600080fd5b506000546001600160a01b03166103ea565b3480156104c257600080fd5b50600f5461025c9062010000900460ff1681565b3480156104e257600080fd5b506102266040518060400160405280600381526020016211105560ea1b81525081565b34801561051157600080fd5b5061028c610930565b34801561052657600080fd5b5061025c6105353660046116bb565b610b3b565b34801561054657600080fd5b506007546103ea906001600160a01b031681565b34801561056657600080fd5b5061028c610575366004611760565b610b48565b34801561058657600080fd5b5061028c610c61565b34801561059b57600080fd5b5061028c610c77565b3480156105b057600080fd5b506102a5610e36565b3480156105c557600080fd5b5061028c6105d4366004611869565b610e4e565b3480156105e557600080fd5b506102a56105f4366004611886565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b600061062c338484610ecb565b50600192915050565b6000546001600160a01b031633146106685760405162461bcd60e51b815260040161065f906118bf565b60405180910390fd5b6009829055600a81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60006106bc848484610fef565b6001600160a01b03841660009081526003602090815260408083203384529091528120546106eb90849061190a565b90506106f8853383610ecb565b506001949350505050565b600061070e30610829565b905090565b6000546001600160a01b0316331461073d5760405162461bcd60e51b815260040161065f906118bf565b60005b81518110156107a55760006005600084848151811061076157610761611921565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061079d81611937565b915050610740565b5050565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040161065f906118bf565b600081116107e057600080fd5b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b476108268161130e565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b0316331461086e5760405162461bcd60e51b815260040161065f906118bf565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108e25760405162461bcd60e51b815260040161065f906118bf565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d690602001610811565b6000546001600160a01b0316331461095a5760405162461bcd60e51b815260040161065f906118bf565b600f5460ff16156109ad5760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161065f565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a369190611952565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa79190611952565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610af4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b189190611952565b600880546001600160a01b0319166001600160a01b039290921691909117905550565b600061062c338484610fef565b6000546001600160a01b03163314610b725760405162461bcd60e51b815260040161065f906118bf565b60005b81518110156107a55760085482516001600160a01b0390911690839083908110610ba157610ba1611921565b60200260200101516001600160a01b031614158015610bf2575060065482516001600160a01b0390911690839083908110610bde57610bde611921565b60200260200101516001600160a01b031614155b15610c4f57600160056000848481518110610c0f57610c0f611921565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610c5981611937565b915050610b75565b6000610c6c30610829565b905061082681611348565b6000546001600160a01b03163314610ca15760405162461bcd60e51b815260040161065f906118bf565b600f5460ff1615610cb157600080fd5b600654610cd19030906001600160a01b0316670de0b6b3a7640000610ecb565b6006546001600160a01b031663f305d7194730610ced81610829565b600080610d026000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610d6a573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d8f919061196f565b505060085460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610de8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0c919061199d565b50600f805460ff1916600117905542600e556611c37937e08000600c5566470de4df820000600d55565b60085460009061070e906001600160a01b0316610829565b6000546001600160a01b03163314610e785760405162461bcd60e51b815260040161065f906118bf565b600f805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb90602001610811565b6001600160a01b038316610f2d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161065f565b6001600160a01b038216610f8e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161065f565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff161561101557600080fd5b6001600160a01b0383166110795760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161065f565b6001600160a01b0382166110db5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161065f565b600081116110e857600080fd5b600080546001600160a01b0385811691161480159061111557506000546001600160a01b03848116911614155b156112af576008546001600160a01b03858116911614801561114557506006546001600160a01b03848116911614155b801561116a57506001600160a01b03831660009081526004602052604090205460ff16155b156111c857600f5460ff1661117e57600080fd5b42600e5460b461118e91906119ba565b11156111c457600c548211156111a357600080fd5b600d546111af84610829565b6111b990846119ba565b11156111c457600080fd5b5060015b600f54610100900460ff161580156111e25750600f5460ff165b80156111fc57506008546001600160a01b03858116911614155b156112af57600061120c30610829565b9050801561129857600f5462010000900460ff161561128f57600b5460085460649190611241906001600160a01b0316610829565b61124b91906119d2565b61125591906119f1565b81111561128f57600b5460085460649190611278906001600160a01b0316610829565b61128291906119d2565b61128c91906119f1565b90505b61129881611348565b4780156112a8576112a84761130e565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff16806112f157506001600160a01b03841660009081526004602052604090205460ff165b156112fa575060005b61130785858584866114bc565b5050505050565b6007546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156107a5573d6000803e3d6000fd5b600f805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061138c5761138c611921565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156113e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114099190611952565b8160018151811061141c5761141c611921565b6001600160a01b0392831660209182029290920101526006546114429130911684610ecb565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac9479061147b908590600090869030904290600401611a13565b600060405180830381600087803b15801561149557600080fd5b505af11580156114a9573d6000803e3d6000fd5b5050600f805461ff001916905550505050565b60006114c883836114de565b90506114d686868684611502565b505050505050565b60008083156114fb5782156114f657506009546114fb565b50600a545b9392505050565b60008061150f84846115df565b6001600160a01b038816600090815260026020526040902054919350915061153890859061190a565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546115689083906119ba565b6001600160a01b03861660009081526002602052604090205561158a81611613565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115cf91815260200190565b60405180910390a3505050505050565b6000808060646115ef85876119d2565b6115f991906119f1565b90506000611607828761190a565b96919550909350505050565b3060009081526002602052604090205461162e9082906119ba565b3060009081526002602052604090205550565b600060208083528351808285015260005b8181101561166e57858101830151858201604001528201611652565b81811115611680576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461082657600080fd5b80356116b681611696565b919050565b600080604083850312156116ce57600080fd5b82356116d981611696565b946020939093013593505050565b600080604083850312156116fa57600080fd5b50508035926020909101359150565b60008060006060848603121561171e57600080fd5b833561172981611696565b9250602084013561173981611696565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561177357600080fd5b823567ffffffffffffffff8082111561178b57600080fd5b818501915085601f83011261179f57600080fd5b8135818111156117b1576117b161174a565b8060051b604051601f19603f830116810181811085821117156117d6576117d661174a565b6040529182528482019250838101850191888311156117f457600080fd5b938501935b828510156118195761180a856116ab565b845293850193928501926117f9565b98975050505050505050565b60006020828403121561183757600080fd5b81356114fb81611696565b60006020828403121561185457600080fd5b5035919050565b801515811461082657600080fd5b60006020828403121561187b57600080fd5b81356114fb8161185b565b6000806040838503121561189957600080fd5b82356118a481611696565b915060208301356118b481611696565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008282101561191c5761191c6118f4565b500390565b634e487b7160e01b600052603260045260246000fd5b600060001982141561194b5761194b6118f4565b5060010190565b60006020828403121561196457600080fd5b81516114fb81611696565b60008060006060848603121561198457600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156119af57600080fd5b81516114fb8161185b565b600082198211156119cd576119cd6118f4565b500190565b60008160001904831182151516156119ec576119ec6118f4565b500290565b600082611a0e57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a635784516001600160a01b031683529383019391830191600101611a3e565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212202f5221c4c38278f9047325fd7f07f1867e5cf9f66789a8126e756d016c6b19c964736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,701
0x658424d970C977ad3772CCEa285916f6ab3F7cE0
/** *Submitted for verification at Etherscan.io on 2021-11-25 */ //SPDX-License-Identifier: None // Telegram: t.me/EdwardToken pragma solidity ^0.8.9; uint256 constant INITIAL_TAX=9; uint256 constant TOTAL_SUPPLY=100000000; string constant TOKEN_SYMBOL="EDWARD"; string constant TOKEN_NAME="Edward Elric"; uint8 constant DECIMALS=6; uint256 constant TAX_THRESHOLD=1000000000000000000; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract Edward is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY * 10**DECIMALS; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _burnFee; uint256 private _taxFee; address payable private _taxWallet; uint256 private _maxTxAmount; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _uniswap; address private _pair; bool private _canTrade; bool private _inSwap = false; bool private _swapEnabled = false; modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _burnFee = 1; _taxFee = INITIAL_TAX; _uniswap = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; _maxTxAmount=_tTotal.div(25); emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) { require(amount<_maxTxAmount,"Transaction amount limited"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance >= TAX_THRESHOLD) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswap.WETH(); _approve(address(this), address(_uniswap), tokenAmount); _uniswap.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier onlyTaxCollector() { require(_taxWallet == _msgSender() ); _; } function lowerTax(uint256 newTaxRate) public onlyTaxCollector{ require(newTaxRate<INITIAL_TAX); _taxFee=newTaxRate; } function removeBuyLimit() public onlyTaxCollector{ _maxTxAmount=_tTotal; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyTaxCollector { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; IERC20(_pair).approve(address(_uniswap), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external onlyTaxCollector{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyTaxCollector{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100f75760003560e01c806370a082311161008a5780639e752b95116100595780639e752b95146102a6578063a9059cbb146102c6578063dd62ed3e146102e6578063f42938901461032c57600080fd5b806370a082311461021a578063715018a61461023a5780638da5cb5b1461024f57806395d89b411461027757600080fd5b8063293230b8116100c6578063293230b8146101bd578063313ce567146101d45780633e07ce5b146101f057806351bc3c851461020557600080fd5b806306fdde0314610103578063095ea7b31461014a57806318160ddd1461017a57806323b872dd1461019d57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5060408051808201909152600c81526b45647761726420456c72696360a01b60208201525b60405161014191906113a0565b60405180910390f35b34801561015657600080fd5b5061016a61016536600461140a565b610341565b6040519015158152602001610141565b34801561018657600080fd5b5061018f610358565b604051908152602001610141565b3480156101a957600080fd5b5061016a6101b8366004611436565b610379565b3480156101c957600080fd5b506101d26103e2565b005b3480156101e057600080fd5b5060405160068152602001610141565b3480156101fc57600080fd5b506101d261075a565b34801561021157600080fd5b506101d2610790565b34801561022657600080fd5b5061018f610235366004611477565b6107bd565b34801561024657600080fd5b506101d26107df565b34801561025b57600080fd5b506000546040516001600160a01b039091168152602001610141565b34801561028357600080fd5b50604080518082019091526006815265115115d0549160d21b6020820152610134565b3480156102b257600080fd5b506101d26102c1366004611494565b610883565b3480156102d257600080fd5b5061016a6102e136600461140a565b6108ac565b3480156102f257600080fd5b5061018f6103013660046114ad565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561033857600080fd5b506101d26108b9565b600061034e338484610923565b5060015b92915050565b60006103666006600a6115e0565b610374906305f5e1006115ef565b905090565b6000610386848484610a47565b6103d884336103d385604051806060016040528060288152602001611754602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610ccc565b610923565b5060019392505050565b6009546001600160a01b031633146103f957600080fd5b600c54600160a01b900460ff16156104585760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064015b60405180910390fd5b600b546104849030906001600160a01b03166104766006600a6115e0565b6103d3906305f5e1006115ef565b600b60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fb919061160e565b6001600160a01b031663c9c6539630600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561055d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610581919061160e565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156105ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f2919061160e565b600c80546001600160a01b0319166001600160a01b03928316179055600b541663f305d7194730610622816107bd565b6000806106376000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af115801561069f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106c4919061162b565b5050600c805462ff00ff60a01b1981166201000160a01b17909155600b5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190611659565b50565b6009546001600160a01b0316331461077157600080fd5b61077d6006600a6115e0565b61078b906305f5e1006115ef565b600a55565b6009546001600160a01b031633146107a757600080fd5b60006107b2306107bd565b905061075781610d06565b6001600160a01b03811660009081526002602052604081205461035290610e80565b6000546001600160a01b031633146108395760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161044f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b0316331461089a57600080fd5b600981106108a757600080fd5b600855565b600061034e338484610a47565b6009546001600160a01b031633146108d057600080fd5b4761075781610efd565b600061091c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f3b565b9392505050565b6001600160a01b0383166109855760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161044f565b6001600160a01b0382166109e65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161044f565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610aab5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161044f565b6001600160a01b038216610b0d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161044f565b60008111610b6f5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161044f565b6000546001600160a01b03848116911614801590610b9b57506000546001600160a01b03838116911614155b15610cbc57600c546001600160a01b038481169116148015610bcb5750600b546001600160a01b03838116911614155b8015610bf057506001600160a01b03821660009081526004602052604090205460ff16155b15610c4657600a548110610c465760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e20616d6f756e74206c696d69746564000000000000604482015260640161044f565b6000610c51306107bd565b600c54909150600160a81b900460ff16158015610c7c5750600c546001600160a01b03858116911614155b8015610c915750600c54600160b01b900460ff165b15610cba57610c9f81610d06565b47670de0b6b3a76400008110610cb857610cb847610efd565b505b505b610cc7838383610f69565b505050565b60008184841115610cf05760405162461bcd60e51b815260040161044f91906113a0565b506000610cfd848661167b565b95945050505050565b600c805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d4e57610d4e611692565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcb919061160e565b81600181518110610dde57610dde611692565b6001600160a01b039283166020918202929092010152600b54610e049130911684610923565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e3d9085906000908690309042906004016116a8565b600060405180830381600087803b158015610e5757600080fd5b505af1158015610e6b573d6000803e3d6000fd5b5050600c805460ff60a81b1916905550505050565b6000600554821115610ee75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161044f565b6000610ef1610f74565b905061091c83826108da565b6009546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610f37573d6000803e3d6000fd5b5050565b60008183610f5c5760405162461bcd60e51b815260040161044f91906113a0565b506000610cfd8486611719565b610cc7838383610f97565b6000806000610f8161108e565b9092509050610f9082826108da565b9250505090565b600080600080600080610fa987611110565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610fdb908761116d565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461100a90866111af565b6001600160a01b03891660009081526002602052604090205561102c8161120e565b6110368483611258565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161107b91815260200190565b60405180910390a3505050505050505050565b6005546000908190816110a36006600a6115e0565b6110b1906305f5e1006115ef565b90506110d96110c26006600a6115e0565b6110d0906305f5e1006115ef565b600554906108da565b821015611107576005546110ef6006600a6115e0565b6110fd906305f5e1006115ef565b9350935050509091565b90939092509050565b600080600080600080600080600061112d8a60075460085461127c565b925092509250600061113d610f74565b905060008060006111508e8787876112d1565b919e509c509a509598509396509194505050505091939550919395565b600061091c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ccc565b6000806111bc838561173b565b90508381101561091c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161044f565b6000611218610f74565b905060006112268383611321565b3060009081526002602052604090205490915061124390826111af565b30600090815260026020526040902055505050565b600554611265908361116d565b60055560065461127590826111af565b6006555050565b600080808061129660646112908989611321565b906108da565b905060006112a960646112908a89611321565b905060006112c1826112bb8b8661116d565b9061116d565b9992985090965090945050505050565b60008080806112e08886611321565b905060006112ee8887611321565b905060006112fc8888611321565b9050600061130e826112bb868661116d565b939b939a50919850919650505050505050565b60008261133057506000610352565b600061133c83856115ef565b9050826113498583611719565b1461091c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161044f565b600060208083528351808285015260005b818110156113cd578581018301518582016040015282016113b1565b818111156113df576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461075757600080fd5b6000806040838503121561141d57600080fd5b8235611428816113f5565b946020939093013593505050565b60008060006060848603121561144b57600080fd5b8335611456816113f5565b92506020840135611466816113f5565b929592945050506040919091013590565b60006020828403121561148957600080fd5b813561091c816113f5565b6000602082840312156114a657600080fd5b5035919050565b600080604083850312156114c057600080fd5b82356114cb816113f5565b915060208301356114db816113f5565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561153757816000190482111561151d5761151d6114e6565b8085161561152a57918102915b93841c9390800290611501565b509250929050565b60008261154e57506001610352565b8161155b57506000610352565b8160018114611571576002811461157b57611597565b6001915050610352565b60ff84111561158c5761158c6114e6565b50506001821b610352565b5060208310610133831016604e8410600b84101617156115ba575081810a610352565b6115c483836114fc565b80600019048211156115d8576115d86114e6565b029392505050565b600061091c60ff84168361153f565b6000816000190483118215151615611609576116096114e6565b500290565b60006020828403121561162057600080fd5b815161091c816113f5565b60008060006060848603121561164057600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561166b57600080fd5b8151801515811461091c57600080fd5b60008282101561168d5761168d6114e6565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156116f85784516001600160a01b0316835293830193918301916001016116d3565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261173657634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561174e5761174e6114e6565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202162dfbb548f05c81dcd3a285c8a3f3a505cbdeffcfd60171f475be0cb435ba564736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,702
0x6a56d0f7498c9f2aeb9bb6892ade5b2e0a50379f
/** *Submitted for verification at Etherscan.io on 2021-08-24 */ // SPDX-License-Identifier: No License (None) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { struct AddressSet { // Storage of set values address[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (address => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { if (!contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. address lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns 1-based index of value in the set. O(1). */ function indexOf(AddressSet storage set, address value) internal view returns (uint256) { return set._indexes[value]; } /** * @dev Returns the number of values on the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } } contract MultisigWallet { using EnumerableSet for EnumerableSet.AddressSet; struct Ballot { uint128 votes; // bitmap of unique votes (max 127 votes) uint64 expire; // time when ballot expire uint8 yea; // number of votes `Yea` } EnumerableSet.AddressSet owners; // founders may transfer contract's ownership uint256 public ownersSetCounter; // each time when change owners increase the counter uint256 public expirePeriod = 3 days; mapping(bytes32 => Ballot) public ballots; event SetOwner(address owner, bool isEnable); event CreateBallot(bytes32 ballotHash, uint256 expired); event Execute(bytes32 ballotHash, address to, uint256 value, bytes data); modifier onlyThis() { require(address(this) == msg.sender, "Only multisig allowed"); _; } constructor (address[] memory _owners) { for (uint i = 0; i < _owners.length; i++) { require(_owners[i] != address(0), "Zero address"); owners.add(_owners[i]); } } // get number of owners function getOwnersNumber() external view returns(uint256) { return owners.length(); } // returns list of owners addresses function getOwners() external view returns(address[] memory) { return owners._values; } // add owner function addOwner(address owner) external onlyThis{ require(owner != address(0), "Zero address"); require(owners.length() < 127, "Too many owners"); require(owners.add(owner), "Owner already added"); ownersSetCounter++; // change owners set emit SetOwner(owner, true); } // remove owner function removeOwner(address owner) external onlyThis{ require(owners.length() > 1, "Remove all owners is not allowed"); require(owners.remove(owner), "Owner does not exist"); ownersSetCounter++; // change owners set emit SetOwner(owner, false); } function setExpirePeriod(uint256 period) external onlyThis { require(period >= 1 days, "Too short period"); // avoid deadlock in case of set too short period expirePeriod = period; } function vote(address to, uint256 value, bytes calldata data) external { uint256 index = owners.indexOf(msg.sender); require(index != 0, "Only owner"); bytes32 ballotHash = keccak256(abi.encodePacked(to, value, data, ownersSetCounter)); Ballot memory b = ballots[ballotHash]; if (b.expire == 0 || b.expire < uint64(block.timestamp)) { // if no ballot or ballot expired - create new ballot b.expire = uint64(block.timestamp + expirePeriod); b.votes = 0; b.yea = 0; emit CreateBallot(ballotHash, b.expire); } uint256 mask = 1 << index; if (b.votes & mask == 0) { // this owner don't vote yet. b.votes = uint128(b.votes | mask); // record owner's vote b.yea += 1; // increase total votes "Yea" } if (b.yea >= owners.length() / 2 + 1) { // vote "Yea" > 50% of owners delete ballots[ballotHash]; execute(to, value, data); emit Execute(ballotHash, to, value, data); } else { // update ballot ballots[ballotHash] = b; } } function execute(address to, uint256 value, bytes memory data) internal { (bool success,) = to.call{value: value}(data); require(success, "Execute error"); } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80637dd0dd16116100665780637dd0dd16146100e55780638638fb5a1461015d57806386cbaed814610165578063a0e67e2b14610178578063d7a52fa91461018d57600080fd5b8063163d262f14610098578063173825d9146100b457806321407e53146100c95780637065cb48146100d2575b600080fd5b6100a160025481565b6040519081526020015b60405180910390f35b6100c76100c2366004610a5f565b6101a0565b005b6100a160035481565b6100c76100e0366004610a5f565b6102c9565b61012c6100f3366004610b02565b6004602052600090815260409020546001600160801b03811690600160801b810467ffffffffffffffff1690600160c01b900460ff1683565b604080516001600160801b03909416845267ffffffffffffffff909216602084015260ff16908201526060016100ab565b6000546100a1565b6100c7610173366004610a80565b610418565b6101806106f1565b6040516100ab9190610b87565b6100c761019b366004610b02565b610755565b3033146101c85760405162461bcd60e51b81526004016101bf90610c23565b60405180910390fd5b60016101d360005490565b116102205760405162461bcd60e51b815260206004820181905260248201527f52656d6f766520616c6c206f776e657273206973206e6f7420616c6c6f77656460448201526064016101bf565b61022b600082610833565b61026e5760405162461bcd60e51b815260206004820152601460248201527313dddb995c88191bd95cc81b9bdd08195e1a5cdd60621b60448201526064016101bf565b6002805490600061027e83610cc6565b9091555050604080516001600160a01b0383168152600060208201527f5501576e82029b0850ec7c74ac25b5a46839bf523772a6ac579cc55b092281c891015b60405180910390a150565b3033146102e85760405162461bcd60e51b81526004016101bf90610c23565b6001600160a01b03811661032d5760405162461bcd60e51b815260206004820152600c60248201526b5a65726f206164647265737360a01b60448201526064016101bf565b607f61033860005490565b106103775760405162461bcd60e51b815260206004820152600f60248201526e546f6f206d616e79206f776e65727360881b60448201526064016101bf565b6103826000826107bf565b6103c45760405162461bcd60e51b815260206004820152601360248201527213dddb995c88185b1c9958591e481859191959606a1b60448201526064016101bf565b600280549060006103d483610cc6565b9091555050604080516001600160a01b0383168152600160208201527f5501576e82029b0850ec7c74ac25b5a46839bf523772a6ac579cc55b092281c891016102be565b33600090815260016020526040902054806104625760405162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b60448201526064016101bf565b60008585858560025460405160200161047f959493929190610b1a565b60408051808303601f190181528282528051602091820120600081815260048352839020606085018452546001600160801b0381168552600160801b810467ffffffffffffffff16928501839052600160c01b900460ff1692840192909252909250158061050457504267ffffffffffffffff16816020015167ffffffffffffffff16105b1561056e576003546105169042610c52565b67ffffffffffffffff16602082810182905260008084526040808501919091528051858152918201929092527fdba396e3f86ba92c12e944cda2d787eea52a24f6babcbd54c8ffb2d369bca7c9910160405180910390a15b80516001841b9081166001600160801b03166105b25781516001600160801b038083169116178252604082018051600191906105ab908390610c6a565b60ff169052505b60026105bd60005490565b6105c79190610c8f565b6105d2906001610c52565b826040015160ff16106106815760008381526004602090815260409182902080546001600160c81b03191690558151601f880182900482028101820190925286825261063d918a918a91908a908a908190840183828082843760009201919091525061099f92505050565b7fc75495e0be082158e5855c35d211235055bf668ec3933eb9f3cf757c6493ee6d8389898989604051610674959493929190610bd4565b60405180910390a16106e7565b60008381526004602090815260409182902084518154928601519386015160ff16600160c01b0260ff60c01b1967ffffffffffffffff909516600160801b026001600160c01b03199094166001600160801b039092169190911792909217929092161790555b5050505050505050565b60606000800180548060200260200160405190810160405280929190818152602001828054801561074b57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161072d575b5050505050905090565b3033146107745760405162461bcd60e51b81526004016101bf90610c23565b620151808110156107ba5760405162461bcd60e51b815260206004820152601060248201526f151bdbc81cda1bdc9d081c195c9a5bd960821b60448201526064016101bf565b600355565b6001600160a01b038116600090815260018301602052604081205461082957508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b0386169081179091558554908252828601909352604090209190915561082d565b5060005b92915050565b6001600160a01b03811660009081526001830160205260408120548015610995576000610861600183610caf565b855490915060009061087590600190610caf565b9050600086600001828154811061089c57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015487546001600160a01b03909116915081908890859081106108d957634e487b7160e01b600052603260045260246000fd5b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905561090d836001610c52565b6001600160a01b0382166000908152600189016020526040902055865487908061094757634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260018981019091526040822091909155945061082d9350505050565b600091505061082d565b6000836001600160a01b031683836040516109ba9190610b4e565b60006040518083038185875af1925050503d80600081146109f7576040519150601f19603f3d011682016040523d82523d6000602084013e6109fc565b606091505b5050905080610a3d5760405162461bcd60e51b815260206004820152600d60248201526c22bc32b1baba329032b93937b960991b60448201526064016101bf565b50505050565b80356001600160a01b0381168114610a5a57600080fd5b919050565b600060208284031215610a70578081fd5b610a7982610a43565b9392505050565b60008060008060608587031215610a95578283fd5b610a9e85610a43565b935060208501359250604085013567ffffffffffffffff80821115610ac1578384fd5b818701915087601f830112610ad4578384fd5b813581811115610ae2578485fd5b886020828501011115610af3578485fd5b95989497505060200194505050565b600060208284031215610b13578081fd5b5035919050565b6bffffffffffffffffffffffff198660601b1681528460148201528284603483013760349201918201526054019392505050565b60008251815b81811015610b6e5760208186018101518583015201610b54565b81811115610b7c5782828501525b509190910192915050565b6020808252825182820181905260009190848201906040850190845b81811015610bc85783516001600160a01b031683529284019291840191600101610ba3565b50909695505050505050565b8581526001600160a01b0385166020820152604081018490526080606082018190528101829052818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b60208082526015908201527413db9b1e481b5d5b1d1a5cda59c8185b1b1bddd959605a1b604082015260600190565b60008219821115610c6557610c65610ce1565b500190565b600060ff821660ff84168060ff03821115610c8757610c87610ce1565b019392505050565b600082610caa57634e487b7160e01b81526012600452602481fd5b500490565b600082821015610cc157610cc1610ce1565b500390565b6000600019821415610cda57610cda610ce1565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122082cb06275be9280a5cfe5e4d64cb4b58193a6991cf85b6b847d8217513bfe06a64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,703
0x229e0b28EE856A3Dd50962770250E02CBf7747E6
/** *Submitted for verification at Etherscan.io on 2021-10-26 */ //SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract FundsRecovery is Ownable { address payable internal fundsDestination; IERC20 public token; event DestinationChanged( address indexed previousDestination, address indexed newDestination ); function setFundsDestination(address payable _newDestination) public virtual onlyOwner { require(_newDestination != address(0), "address is 0x0"); emit DestinationChanged(fundsDestination, _newDestination); fundsDestination = _newDestination; } function getFundsDestination() public view onlyOwner returns (address) { return fundsDestination; } function claimNative() public { require(fundsDestination != address(0), "address is 0x0"); fundsDestination.transfer(address(this).balance); } function claimTokens(address _token) public { require(fundsDestination != address(0), "address is 0x0"); require( _token != address(token), "native token funds can't be recovered" ); uint256 _amount = IERC20(_token).balanceOf(address(this)); IERC20(_token).transfer(fundsDestination, _amount); } } contract TopperUpper is FundsRecovery { struct Limit { uint256 native; uint256 token; uint256 blocksWindow; } struct CurrentLimit { uint256 amount; uint256 validTill; } mapping(address => bool) public managers; mapping(address => Limit) public approvedAddresses; mapping(address => CurrentLimit) public tokenLimits; // Current period token limits mapping(address => CurrentLimit) public nativeLimits; // Current period native currency limits modifier onlyManager() { require(managers[_msgSender()], "Caller is not a manager"); _; } constructor(address _token) { token = IERC20(_token); } receive() external payable {} function setManagers(address[] memory _managers) public onlyOwner { require(_managers.length > 0, "Please pass at least one manager"); for (uint256 i = 0; i < _managers.length; i++) { managers[_managers[i]] = true; } } function removeManagers(address[] memory _managers) public onlyOwner { require(_managers.length > 0, "Invalid array length"); for (uint256 i = 0; i < _managers.length; i++) { delete managers[_managers[i]]; } } function approveAddresses( address[] memory _addrs, uint256[] memory _limitsNative, uint256[] memory _limitsToken, uint256[] memory _blocksWindow ) public onlyOwner { require( _addrs.length == _limitsNative.length && _limitsNative.length == _limitsToken.length && _blocksWindow.length == _limitsToken.length, "Invalid array length" ); for (uint256 i = 0; i < _addrs.length; i++) { Limit memory limit = Limit( _limitsNative[i], _limitsToken[i], _blocksWindow[i] ); approvedAddresses[_addrs[i]] = limit; } } function disapproveAddresses(address[] memory _addrs) public onlyOwner { require(_addrs.length > 0, "Invalid array length"); for (uint256 i = 0; i < _addrs.length; i++) { delete approvedAddresses[_addrs[i]]; delete nativeLimits[_addrs[i]]; delete tokenLimits[_addrs[i]]; } } function _topupNative(address payable _to, uint256 _amount) internal { if (block.number > nativeLimits[_to].validTill) { require( approvedAddresses[_to].native >= _amount, "Payout limits exceeded" ); nativeLimits[_to].validTill = block.number + approvedAddresses[_to].blocksWindow; nativeLimits[_to].amount = approvedAddresses[_to].native - _amount; } else { require( nativeLimits[_to].amount >= _amount, "Payout limits exceeded" ); nativeLimits[_to].amount -= _amount; } _to.transfer(_amount); } function topupNative(address payable _to, uint256 _amounts) public onlyManager { _topupNative(_to, _amounts); } function topupNatives( address payable[] memory _to, uint256[] memory _amounts ) public onlyManager { require(_amounts.length == _to.length, "Invalid array length"); for (uint256 i = 0; i < _to.length; i++) { topupNative(_to[i], _amounts[i]); } } function _topupToken(address _to, uint256 _amount) internal { if (block.number > tokenLimits[_to].validTill) { require( approvedAddresses[_to].token >= _amount, "Payout limits exceeded" ); tokenLimits[_to].validTill = block.number + approvedAddresses[_to].blocksWindow; tokenLimits[_to].amount = approvedAddresses[_to].token - _amount; } else { require( tokenLimits[_to].amount >= _amount, "Payout limits exceeded" ); tokenLimits[_to].amount -= _amount; } token.transfer(_to, _amount); } function topupToken(address _to, uint256 _amounts) public onlyManager { _topupToken(_to, _amounts); } function topupTokens(address[] memory _to, uint256[] memory _amounts) public onlyManager { require(_amounts.length == _to.length, "Invalid array length"); for (uint256 i = 0; i < _amounts.length; i++) { _topupToken(_to[i], _amounts[i]); } } }
0x6080604052600436106101235760003560e01c806391b571cf116100a0578063f2fde38b11610064578063f2fde38b14610391578063f4856230146103b1578063f58c5b6e146103c6578063fc0c546a146103db578063fdff9b4d146103fb57600080fd5b806391b571cf146102a6578063d4f2b668146102c6578063df8de3e7146102e6578063e7fc94c414610306578063f136a8741461033a57600080fd5b80634784e21b116100e75780634784e21b146101ff5780634f85d3db1461021f578063714280b31461023f578063715018a61461025f5780638da5cb5b1461027457600080fd5b80630d4e1a1e1461012f57806310f3ee2914610151578063238e130a14610171578063367caa0914610191578063417a0698146101b157600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b5061014f61014a366004611147565b61043b565b005b34801561015d57600080fd5b5061014f61016c366004611252565b610481565b34801561017d57600080fd5b5061014f61018c36600461128f565b61052b565b34801561019d57600080fd5b5061014f6101ac366004611252565b6105d7565b3480156101bd57600080fd5b506101e56101cc36600461128f565b6005602052600090815260409020805460019091015482565b604080519283526020830191909152015b60405180910390f35b34801561020b57600080fd5b5061014f61021a36600461130e565b6106ba565b34801561022b57600080fd5b5061014f61023a366004611252565b610810565b34801561024b57600080fd5b5061014f61025a366004611147565b610965565b34801561026b57600080fd5b5061014f61099e565b34801561028057600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016101f6565b3480156102b257600080fd5b5061014f6102c13660046113bb565b6109d4565b3480156102d257600080fd5b5061014f6102e136600461141f565b610a83565b3480156102f257600080fd5b5061014f61030136600461128f565b610b2d565b34801561031257600080fd5b506101e561032136600461128f565b6006602052600090815260409020805460019091015482565b34801561034657600080fd5b5061037661035536600461128f565b60046020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101f6565b34801561039d57600080fd5b5061014f6103ac36600461128f565b610cc4565b3480156103bd57600080fd5b5061014f610d5f565b3480156103d257600080fd5b5061028e610dc0565b3480156103e757600080fd5b5060025461028e906001600160a01b031681565b34801561040757600080fd5b5061042b61041636600461128f565b60036020526000908152604090205460ff1681565b60405190151581526020016101f6565b3360009081526003602052604090205460ff166104735760405162461bcd60e51b815260040161046a906114ca565b60405180910390fd5b61047d8282610dfb565b5050565b6000546001600160a01b031633146104ab5760405162461bcd60e51b815260040161046a90611501565b60008151116104cc5760405162461bcd60e51b815260040161046a90611536565b60005b815181101561047d57600360008383815181106104ee576104ee611564565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191690558061052381611590565b9150506104cf565b6000546001600160a01b031633146105555760405162461bcd60e51b815260040161046a90611501565b6001600160a01b03811661057b5760405162461bcd60e51b815260040161046a906115ab565b6001546040516001600160a01b038084169216907fe1a66d77649cf0a57b9937073549f30f1c82bb865aaf066d2f299e37a62c6aad90600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146106015760405162461bcd60e51b815260040161046a90611501565b60008151116106525760405162461bcd60e51b815260206004820181905260248201527f506c656173652070617373206174206c65617374206f6e65206d616e61676572604482015260640161046a565b60005b815181101561047d5760016003600084848151811061067657610676611564565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106b281611590565b915050610655565b6000546001600160a01b031633146106e45760405162461bcd60e51b815260040161046a90611501565b825184511480156106f6575081518351145b8015610703575081518151145b61071f5760405162461bcd60e51b815260040161046a90611536565b60005b8451811015610809576000604051806060016040528086848151811061074a5761074a611564565b6020026020010151815260200185848151811061076957610769611564565b6020026020010151815260200184848151811061078857610788611564565b6020026020010151815250905080600460008885815181106107ac576107ac611564565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000155602082015181600101556040820151816002015590505050808061080190611590565b915050610722565b5050505050565b6000546001600160a01b0316331461083a5760405162461bcd60e51b815260040161046a90611501565b600081511161085b5760405162461bcd60e51b815260040161046a90611536565b60005b815181101561047d576004600083838151811061087d5761087d611564565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600080820160009055600182016000905560028201600090555050600660008383815181106108d6576108d6611564565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600080820160009055600182016000905550506005600083838151811061092757610927611564565b6020908102919091018101516001600160a01b031682528101919091526040016000908120818155600101558061095d81611590565b91505061085e565b3360009081526003602052604090205460ff166109945760405162461bcd60e51b815260040161046a906114ca565b61047d8282610f69565b6000546001600160a01b031633146109c85760405162461bcd60e51b815260040161046a90611501565b6109d260006110e2565b565b3360009081526003602052604090205460ff16610a035760405162461bcd60e51b815260040161046a906114ca565b8151815114610a245760405162461bcd60e51b815260040161046a90611536565b60005b8151811015610a7e57610a6c838281518110610a4557610a45611564565b6020026020010151838381518110610a5f57610a5f611564565b6020026020010151610f69565b80610a7681611590565b915050610a27565b505050565b3360009081526003602052604090205460ff16610ab25760405162461bcd60e51b815260040161046a906114ca565b8151815114610ad35760405162461bcd60e51b815260040161046a90611536565b60005b8251811015610a7e57610b1b838281518110610af457610af4611564565b6020026020010151838381518110610b0e57610b0e611564565b602002602001015161043b565b80610b2581611590565b915050610ad6565b6001546001600160a01b0316610b555760405162461bcd60e51b815260040161046a906115ab565b6002546001600160a01b0382811691161415610bc15760405162461bcd60e51b815260206004820152602560248201527f6e617469766520746f6b656e2066756e64732063616e2774206265207265636f6044820152641d995c995960da1b606482015260840161046a565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610c0357600080fd5b505afa158015610c17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3b91906115d3565b60015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905291925083169063a9059cbb906044015b602060405180830381600087803b158015610c8c57600080fd5b505af1158015610ca0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7e91906115ec565b6000546001600160a01b03163314610cee5760405162461bcd60e51b815260040161046a90611501565b6001600160a01b038116610d535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161046a565b610d5c816110e2565b50565b6001546001600160a01b0316610d875760405162461bcd60e51b815260040161046a906115ab565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610d5c573d6000803e3d6000fd5b600080546001600160a01b03163314610deb5760405162461bcd60e51b815260040161046a90611501565b506001546001600160a01b031690565b6001600160a01b038216600090815260066020526040902060010154431115610ecd576001600160a01b038216600090815260046020526040902054811115610e565760405162461bcd60e51b815260040161046a9061160e565b6001600160a01b038216600090815260046020526040902060020154610e7c904361163e565b6001600160a01b038316600090815260066020908152604080832060010193909355600490522054610eaf908290611656565b6001600160a01b038316600090815260066020526040902055610f33565b6001600160a01b038216600090815260066020526040902054811115610f055760405162461bcd60e51b815260040161046a9061160e565b6001600160a01b03821660009081526006602052604081208054839290610f2d908490611656565b90915550505b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610a7e573d6000803e3d6000fd5b6001600160a01b038216600090815260056020526040902060010154431115611043576001600160a01b038216600090815260046020526040902060010154811115610fc75760405162461bcd60e51b815260040161046a9061160e565b6001600160a01b038216600090815260046020526040902060020154610fed904361163e565b6001600160a01b0383166000908152600560209081526040808320600190810194909455600490915290200154611025908290611656565b6001600160a01b0383166000908152600560205260409020556110a9565b6001600160a01b03821660009081526005602052604090205481111561107b5760405162461bcd60e51b815260040161046a9061160e565b6001600160a01b038216600090815260056020526040812080548392906110a3908490611656565b90915550505b60025460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb90604401610c72565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114610d5c57600080fd5b6000806040838503121561115a57600080fd5b823561116581611132565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156111b2576111b2611173565b604052919050565b600067ffffffffffffffff8211156111d4576111d4611173565b5060051b60200190565b600082601f8301126111ef57600080fd5b813560206112046111ff836111ba565b611189565b82815260059290921b8401810191818101908684111561122357600080fd5b8286015b8481101561124757803561123a81611132565b8352918301918301611227565b509695505050505050565b60006020828403121561126457600080fd5b813567ffffffffffffffff81111561127b57600080fd5b611287848285016111de565b949350505050565b6000602082840312156112a157600080fd5b81356112ac81611132565b9392505050565b600082601f8301126112c457600080fd5b813560206112d46111ff836111ba565b82815260059290921b840181019181810190868411156112f357600080fd5b8286015b8481101561124757803583529183019183016112f7565b6000806000806080858703121561132457600080fd5b843567ffffffffffffffff8082111561133c57600080fd5b611348888389016111de565b9550602087013591508082111561135e57600080fd5b61136a888389016112b3565b9450604087013591508082111561138057600080fd5b61138c888389016112b3565b935060608701359150808211156113a257600080fd5b506113af878288016112b3565b91505092959194509250565b600080604083850312156113ce57600080fd5b823567ffffffffffffffff808211156113e657600080fd5b6113f2868387016111de565b9350602085013591508082111561140857600080fd5b50611415858286016112b3565b9150509250929050565b6000806040838503121561143257600080fd5b823567ffffffffffffffff8082111561144a57600080fd5b818501915085601f83011261145e57600080fd5b8135602061146e6111ff836111ba565b82815260059290921b8401810191818101908984111561148d57600080fd5b948201945b838610156114b45785356114a581611132565b82529482019490820190611492565b9650508601359250508082111561140857600080fd5b60208082526017908201527f43616c6c6572206973206e6f742061206d616e61676572000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260149082015273092dcecc2d8d2c840c2e4e4c2f240d8cadccee8d60631b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156115a4576115a461157a565b5060010190565b6020808252600e908201526d061646472657373206973203078360941b604082015260600190565b6000602082840312156115e557600080fd5b5051919050565b6000602082840312156115fe57600080fd5b815180151581146112ac57600080fd5b60208082526016908201527514185e5bdd5d081b1a5b5a5d1cc8195e18d95959195960521b604082015260600190565b600082198211156116515761165161157a565b500190565b6000828210156116685761166861157a565b50039056fea26469706673582212207d4c76f3bd093a4a7e5c5297d4cbde6eadf42f9453d1c63947e32e2ffc2c6a4064736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,704
0x91161a46b7151023289488177398307002458df7
pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } } contract BTNY is StandardToken, Ownable { string public constant name = "Bitenny"; string public constant symbol = "BTNY"; uint32 public constant decimals = 18; address public team = address(0); address public saleContract = address(0); uint256 public unlockDate = 1541030400; // 01 November 2018 00:00 UTC mapping(address => bool) transferWhitelist; modifier unlocked() { if (now < unlockDate && !transferWhitelist[msg.sender]) revert(); _; } event SaleContractActivation(address saleContract, uint256 tokensForSale); event Burn(address tokensOwner, uint256 burnedTokensAmount); constructor(address _owner, address _team) public { require(_owner != address(0)); require(_team != address(0)); team = _team; uint256 ownerBudget = uint256(9600000000).mul(1 ether); uint256 teamTokens = uint256(2400000000).mul(1 ether); owner = _owner; transferWhitelist[owner] = true; totalSupply_ = totalSupply_.add(ownerBudget); balances[owner] = balances[owner].add(ownerBudget); emit Transfer(address(this), owner, ownerBudget); totalSupply_ = totalSupply_.add(teamTokens); balances[team] = balances[team].add(teamTokens); emit Transfer(address(this), team, teamTokens); } function addToTransferWhiteList(address _address) public onlyOwner returns (bool) { transferWhitelist[_address] = true; return true; } function transfer(address _to, uint256 _value) public unlocked returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public unlocked returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public unlocked returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public unlocked returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function activateSaleContract(address _contract) public { require(_contract != address(0)); require(saleContract == address(0)); saleContract = _contract; transferWhitelist[saleContract] = true; uint256 tokensToSaleContract = uint256(12000000000).mul(1 ether); totalSupply_ = totalSupply_.add(tokensToSaleContract); balances[saleContract] = balances[saleContract].add(tokensToSaleContract); emit Transfer(address(this), saleContract, tokensToSaleContract); emit SaleContractActivation(saleContract, tokensToSaleContract); } function burnTokensForSale() public returns (bool) { require(saleContract != address(0)); require(msg.sender == saleContract); uint256 tokens = balances[saleContract]; require(tokens > 0); require(tokens <= totalSupply_); balances[saleContract] = 0; totalSupply_ = totalSupply_.sub(tokens); emit Burn(saleContract, tokens); return true; } }
0x6080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610116578063095ea7b3146101a057806318160ddd146101d85780631b65144d146101ff57806323b872dd14610214578063313ce5671461023e578063661884631461026c57806369ac57211461029057806370a08231146102a5578063715018a6146102c657806385f2aef2146102dd5780638da5cb5b1461030e57806395d89b4114610323578063a9059cbb14610338578063be20e99c1461035c578063d73dd6231461037d578063daf6ca30146103a1578063dd62ed3e146103b6578063f2fde38b146103dd578063fdd080a4146103fe575b600080fd5b34801561012257600080fd5b5061012b61041f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016557818101518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ac57600080fd5b506101c4600160a060020a0360043516602435610456565b604080519115158252519081900360200190f35b3480156101e457600080fd5b506101ed61049f565b60408051918252519081900360200190f35b34801561020b57600080fd5b506101c46104a5565b34801561022057600080fd5b506101c4600160a060020a0360043581169060243516604435610593565b34801561024a57600080fd5b506102536105dc565b6040805163ffffffff9092168252519081900360200190f35b34801561027857600080fd5b506101c4600160a060020a03600435166024356105e1565b34801561029c57600080fd5b506101ed6106da565b3480156102b157600080fd5b506101ed600160a060020a03600435166106e0565b3480156102d257600080fd5b506102db6106fb565b005b3480156102e957600080fd5b506102f261076d565b60408051600160a060020a039092168252519081900360200190f35b34801561031a57600080fd5b506102f261077c565b34801561032f57600080fd5b5061012b61078b565b34801561034457600080fd5b506101c4600160a060020a03600435166024356107c2565b34801561036857600080fd5b506101c4600160a060020a0360043516610802565b34801561038957600080fd5b506101c4600160a060020a0360043516602435610849565b3480156103ad57600080fd5b506102f2610889565b3480156103c257600080fd5b506101ed600160a060020a0360043581169060243516610898565b3480156103e957600080fd5b506102db600160a060020a03600435166108c3565b34801561040a57600080fd5b506102db600160a060020a036004351661095c565b60408051808201909152600781527f426974656e6e7900000000000000000000000000000000000000000000000000602082015281565b6000600654421080156104825750600160a060020a03331660009081526007602052604090205460ff16155b1561048c57600080fd5b6104968383610ad5565b90505b92915050565b60015490565b6005546000908190600160a060020a031615156104c157600080fd5b60055433600160a060020a039081169116146104dc57600080fd5b50600554600160a060020a031660009081526020819052604081205490811161050457600080fd5b60015481111561051357600080fd5b600554600160a060020a0316600090815260208190526040812055600154610541908263ffffffff610b3f16565b60015560055460408051600160a060020a0390921682526020820183905280517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59281900390910190a1600191505090565b6000600654421080156105bf5750600160a060020a03331660009081526007602052604090205460ff16155b156105c957600080fd5b6105d4848484610b51565b949350505050565b601281565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561063e57600160a060020a033381166000908152600260209081526040808320938816835292905290812055610675565b61064e818463ffffffff610b3f16565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529482529182902054825190815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060019392505050565b60065481565b600160a060020a031660009081526020819052604090205490565b60035433600160a060020a0390811691161461071657600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600454600160a060020a031681565b600354600160a060020a031681565b60408051808201909152600481527f42544e5900000000000000000000000000000000000000000000000000000000602082015281565b6000600654421080156107ee5750600160a060020a03331660009081526007602052604090205460ff16155b156107f857600080fd5b6104968383610cd1565b60035460009033600160a060020a0390811691161461082057600080fd5b50600160a060020a03166000908152600760205260409020805460ff1916600190811790915590565b6000600654421080156108755750600160a060020a03331660009081526007602052604090205460ff16155b1561087f57600080fd5b6104968383610dca565b600554600160a060020a031681565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146108de57600080fd5b600160a060020a03811615156108f357600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038216151561097357600080fd5b600554600160a060020a03161561098957600080fd5b6005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038481169190911791829055166000908152600760205260409020805460ff191660011790556109e86402cb417800670de0b6b3a7640000610e6c565b6001549091506109fe908263ffffffff610e9516565b600155600554600160a060020a0316600090815260208190526040902054610a2c908263ffffffff610e9516565b60058054600160a060020a0390811660009081526020818152604091829020949094559154825185815292519082169330909216927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92908290030190a360055460408051600160a060020a0390921682526020820183905280517f9ca62f58e4fb70943b408da6f28c33dd8a48223bc1f3cb8345fc8ba01be7fc249281900390910190a15050565b600160a060020a03338116600081815260026020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600082821115610b4b57fe5b50900390565b6000600160a060020a0383161515610b6857600080fd5b600160a060020a038416600090815260208190526040902054821115610b8d57600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610bc057600080fd5b600160a060020a038416600090815260208190526040902054610be9908363ffffffff610b3f16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610c1e908363ffffffff610e9516565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610c64908363ffffffff610b3f16565b600160a060020a038086166000818152600260209081526040808320338616845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6000600160a060020a0383161515610ce857600080fd5b600160a060020a033316600090815260208190526040902054821115610d0d57600080fd5b600160a060020a033316600090815260208190526040902054610d36908363ffffffff610b3f16565b600160a060020a033381166000908152602081905260408082209390935590851681522054610d6b908363ffffffff610e9516565b600160a060020a03808516600081815260208181526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610e02908363ffffffff610e9516565b600160a060020a0333811660008181526002602090815260408083209489168084529482529182902085905581519485529051929391927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a350600192915050565b6000821515610e7d57506000610499565b50818102818382811515610e8d57fe5b041461049957fe5b8181018281101561049957fe00a165627a7a7230582067167d62ed2908b6b22aa930b6bf88784e298b4c32f6048299072cee86a570850029
{"success": true, "error": null, "results": {}}
9,705
0xa2a05d69fd61cef28c35729856152cd6bfdc5db0
/** * ELON TWEET https://twitter.com/elonmusk/status/1492666559277551616?s=20&t=HNQKfSDx5sXm_1mBLdLWUw * https://t.me/trillywillyeth */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract TRILLYWILLY is Context, IERC20, Ownable {/////////////////////////////////////////////////////////// using SafeMath for uint256; string private constant _name = "Trilly Willy";////////////////////////// string private constant _symbol = "Trilly";////////////////////////////////////////////////////////////////////////// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 2;//////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnBuy = 10;////////////////////////////////////////////////////////////////////// //Sell Fee uint256 private _redisFeeOnSell = 6;///////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnSell = 10;///////////////////////////////////////////////////////////////////// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x7B83FdF4e2545df0b7b3019072af80F5E772e9F0);///////////////////////////////////////////////// address payable private _marketingAddress = payable(0x7B83FdF4e2545df0b7b3019072af80F5E772e9F0);/////////////////////////////////////////////////// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 2000000000 * 10**9; //2% uint256 public _maxWalletSize = 4000000000* 10**9; //4% uint256 public _swapTokensAtAmount = 100000000 * 10**9; //0.1% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);///////////////////////////////////////////////// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610614578063dd62ed3e1461063d578063ea1644d51461067a578063f2fde38b146106a3576101cc565b8063a2a957bb1461055a578063a9059cbb14610583578063bfd79284146105c0578063c3c8cd80146105fd576101cc565b80638f70ccf7116100d15780638f70ccf7146104b25780638f9a55c0146104db57806395d89b411461050657806398a5c31514610531576101cc565b806374010ece146104335780637d1db4a51461045c5780638da5cb5b14610487576101cc565b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f81461039f5780636fc3eaec146103c857806370a08231146103df578063715018a61461041c576101cc565b8063313ce5671461032057806349bd5a5e1461034b5780636b99905314610376576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632fd689e3146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612f37565b6106cc565b005b34801561020657600080fd5b5061020f61081c565b60405161021c9190613380565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612ea3565b610859565b604051610259919061334a565b60405180910390f35b34801561026e57600080fd5b50610277610877565b6040516102849190613365565b60405180910390f35b34801561029957600080fd5b506102a261089d565b6040516102af9190613562565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612e54565b6108ae565b6040516102ec919061334a565b60405180910390f35b34801561030157600080fd5b5061030a610987565b6040516103179190613562565b60405180910390f35b34801561032c57600080fd5b5061033561098d565b60405161034291906135d7565b60405180910390f35b34801561035757600080fd5b50610360610996565b60405161036d919061332f565b60405180910390f35b34801561038257600080fd5b5061039d60048036038101906103989190612dc6565b6109bc565b005b3480156103ab57600080fd5b506103c660048036038101906103c19190612f78565b610aac565b005b3480156103d457600080fd5b506103dd610b5e565b005b3480156103eb57600080fd5b5061040660048036038101906104019190612dc6565b610c2f565b6040516104139190613562565b60405180910390f35b34801561042857600080fd5b50610431610c80565b005b34801561043f57600080fd5b5061045a60048036038101906104559190612fa1565b610dd3565b005b34801561046857600080fd5b50610471610e72565b60405161047e9190613562565b60405180910390f35b34801561049357600080fd5b5061049c610e78565b6040516104a9919061332f565b60405180910390f35b3480156104be57600080fd5b506104d960048036038101906104d49190612f78565b610ea1565b005b3480156104e757600080fd5b506104f0610f53565b6040516104fd9190613562565b60405180910390f35b34801561051257600080fd5b5061051b610f59565b6040516105289190613380565b60405180910390f35b34801561053d57600080fd5b5061055860048036038101906105539190612fa1565b610f96565b005b34801561056657600080fd5b50610581600480360381019061057c9190612fca565b611035565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612ea3565b6110ec565b6040516105b7919061334a565b60405180910390f35b3480156105cc57600080fd5b506105e760048036038101906105e29190612dc6565b61110a565b6040516105f4919061334a565b60405180910390f35b34801561060957600080fd5b5061061261112a565b005b34801561062057600080fd5b5061063b60048036038101906106369190612edf565b611203565b005b34801561064957600080fd5b50610664600480360381019061065f9190612e18565b611363565b6040516106719190613562565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190612fa1565b6113ea565b005b3480156106af57600080fd5b506106ca60048036038101906106c59190612dc6565b611489565b005b6106d461164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610761576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610758906134c2565b60405180910390fd5b60005b8151811015610818576001601060008484815181106107ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806108109061389c565b915050610764565b5050565b60606040518060400160405280600c81526020017f5472696c6c792057696c6c790000000000000000000000000000000000000000815250905090565b600061086d61086661164b565b8484611653565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600068056bc75e2d63100000905090565b60006108bb84848461181e565b61097c846108c761164b565b61097785604051806060016040528060288152602001613da960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061092d61164b565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120a39092919063ffffffff16565b611653565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109c461164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a48906134c2565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ab461164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b38906134c2565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b9f61164b565b73ffffffffffffffffffffffffffffffffffffffff161480610c155750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bfd61164b565b73ffffffffffffffffffffffffffffffffffffffff16145b610c1e57600080fd5b6000479050610c2c81612107565b50565b6000610c79600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612202565b9050919050565b610c8861164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0c906134c2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610ddb61164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f906134c2565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ea961164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2d906134c2565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600681526020017f5472696c6c790000000000000000000000000000000000000000000000000000815250905090565b610f9e61164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461102b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611022906134c2565b60405180910390fd5b8060188190555050565b61103d61164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c1906134c2565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b60006111006110f961164b565b848461181e565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661116b61164b565b73ffffffffffffffffffffffffffffffffffffffff1614806111e15750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111c961164b565b73ffffffffffffffffffffffffffffffffffffffff16145b6111ea57600080fd5b60006111f530610c2f565b905061120081612270565b50565b61120b61164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128f906134c2565b60405180910390fd5b60005b8383905081101561135d5781600560008686858181106112e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906112f99190612dc6565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806113559061389c565b91505061129b565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113f261164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461147f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611476906134c2565b60405180910390fd5b8060178190555050565b61149161164b565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461151e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611515906134c2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158590613422565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ba90613542565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172a90613442565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118119190613562565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561188e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188590613502565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f5906133a2565b60405180910390fd5b60008111611941576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611938906134e2565b60405180910390fd5b611949610e78565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119b75750611987610e78565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611da257601560149054906101000a900460ff16611a46576119d8610e78565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3c906133c2565b60405180910390fd5b5b601654811115611a8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8290613402565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b2f5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6590613462565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c1b5760175481611bd084610c2f565b611bda9190613698565b10611c1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1190613522565b60405180910390fd5b5b6000611c2630610c2f565b9050600060185482101590506016548210611c415760165491505b808015611c59575060158054906101000a900460ff16155b8015611cb35750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611ccb5750601560169054906101000a900460ff165b8015611d215750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d775750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611d9f57611d8582612270565b60004790506000811115611d9d57611d9c47612107565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e495750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611efc5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611efb5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f0a5760009050612091565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fb55750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fcd57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120785750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561209057600a54600c81905550600b54600d819055505b5b61209d84848484612568565b50505050565b60008383111582906120eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e29190613380565b60405180910390fd5b50600083856120fa9190613779565b9050809150509392505050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61215760028461259590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612182573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6121d360028461259590919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121fe573d6000803e3d6000fd5b5050565b6000600654821115612249576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612240906133e2565b60405180910390fd5b60006122536125df565b9050612268818461259590919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156122cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156122fb5781602001602082028036833780820191505090505b5090503081600081518110612339577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156123db57600080fd5b505afa1580156123ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124139190612def565b8160018151811061244d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506124b430601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611653565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161251895949392919061357d565b600060405180830381600087803b15801561253257600080fd5b505af1158015612546573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b806125765761257561260a565b5b61258184848461264d565b8061258f5761258e612818565b5b50505050565b60006125d783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061282c565b905092915050565b60008060006125ec61288f565b91509150612603818361259590919063ffffffff16565b9250505090565b6000600c5414801561261e57506000600d54145b156126285761264b565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061265f876128f1565b9550955095509550955095506126bd86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461295990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061275285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129a390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061279e81612a01565b6127a88483612abe565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128059190613562565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008083118290612873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161286a9190613380565b60405180910390fd5b506000838561288291906136ee565b9050809150509392505050565b60008060006006549050600068056bc75e2d6310000090506128c568056bc75e2d6310000060065461259590919063ffffffff16565b8210156128e45760065468056bc75e2d631000009350935050506128ed565b81819350935050505b9091565b600080600080600080600080600061290e8a600c54600d54612af8565b925092509250600061291e6125df565b905060008060006129318e878787612b8e565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061299b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120a3565b905092915050565b60008082846129b29190613698565b9050838110156129f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129ee90613482565b60405180910390fd5b8091505092915050565b6000612a0b6125df565b90506000612a228284612c1790919063ffffffff16565b9050612a7681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129a390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612ad38260065461295990919063ffffffff16565b600681905550612aee816007546129a390919063ffffffff16565b6007819055505050565b600080600080612b246064612b16888a612c1790919063ffffffff16565b61259590919063ffffffff16565b90506000612b4e6064612b40888b612c1790919063ffffffff16565b61259590919063ffffffff16565b90506000612b7782612b69858c61295990919063ffffffff16565b61295990919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612ba78589612c1790919063ffffffff16565b90506000612bbe8689612c1790919063ffffffff16565b90506000612bd58789612c1790919063ffffffff16565b90506000612bfe82612bf0858761295990919063ffffffff16565b61295990919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612c2a5760009050612c8c565b60008284612c38919061371f565b9050828482612c4791906136ee565b14612c87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7e906134a2565b60405180910390fd5b809150505b92915050565b6000612ca5612ca084613617565b6135f2565b90508083825260208201905082856020860282011115612cc457600080fd5b60005b85811015612cf45781612cda8882612cfe565b845260208401935060208301925050600181019050612cc7565b5050509392505050565b600081359050612d0d81613d63565b92915050565b600081519050612d2281613d63565b92915050565b60008083601f840112612d3a57600080fd5b8235905067ffffffffffffffff811115612d5357600080fd5b602083019150836020820283011115612d6b57600080fd5b9250929050565b600082601f830112612d8357600080fd5b8135612d93848260208601612c92565b91505092915050565b600081359050612dab81613d7a565b92915050565b600081359050612dc081613d91565b92915050565b600060208284031215612dd857600080fd5b6000612de684828501612cfe565b91505092915050565b600060208284031215612e0157600080fd5b6000612e0f84828501612d13565b91505092915050565b60008060408385031215612e2b57600080fd5b6000612e3985828601612cfe565b9250506020612e4a85828601612cfe565b9150509250929050565b600080600060608486031215612e6957600080fd5b6000612e7786828701612cfe565b9350506020612e8886828701612cfe565b9250506040612e9986828701612db1565b9150509250925092565b60008060408385031215612eb657600080fd5b6000612ec485828601612cfe565b9250506020612ed585828601612db1565b9150509250929050565b600080600060408486031215612ef457600080fd5b600084013567ffffffffffffffff811115612f0e57600080fd5b612f1a86828701612d28565b93509350506020612f2d86828701612d9c565b9150509250925092565b600060208284031215612f4957600080fd5b600082013567ffffffffffffffff811115612f6357600080fd5b612f6f84828501612d72565b91505092915050565b600060208284031215612f8a57600080fd5b6000612f9884828501612d9c565b91505092915050565b600060208284031215612fb357600080fd5b6000612fc184828501612db1565b91505092915050565b60008060008060808587031215612fe057600080fd5b6000612fee87828801612db1565b9450506020612fff87828801612db1565b935050604061301087828801612db1565b925050606061302187828801612db1565b91505092959194509250565b60006130398383613045565b60208301905092915050565b61304e816137ad565b82525050565b61305d816137ad565b82525050565b600061306e82613653565b6130788185613676565b935061308383613643565b8060005b838110156130b457815161309b888261302d565b97506130a683613669565b925050600181019050613087565b5085935050505092915050565b6130ca816137bf565b82525050565b6130d981613802565b82525050565b6130e881613826565b82525050565b60006130f98261365e565b6131038185613687565b9350613113818560208601613838565b61311c81613972565b840191505092915050565b6000613134602383613687565b915061313f82613983565b604082019050919050565b6000613157603f83613687565b9150613162826139d2565b604082019050919050565b600061317a602a83613687565b915061318582613a21565b604082019050919050565b600061319d601c83613687565b91506131a882613a70565b602082019050919050565b60006131c0602683613687565b91506131cb82613a99565b604082019050919050565b60006131e3602283613687565b91506131ee82613ae8565b604082019050919050565b6000613206602383613687565b915061321182613b37565b604082019050919050565b6000613229601b83613687565b915061323482613b86565b602082019050919050565b600061324c602183613687565b915061325782613baf565b604082019050919050565b600061326f602083613687565b915061327a82613bfe565b602082019050919050565b6000613292602983613687565b915061329d82613c27565b604082019050919050565b60006132b5602583613687565b91506132c082613c76565b604082019050919050565b60006132d8602383613687565b91506132e382613cc5565b604082019050919050565b60006132fb602483613687565b915061330682613d14565b604082019050919050565b61331a816137eb565b82525050565b613329816137f5565b82525050565b60006020820190506133446000830184613054565b92915050565b600060208201905061335f60008301846130c1565b92915050565b600060208201905061337a60008301846130d0565b92915050565b6000602082019050818103600083015261339a81846130ee565b905092915050565b600060208201905081810360008301526133bb81613127565b9050919050565b600060208201905081810360008301526133db8161314a565b9050919050565b600060208201905081810360008301526133fb8161316d565b9050919050565b6000602082019050818103600083015261341b81613190565b9050919050565b6000602082019050818103600083015261343b816131b3565b9050919050565b6000602082019050818103600083015261345b816131d6565b9050919050565b6000602082019050818103600083015261347b816131f9565b9050919050565b6000602082019050818103600083015261349b8161321c565b9050919050565b600060208201905081810360008301526134bb8161323f565b9050919050565b600060208201905081810360008301526134db81613262565b9050919050565b600060208201905081810360008301526134fb81613285565b9050919050565b6000602082019050818103600083015261351b816132a8565b9050919050565b6000602082019050818103600083015261353b816132cb565b9050919050565b6000602082019050818103600083015261355b816132ee565b9050919050565b60006020820190506135776000830184613311565b92915050565b600060a0820190506135926000830188613311565b61359f60208301876130df565b81810360408301526135b18186613063565b90506135c06060830185613054565b6135cd6080830184613311565b9695505050505050565b60006020820190506135ec6000830184613320565b92915050565b60006135fc61360d565b9050613608828261386b565b919050565b6000604051905090565b600067ffffffffffffffff82111561363257613631613943565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006136a3826137eb565b91506136ae836137eb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156136e3576136e26138e5565b5b828201905092915050565b60006136f9826137eb565b9150613704836137eb565b92508261371457613713613914565b5b828204905092915050565b600061372a826137eb565b9150613735836137eb565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561376e5761376d6138e5565b5b828202905092915050565b6000613784826137eb565b915061378f836137eb565b9250828210156137a2576137a16138e5565b5b828203905092915050565b60006137b8826137cb565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061380d82613814565b9050919050565b600061381f826137cb565b9050919050565b6000613831826137eb565b9050919050565b60005b8381101561385657808201518184015260208101905061383b565b83811115613865576000848401525b50505050565b61387482613972565b810181811067ffffffffffffffff8211171561389357613892613943565b5b80604052505050565b60006138a7826137eb565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156138da576138d96138e5565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613d6c816137ad565b8114613d7757600080fd5b50565b613d83816137bf565b8114613d8e57600080fd5b50565b613d9a816137eb565b8114613da557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200ce611d4259c5b4ee76614c02f28a94a624733356a32bd29a12b27474a34e3be64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,706
0x7f5059cc888744e2812c6f693a727e9d787189ec
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /* * Ownable * * Base contract with an owner. * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. */ contract Ownable { address public owner; function Ownable() { owner = msg.sender; } modifier onlyOwner() { if (msg.sender == owner) _; } function transferOwnership(address newOwner) onlyOwner { if (newOwner != address(0)) owner = newOwner; } } // @title Interface for contracts conforming to ERC-721 Non-Fungible Tokens // @author Dieter Shirley <span class="__cf_email__" data-cfemail="aacecfdecfeacbd2c3c5c7d0cfc484c9c5">[email&#160;protected]</span> (httpsgithub.comdete) contract ERC721 { //Required methods function approve(address _to, uint256 _tokenId) public; function balanceOf(address _owner) public view returns (uint256 balance); function implementsERC721() public pure returns (bool); function ownerOf(uint256 _tokenId) public view returns (address addr); function takeOwnership(uint256 _tokenId) public; function totalSupply() public view returns (uint256 total); function transferFrom(address _from, address _to, uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; event Transfer(address indexed from, address indexed to, uint256 tokenId); event Approval(address indexed owner, address indexed approved, uint256 tokenId); //Optional //function name() public view returns (string name); //function symbol() public view returns (string symbol); //function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId); //function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl); } contract Avatarium is Ownable, ERC721 { // --- Events --- // // @dev The Birth event is fired, whenever a new Avatar has been created. event Birth( uint256 tokenId, string name, address owner); // @dev The TokenSold event is fired, whenever a token is sold. event TokenSold( uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address winner, string name); // --- Constants --- // // The name and the symbol of the NFT, as defined in ERC-721. string public constant NAME = "Avatarium"; string public constant SYMBOL = "ΛV"; // Prices and iteration steps uint256 private startingPrice = 0.02 ether; uint256 private firstIterationLimit = 0.05 ether; uint256 private secondIterationLimit = 0.5 ether; // Addresses that can execute important functions. address public addressCEO; address public addressCOO; // --- Storage --- // // @dev A mapping from Avatar ID to the owner&#39;s address. mapping (uint => address) public avatarIndexToOwner; // @dev A mapping from the owner&#39;s address to the tokens it owns. mapping (address => uint256) public ownershipTokenCount; // @dev A mapping from Avatar&#39;s ID to an address that has been approved // to call transferFrom(). mapping (uint256 => address) public avatarIndexToApproved; // @dev A private mapping from Avatar&#39;s ID to its price. mapping (uint256 => uint256) private avatarIndexToPrice; // --- Datatypes --- // // The main struct struct Avatar { string name; } Avatar[] public avatars; // --- Access Modifiers --- // // @dev Access only to the CEO-functionality. modifier onlyCEO() { require(msg.sender == addressCEO); _; } // @dev Access only to the COO-functionality. modifier onlyCOO() { require(msg.sender == addressCOO); _; } // @dev Access to the C-level in general. modifier onlyCLevel() { require(msg.sender == addressCEO || msg.sender == addressCOO); _; } // --- Constructor --- // function Avatarium() public { addressCEO = msg.sender; addressCOO = msg.sender; } // --- Public functions --- // //@dev Assigns a new address as the CEO. Only available to the current CEO. function setCEO(address _newCEO) public onlyCEO { require(_newCEO != address(0)); addressCEO = _newCEO; } // @dev Assigns a new address as the COO. Only available to the current COO. function setCOO(address _newCOO) public onlyCEO { require(_newCOO != address(0)); addressCOO = _newCOO; } // @dev Grants another address the right to transfer a token via // takeOwnership() and transferFrom() function approve(address _to, uint256 _tokenId) public { // Check the ownership require(_owns(msg.sender, _tokenId)); avatarIndexToApproved[_tokenId] = _to; // Fire the event Approval(msg.sender, _to, _tokenId); } // @dev Checks the balanse of the address, ERC-721 compliance function balanceOf(address _owner) public view returns (uint256 balance) { return ownershipTokenCount[_owner]; } // @dev Creates a new Avatar function createAvatar(string _name, uint256 _rank) public onlyCLevel { _createAvatar(_name, address(this), _rank); } // @dev Returns the information on a certain Avatar function getAvatar(uint256 _tokenId) public view returns ( string avatarName, uint256 sellingPrice, address owner ) { Avatar storage avatar = avatars[_tokenId]; avatarName = avatar.name; sellingPrice = avatarIndexToPrice[_tokenId]; owner = avatarIndexToOwner[_tokenId]; } function implementsERC721() public pure returns (bool) { return true; } // @dev Queries the owner of the token. function ownerOf(uint256 _tokenId) public view returns (address owner) { owner = avatarIndexToOwner[_tokenId]; require(owner != address(0)); } function payout(address _to) public onlyCLevel { _payout(_to); } // @dev Allows to purchase an Avatar for Ether. function purchase(uint256 _tokenId) public payable { address oldOwner = avatarIndexToOwner[_tokenId]; address newOwner = msg.sender; uint256 sellingPrice = avatarIndexToPrice[_tokenId]; require(oldOwner != newOwner); require(_addressNotNull(newOwner)); require(msg.value == sellingPrice); uint256 payment = uint256(SafeMath.div( SafeMath.mul(sellingPrice, 94), 100)); uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice); // Updating prices if (sellingPrice < firstIterationLimit) { // first stage avatarIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 200), 94); } else if (sellingPrice < secondIterationLimit) { // second stage avatarIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 120), 94); } else { // third stage avatarIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 115), 94); } _transfer(oldOwner, newOwner, _tokenId); // Pay previous token Owner, if it&#39;s not the contract if (oldOwner != address(this)) { oldOwner.transfer(payment); } // Fire event TokenSold( _tokenId, sellingPrice, avatarIndexToPrice[_tokenId], oldOwner, newOwner, avatars[_tokenId].name); // Transferring excessess back to the sender msg.sender.transfer(purchaseExcess); } // @dev Queries the price of a token. function priceOf(uint256 _tokenId) public view returns (uint256 price) { return avatarIndexToPrice[_tokenId]; } //@dev Allows pre-approved user to take ownership of a token. function takeOwnership(uint256 _tokenId) public { address newOwner = msg.sender; address oldOwner = avatarIndexToOwner[_tokenId]; // Safety check to prevent against an unexpected 0x0 default. require(_addressNotNull(newOwner)); //Making sure transfer is approved require(_approved(newOwner, _tokenId)); _transfer(oldOwner, newOwner, _tokenId); } // @dev Required for ERC-721 compliance. function totalSupply() public view returns (uint256 total) { return avatars.length; } // @dev Owner initates the transfer of the token to another account. function transfer( address _to, uint256 _tokenId ) public { require(_owns(msg.sender, _tokenId)); require(_addressNotNull(_to)); _transfer(msg.sender, _to, _tokenId); } // @dev Third-party initiates transfer of token from address _from to // address _to. function transferFrom( address _from, address _to, uint256 _tokenId ) public { require(_owns(_from, _tokenId)); require(_approved(_to, _tokenId)); require(_addressNotNull(_to)); _transfer(_from, _to, _tokenId); } // --- Private Functions --- // // Safety check on _to address to prevent against an unexpected 0x0 default. function _addressNotNull(address _to) private pure returns (bool) { return _to != address(0); } // For checking approval of transfer for address _to function _approved(address _to, uint256 _tokenId) private view returns (bool) { return avatarIndexToApproved[_tokenId] == _to; } // For creating Avatars. function _createAvatar( string _name, address _owner, uint256 _rank) private { // Getting the startingPrice uint256 _price; if (_rank == 1) { _price = startingPrice; } else if (_rank == 2) { _price = 2 * startingPrice; } else if (_rank == 3) { _price = SafeMath.mul(4, startingPrice); } else if (_rank == 4) { _price = SafeMath.mul(8, startingPrice); } else if (_rank == 5) { _price = SafeMath.mul(16, startingPrice); } else if (_rank == 6) { _price = SafeMath.mul(32, startingPrice); } else if (_rank == 7) { _price = SafeMath.mul(64, startingPrice); } else if (_rank == 8) { _price = SafeMath.mul(128, startingPrice); } else if (_rank == 9) { _price = SafeMath.mul(256, startingPrice); } Avatar memory _avatar = Avatar({name: _name}); uint256 newAvatarId = avatars.push(_avatar) - 1; avatarIndexToPrice[newAvatarId] = _price; // Fire event Birth(newAvatarId, _name, _owner); // Transfer token to the contract _transfer(address(0), _owner, newAvatarId); } // @dev Checks for token ownership. function _owns(address claimant, uint256 _tokenId) private view returns (bool) { return claimant == avatarIndexToOwner[_tokenId]; } // @dev Pays out balance on contract function _payout(address _to) private { if (_to == address(0)) { addressCEO.transfer(this.balance); } else { _to.transfer(this.balance); } } // @dev Assigns ownership of a specific Avatar to an address. function _transfer(address _from, address _to, uint256 _tokenId) private { ownershipTokenCount[_to]++; avatarIndexToOwner[_tokenId] = _to; if (_from != address(0)) { ownershipTokenCount[_from]--; delete avatarIndexToApproved[_tokenId]; } // Fire event Transfer(_from, _to, _tokenId); } }
0x606060405260043610610149576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461014e5780630b7e9c44146101905780631051db34146101c95780631328ec9b146101f657806318160ddd146102cc5780632362e649146102f557806323b872dd1461035857806327d7874c146103b95780632ba73c15146103f25780632f8803bb1461042b5780634a1df335146104805780636352211e146104d557806370a0823114610538578063834d5fac146105855780638da5cb5b1461063e5780639e17756e14610693578063a3f4df7e146106f6578063a9059cbb14610784578063b2e6ceeb146107c6578063b9186d7d146107e9578063cec21acb14610820578063d1d933181461086d578063efef39a1146108d3578063f2fde38b146108eb578063f76f8d7814610924575b600080fd5b341561015957600080fd5b61018e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109b2565b005b341561019b57600080fd5b6101c7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a82565b005b34156101d457600080fd5b6101dc610b42565b604051808215151515815260200191505060405180910390f35b341561020157600080fd5b6102176004808035906020019091905050610b4b565b60405180806020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825285818151815260200191508051906020019080838360005b8381101561028f578082015181840152602081019050610274565b50505050905090810190601f1680156102bc5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34156102d757600080fd5b6102df610c67565b6040518082815260200191505060405180910390f35b341561030057600080fd5b6103166004808035906020019091905050610c74565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561036357600080fd5b6103b7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ca7565b005b34156103c457600080fd5b6103f0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cf5565b005b34156103fd57600080fd5b610429600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610dd1565b005b341561043657600080fd5b61043e610ead565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561048b57600080fd5b610493610ed3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104e057600080fd5b6104f66004808035906020019091905050610ef9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561054357600080fd5b61056f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f72565b6040518082815260200191505060405180910390f35b341561059057600080fd5b6105a66004808035906020019091905050610fbb565b604051808060200182810382528381815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561062f5780601f106106045761010080835404028352916020019161062f565b820191906000526020600020905b81548152906001019060200180831161061257829003601f168201915b50509250505060405180910390f35b341561064957600080fd5b610651610fe4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561069e57600080fd5b6106b46004808035906020019091905050611009565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561070157600080fd5b61070961103c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561074957808201518184015260208101905061072e565b50505050905090810190601f1680156107765780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561078f57600080fd5b6107c4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611075565b005b34156107d157600080fd5b6107e760048080359060200190919050506110ad565b005b34156107f457600080fd5b61080a6004808035906020019091905050611122565b6040518082815260200191505060405180910390f35b341561082b57600080fd5b610857600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061113f565b6040518082815260200191505060405180910390f35b341561087857600080fd5b6108d1600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091908035906020019091905050611157565b005b6108e9600480803590602001909190505061121a565b005b34156108f657600080fd5b610922600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506115c5565b005b341561092f57600080fd5b610937611695565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561097757808201518184015260208101905061095c565b50505050905090810190601f1680156109a45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6109bc33826116ce565b15156109c757600080fd5b816008600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610b2b5750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610b3657600080fd5b610b3f8161173a565b50565b60006001905090565b610b53611d8a565b6000806000600a85815481101515610b6757fe5b90600052602060002090019050806000018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c0c5780601f10610be157610100808354040283529160200191610c0c565b820191906000526020600020905b815481529060010190602001808311610bef57829003601f168201915b50505050509350600960008681526020019081526020016000205492506006600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150509193909250565b6000600a80549050905090565b60086020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610cb183826116ce565b1515610cbc57600080fd5b610cc68282611848565b1515610cd157600080fd5b610cda826118b4565b1515610ce557600080fd5b610cf08383836118ed565b505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d5157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610d8d57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e2d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e6957600080fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f6d57600080fd5b919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600a81815481101515610fca57fe5b906000526020600020900160009150905080600001905081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600981526020017f41766174617269756d000000000000000000000000000000000000000000000081525081565b61107f33826116ce565b151561108a57600080fd5b611093826118b4565b151561109e57600080fd5b6110a93383836118ed565b5050565b6000803391506006600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506110f2826118b4565b15156110fd57600080fd5b6111078284611848565b151561111257600080fd5b61111d8183856118ed565b505050565b600060096000838152602001908152602001600020549050919050565b60076020528060005260406000206000915090505481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806112005750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561120b57600080fd5b611216823083611ab5565b5050565b60008060008060006006600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169450339350600960008781526020019081526020016000205492508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141515156112ac57600080fd5b6112b5846118b4565b15156112c057600080fd5b82341415156112ce57600080fd5b6112e36112dc84605e611d1b565b6064611d56565b91506112ef3484611d71565b905060025483101561132c576113106113098460c8611d1b565b605e611d56565b6009600088815260200190815260200160002081905550611395565b6003548310156113675761134b611344846078611d1b565b605e611d56565b6009600088815260200190815260200160002081905550611394565b61137c611375846073611d1b565b605e611d56565b60096000888152602001908152602001600020819055505b5b6113a08585886118ed565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141515611416578473ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561141557600080fd5b5b7e8201e7bcbf010c2c07de59d6e97cb7e3cf67a46125c49cbc89b9d2cde1f48f8684600960008a8152602001908152602001600020548888600a8c81548110151561145d57fe5b9060005260206000209001600001604051808781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528381815460018160011615610100020316600290048152602001915080546001816001161561010002031660029004801561156a5780601f1061153f5761010080835404028352916020019161156a565b820191906000526020600020905b81548152906001019060200180831161154d57829003601f168201915b505097505050505050505060405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156115bd57600080fd5b505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561169257600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561169157806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b50565b6040805190810160405280600381526020017fce9b56000000000000000000000000000000000000000000000000000000000081525081565b60006006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156117ed57600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015156117e857600080fd5b611845565b8073ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561184457600080fd5b5b50565b60008273ffffffffffffffffffffffffffffffffffffffff166008600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505550816006600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515611a4b57600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001900391905055506008600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000611abf611d9e565b60006001841415611ad4576001549250611bba565b6002841415611aea576001546002029250611bb9565b6003841415611b0757611b006004600154611d1b565b9250611bb8565b6004841415611b2457611b1d6008600154611d1b565b9250611bb7565b6005841415611b4157611b3a6010600154611d1b565b9250611bb6565b6006841415611b5e57611b576020600154611d1b565b9250611bb5565b6007841415611b7b57611b746040600154611d1b565b9250611bb4565b6008841415611b9857611b916080600154611d1b565b9250611bb3565b6009841415611bb257611baf610100600154611d1b565b92505b5b5b5b5b5b5b5b5b6020604051908101604052808781525091506001600a8054806001018281611be29190611db8565b916000526020600020900160008590919091506000820151816000019080519060200190611c11929190611de4565b5050500390508260096000838152602001908152602001600020819055507fb3b0cf861f168bcdb275c69da97b2543631552ba562628aa3c7317d4a6089ef281878760405180848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015611ccb578082015181840152602081019050611cb0565b50505050905090810190601f168015611cf85780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1611d13600086836118ed565b505050505050565b6000806000841415611d305760009150611d4f565b8284029050828482811515611d4157fe5b04141515611d4b57fe5b8091505b5092915050565b6000808284811515611d6457fe5b0490508091505092915050565b6000828211151515611d7f57fe5b818303905092915050565b602060405190810160405280600081525090565b602060405190810160405280611db2611e64565b81525090565b815481835581811511611ddf57818360005260206000209182019101611dde9190611e78565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611e2557805160ff1916838001178555611e53565b82800160010185558215611e53579182015b82811115611e52578251825591602001919060010190611e37565b5b509050611e609190611ea7565b5090565b602060405190810160405280600081525090565b611ea491905b80821115611ea05760008082016000611e979190611ecc565b50600101611e7e565b5090565b90565b611ec991905b80821115611ec5576000816000905550600101611ead565b5090565b90565b50805460018160011615610100020316600290046000825580601f10611ef25750611f11565b601f016020900490600052602060002090810190611f109190611ea7565b5b505600a165627a7a72305820132bb6ef03c66b8468d0e98e27a0e1655f6472a9363549db4b0149094b5de6200029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,707
0x864de9e8dfe7477c2eda4de13a6cac52500d22f7
pragma solidity 0.4.21; // zeppelin-solidity: 1.9.0 /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } /** * @title Standard Burnable Token * @dev Adds burnFrom method to ERC20 implementations */ contract StandardBurnableToken is BurnableToken, StandardToken { /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param _from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned */ function burnFrom(address _from, uint256 _value) public { require(_value <= allowed[_from][msg.sender]); // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); _burn(_from, _value); } } contract TutorialToken is StandardBurnableToken,Ownable { address public WalletHolder; string public constant name = "SLA"; string public constant symbol = "SLAVA Token"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 880000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives WalletHolder all of existing tokens. */ function TutorialToken(address _WalletHolder) public { require(_WalletHolder != address(0)); WalletHolder = _WalletHolder; totalSupply_ = INITIAL_SUPPLY; balances[WalletHolder] = INITIAL_SUPPLY; emit Transfer(address(this), msg.sender, INITIAL_SUPPLY); } /** * @dev Don't accept ETH. */ function () public payable { revert(); } }
0x6060604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f5578063095ea7b31461017f57806318160ddd146101b557806323b872dd146101da5780632ff2e9dc14610202578063313ce5671461021557806342966c681461023e57806366188463146102565780636b24d8271461027857806370a08231146102a757806379cc6790146102c65780638da5cb5b146102e857806395d89b41146102fb578063a9059cbb1461030e578063d73dd62314610330578063dd62ed3e14610352578063f2fde38b14610377575b600080fd5b341561010057600080fd5b610108610396565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014457808201518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018a57600080fd5b6101a1600160a060020a03600435166024356103cd565b604051901515815260200160405180910390f35b34156101c057600080fd5b6101c8610439565b60405190815260200160405180910390f35b34156101e557600080fd5b6101a1600160a060020a036004358116906024351660443561043f565b341561020d57600080fd5b6101c86105bf565b341561022057600080fd5b6102286105cf565b60405160ff909116815260200160405180910390f35b341561024957600080fd5b6102546004356105d4565b005b341561026157600080fd5b6101a1600160a060020a03600435166024356105e1565b341561028357600080fd5b61028b6106db565b604051600160a060020a03909116815260200160405180910390f35b34156102b257600080fd5b6101c8600160a060020a03600435166106ea565b34156102d157600080fd5b610254600160a060020a0360043516602435610705565b34156102f357600080fd5b61028b6107a4565b341561030657600080fd5b6101086107b3565b341561031957600080fd5b6101a1600160a060020a03600435166024356107ea565b341561033b57600080fd5b6101a1600160a060020a03600435166024356108fc565b341561035d57600080fd5b6101c8600160a060020a03600435811690602435166109a0565b341561038257600080fd5b610254600160a060020a03600435166109cb565b60408051908101604052600381527f534c410000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000600160a060020a038316151561045657600080fd5b600160a060020a03841660009081526020819052604090205482111561047b57600080fd5b600160a060020a03808516600090815260026020908152604080832033909416835292905220548211156104ae57600080fd5b600160a060020a0384166000908152602081905260409020546104d7908363ffffffff610a6616565b600160a060020a03808616600090815260208190526040808220939093559085168152205461050c908363ffffffff610a7816565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610552908363ffffffff610a6616565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b6b02d7eb3f96e070d97000000081565b601281565b6105de3382610a8b565b50565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561063e57600160a060020a033381166000908152600260209081526040808320938816835292905290812055610675565b61064e818463ffffffff610a6616565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600454600160a060020a031681565b600160a060020a031660009081526020819052604090205490565b600160a060020a038083166000908152600260209081526040808320339094168352929052205481111561073857600080fd5b600160a060020a038083166000908152600260209081526040808320339094168352929052205461076f908263ffffffff610a6616565b600160a060020a03808416600090815260026020908152604080832033909416835292905220556107a08282610a8b565b5050565b600354600160a060020a031681565b60408051908101604052600b81527f534c41564120546f6b656e000000000000000000000000000000000000000000602082015281565b6000600160a060020a038316151561080157600080fd5b600160a060020a03331660009081526020819052604090205482111561082657600080fd5b600160a060020a03331660009081526020819052604090205461084f908363ffffffff610a6616565b600160a060020a033381166000908152602081905260408082209390935590851681522054610884908363ffffffff610a7816565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610934908363ffffffff610a7816565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146109e657600080fd5b600160a060020a03811615156109fb57600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610a7257fe5b50900390565b81810182811015610a8557fe5b92915050565b600160a060020a038216600090815260208190526040902054811115610ab057600080fd5b600160a060020a038216600090815260208190526040902054610ad9908263ffffffff610a6616565b600160a060020a038316600090815260208190526040902055600154610b05908263ffffffff610a6616565b600155600160a060020a0382167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a26000600160a060020a0383167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a350505600a165627a7a723058202de93a8f2a8568768efe7756a2cd24cbbc008750e1aced46e3f222024f5fb1c80029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,708
0x82bF557b9C0Dde02001cFE4595A0854983325278
/* Be aware of scammers! Scammers will try to social engineer you by phishing technique. Telegram: https://t.me/pinkshibacommunity Twitter: https://twitter.com/PinkShibacom Official Website: https://pinkshiba.com Marketing paid Liqudity Locked Ownership renounced No Dev wallets Front-runner bots prevention CG & CMC listing: Checked */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract PinkShiba is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Pink Shiba"; string private constant _symbol = "PINKSHIBA"; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable marketingWalletAddress) { _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer( address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal ); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 5; _teamFee = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _taxFee = 5; _teamFee = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 5000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x6080604052600436106100f75760003560e01c8063715018a61161008a578063b515566a11610059578063b515566a146102cb578063c9567bf9146102eb578063d543dbeb14610300578063dd62ed3e1461032057600080fd5b8063715018a61461023c5780638da5cb5b1461025157806395d89b4114610279578063a9059cbb146102ab57600080fd5b8063273123b7116100c6578063273123b7146101be578063313ce567146101e05780635932ead1146101fc57806370a082311461021c57600080fd5b806306fdde0314610103578063095ea7b31461014857806318160ddd1461017857806323b872dd1461019e57600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b5060408051808201909152600a81526950696e6b20536869626160b01b60208201525b60405161013f919061184f565b60405180910390f35b34801561015457600080fd5b506101686101633660046116e0565b610366565b604051901515815260200161013f565b34801561018457600080fd5b50683635c9adc5dea000005b60405190815260200161013f565b3480156101aa57600080fd5b506101686101b93660046116a0565b61037d565b3480156101ca57600080fd5b506101de6101d9366004611630565b6103e6565b005b3480156101ec57600080fd5b506040516009815260200161013f565b34801561020857600080fd5b506101de6102173660046117d2565b61043a565b34801561022857600080fd5b50610190610237366004611630565b610482565b34801561024857600080fd5b506101de6104a4565b34801561025d57600080fd5b506000546040516001600160a01b03909116815260200161013f565b34801561028557600080fd5b5060408051808201909152600981526850494e4b534849424160b81b6020820152610132565b3480156102b757600080fd5b506101686102c63660046116e0565b610518565b3480156102d757600080fd5b506101de6102e636600461170b565b610525565b3480156102f757600080fd5b506101de6105c9565b34801561030c57600080fd5b506101de61031b36600461180a565b61098c565b34801561032c57600080fd5b5061019061033b366004611668565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000610373338484610a5f565b5060015b92915050565b600061038a848484610b83565b6103dc84336103d785604051806060016040528060288152602001611a23602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f0b565b610a5f565b5060019392505050565b6000546001600160a01b031633146104195760405162461bcd60e51b8152600401610410906118a2565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104645760405162461bcd60e51b8152600401610410906118a2565b60108054911515600160b81b0260ff60b81b19909216919091179055565b6001600160a01b03811660009081526002602052604081205461037790610f45565b6000546001600160a01b031633146104ce5760405162461bcd60e51b8152600401610410906118a2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610373338484610b83565b6000546001600160a01b0316331461054f5760405162461bcd60e51b8152600401610410906118a2565b60005b81518110156105c55760016006600084848151811061058157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105bd816119b5565b915050610552565b5050565b6000546001600160a01b031633146105f35760405162461bcd60e51b8152600401610410906118a2565b601054600160a01b900460ff161561064d5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610410565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561068a3082683635c9adc5dea00000610a5f565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156106c357600080fd5b505afa1580156106d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fb919061164c565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561074357600080fd5b505afa158015610757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077b919061164c565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fb919061164c565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d719473061082b81610482565b6000806108406000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156108a357600080fd5b505af11580156108b7573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108dc9190611822565b505060108054674563918244f4000060115563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561095457600080fd5b505af1158015610968573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c591906117ee565b6000546001600160a01b031633146109b65760405162461bcd60e51b8152600401610410906118a2565b60008111610a065760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610410565b610a246064610a1e683635c9adc5dea0000084610fc9565b90611048565b60118190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610ac15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610410565b6001600160a01b038216610b225760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610410565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610be75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610410565b6001600160a01b038216610c495760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610410565b60008111610cab5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610410565b6005600a908155600b556000546001600160a01b03848116911614801590610ce157506000546001600160a01b03838116911614155b15610eae576001600160a01b03831660009081526006602052604090205460ff16158015610d2857506001600160a01b03821660009081526006602052604090205460ff16155b610d3157600080fd5b6010546001600160a01b038481169116148015610d5c5750600f546001600160a01b03838116911614155b8015610d8157506001600160a01b03821660009081526005602052604090205460ff16155b8015610d965750601054600160b81b900460ff165b15610df357601154811115610daa57600080fd5b6001600160a01b0382166000908152600760205260409020544211610dce57600080fd5b610dd942601e611947565b6001600160a01b0383166000908152600760205260409020555b6010546001600160a01b038381169116148015610e1e5750600f546001600160a01b03848116911614155b8015610e4357506001600160a01b03831660009081526005602052604090205460ff16155b15610e53576005600a908155600b555b6000610e5e30610482565b601054909150600160a81b900460ff16158015610e8957506010546001600160a01b03858116911614155b8015610e9e5750601054600160b01b900460ff165b15610eac57610eac8161108a565b505b6001600160a01b03831660009081526005602052604090205460019060ff1680610ef057506001600160a01b03831660009081526005602052604090205460ff165b15610ef9575060005b610f058484848461122f565b50505050565b60008184841115610f2f5760405162461bcd60e51b8152600401610410919061184f565b506000610f3c848661199e565b95945050505050565b6000600854821115610fac5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610410565b6000610fb661125d565b9050610fc28382611048565b9392505050565b600082610fd857506000610377565b6000610fe4838561197f565b905082610ff1858361195f565b14610fc25760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610410565b6000610fc283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611280565b6010805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110e057634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561113457600080fd5b505afa158015611148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116c919061164c565b8160018151811061118d57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600f546111b39130911684610a5f565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111ec9085906000908690309042906004016118d7565b600060405180830381600087803b15801561120657600080fd5b505af115801561121a573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b8061123c5761123c6112ae565b6112478484846112dc565b80610f0557610f05600c54600a55600d54600b55565b600080600061126a6113d3565b90925090506112798282611048565b9250505090565b600081836112a15760405162461bcd60e51b8152600401610410919061184f565b506000610f3c848661195f565b600a541580156112be5750600b54155b156112c557565b600a8054600c55600b8054600d5560009182905555565b6000806000806000806112ee87611415565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113209087611472565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461134f90866114b4565b6001600160a01b03891660009081526002602052604090205561137181611513565b61137b848361155d565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113c091815260200190565b60405180910390a3505050505050505050565b6008546000908190683635c9adc5dea000006113ef8282611048565b82101561140c57505060085492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006114328a600a54600b54611581565b925092509250600061144261125d565b905060008060006114558e8787876115d0565b919e509c509a509598509396509194505050505091939550919395565b6000610fc283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f0b565b6000806114c18385611947565b905083811015610fc25760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610410565b600061151d61125d565b9050600061152b8383610fc9565b3060009081526002602052604090205490915061154890826114b4565b30600090815260026020526040902055505050565b60085461156a9083611472565b60085560095461157a90826114b4565b6009555050565b60008080806115956064610a1e8989610fc9565b905060006115a86064610a1e8a89610fc9565b905060006115c0826115ba8b86611472565b90611472565b9992985090965090945050505050565b60008080806115df8886610fc9565b905060006115ed8887610fc9565b905060006115fb8888610fc9565b9050600061160d826115ba8686611472565b939b939a50919850919650505050505050565b803561162b816119fc565b919050565b600060208284031215611641578081fd5b8135610fc2816119fc565b60006020828403121561165d578081fd5b8151610fc2816119fc565b6000806040838503121561167a578081fd5b8235611685816119fc565b91506020830135611695816119fc565b809150509250929050565b6000806000606084860312156116b4578081fd5b83356116bf816119fc565b925060208401356116cf816119fc565b929592945050506040919091013590565b600080604083850312156116f2578182fd5b82356116fd816119fc565b946020939093013593505050565b6000602080838503121561171d578182fd5b823567ffffffffffffffff80821115611734578384fd5b818501915085601f830112611747578384fd5b813581811115611759576117596119e6565b8060051b604051601f19603f8301168101818110858211171561177e5761177e6119e6565b604052828152858101935084860182860187018a101561179c578788fd5b8795505b838610156117c5576117b181611620565b8552600195909501949386019386016117a0565b5098975050505050505050565b6000602082840312156117e3578081fd5b8135610fc281611a14565b6000602082840312156117ff578081fd5b8151610fc281611a14565b60006020828403121561181b578081fd5b5035919050565b600080600060608486031215611836578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561187b5785810183015185820160400152820161185f565b8181111561188c5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119265784516001600160a01b031683529383019391830191600101611901565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561195a5761195a6119d0565b500190565b60008261197a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611999576119996119d0565b500290565b6000828210156119b0576119b06119d0565b500390565b60006000198214156119c9576119c96119d0565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611a1157600080fd5b50565b8015158114611a1157600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203db0831e818e2498adc597cd606a70f3235ccaced97cae3e4e9ff18f7df5600864736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,709
0xa84a51c521cd87beb3f9330819d10f3d84de3df1
// based on Bryn Bellomy code // https://medium.com/@bryn.bellomy/solidity-tutorial-building-a-simple-auction-contract-fcc918b0878a // // updated to 0.4.21 standard, replaced blocks with time, converted to hot potato style by Chibi Fighters // added custom start command for owner so they don't take off immidiately // pragma solidity ^0.4.21; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, returns 0 if it would go into minus range. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { if (b >= a) { return 0; } return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract AuctionPotato { using SafeMath for uint256; // static address public owner; uint public startTime; uint public endTime; string public infoUrl; string name; // start auction manually at given time bool started; // pototo uint public potato; uint oldPotato; uint oldHighestBindingBid; // transfer ownership address creatureOwner; address creature_newOwner; event CreatureOwnershipTransferred(address indexed _from, address indexed _to); // state bool public canceled; uint public highestBindingBid; address public highestBidder; // used to immidiately block placeBids bool blockerPay; bool blockerWithdraw; mapping(address => uint256) public fundsByBidder; bool ownerHasWithdrawn; event LogBid(address bidder, address highestBidder, uint oldHighestBindingBid, uint highestBindingBid); event LogWithdrawal(address withdrawer, address withdrawalAccount, uint amount); event LogCanceled(); // initial settings on contract creation constructor() public { blockerWithdraw = false; blockerPay = false; owner = msg.sender; creatureOwner = owner; // 0.002 ETH highestBindingBid = 2000000000000000; potato = 0; started = false; name = "Stomper"; infoUrl = "https://chibifighters.io"; } function getHighestBid() internal constant returns (uint) { return fundsByBidder[highestBidder]; } // query remaining time // this should not be used, query endTime once and then calculate it in your frontend // it's helpful when you want to debug in remix function timeLeft() public view returns (uint time) { if (now >= endTime) return 0; return endTime - now; } function auctionName() public view returns (string _name) { return name; } // calculates the next bid amount to you can have a oneclick buy button function nextBid() public view returns (uint _nextBid) { return highestBindingBid.add(potato); } // calculates the bid after the current bid so nifty hackers can skip the queue // this is not in our frontend and no one knows if it actually works function nextNextBid() public view returns (uint _nextBid) { return highestBindingBid.add(potato).add((highestBindingBid.add(potato)).mul(4).div(9)); } // command to start the auction function startAuction(string _name, uint _duration_secs) public onlyOwner returns (bool success){ require(started == false); started = true; startTime = now; endTime = now + _duration_secs; name = _name; return true; } function isStarted() public view returns (bool success) { return started; } function placeBid() public payable onlyAfterStart onlyBeforeEnd onlyNotCanceled onlyNotOwner returns (bool success) { // we are only allowing to increase in bidIncrements to make for true hot potato style require(msg.value == highestBindingBid.add(potato)); require(msg.sender != highestBidder); require(started == true); require(blockerPay == false); blockerPay = true; // calculate the user's total bid based on the current amount they've sent to the contract // plus whatever has been sent with this transaction fundsByBidder[msg.sender] = fundsByBidder[msg.sender].add(highestBindingBid); fundsByBidder[highestBidder] = fundsByBidder[highestBidder].add(potato); oldHighestBindingBid = highestBindingBid; // set new highest bidder highestBidder = msg.sender; highestBindingBid = highestBindingBid.add(potato); // 40% potato results in ~6% 2/7 // 44% potato results in ? 13% 4/9 // 50% potato results in ~16% /2 oldPotato = potato; potato = highestBindingBid.mul(4).div(9); emit LogBid(msg.sender, highestBidder, oldHighestBindingBid, highestBindingBid); blockerPay = false; return true; } function cancelAuction() public onlyOwner onlyBeforeEnd onlyNotCanceled returns (bool success) { canceled = true; emit LogCanceled(); return true; } function withdraw() public // can withdraw once overbid returns (bool success) { require(blockerWithdraw == false); blockerWithdraw = true; address withdrawalAccount; uint withdrawalAmount; if (canceled) { // if the auction was canceled, everyone should simply be allowed to withdraw their funds withdrawalAccount = msg.sender; withdrawalAmount = fundsByBidder[withdrawalAccount]; // set funds to 0 fundsByBidder[withdrawalAccount] = 0; } // owner can withdraw once auction is cancelled or ended if (ownerHasWithdrawn == false && msg.sender == owner && (canceled == true || now > endTime)) { withdrawalAccount = owner; withdrawalAmount = highestBindingBid.sub(oldPotato); ownerHasWithdrawn = true; // set funds to 0 fundsByBidder[withdrawalAccount] = 0; } // overbid people can withdraw their bid + profit // exclude owner because he is set above if (!canceled && (msg.sender != highestBidder && msg.sender != owner)) { withdrawalAccount = msg.sender; withdrawalAmount = fundsByBidder[withdrawalAccount]; fundsByBidder[withdrawalAccount] = 0; } // highest bidder can withdraw leftovers if he didn't before if (!canceled && msg.sender == highestBidder && msg.sender != owner) { withdrawalAccount = msg.sender; withdrawalAmount = fundsByBidder[withdrawalAccount].sub(oldHighestBindingBid); fundsByBidder[withdrawalAccount] = fundsByBidder[withdrawalAccount].sub(withdrawalAmount); } if (withdrawalAmount == 0) revert(); // send the funds msg.sender.transfer(withdrawalAmount); emit LogWithdrawal(msg.sender, withdrawalAccount, withdrawalAmount); blockerWithdraw = false; return true; } // amount owner can withdraw after auction ended // that way you can easily compare the contract balance with your amount // if there is more in the contract than your balance someone didn't withdraw // let them know that :) function ownerCanWithdraw() public view returns (uint amount) { return highestBindingBid.sub(oldPotato); } // just in case the contract is bust and can't pay // should never be needed but who knows function fuelContract() public onlyOwner payable { } function balance() public view returns (uint _balance) { return address(this).balance; } modifier onlyOwner { require(msg.sender == owner); _; } modifier onlyNotOwner { require(msg.sender != owner); _; } modifier onlyAfterStart { if (now < startTime) revert(); _; } modifier onlyBeforeEnd { if (now > endTime) revert(); _; } modifier onlyNotCanceled { if (canceled) revert(); _; } // who owns the creature (not necessarily auction winner) function queryCreatureOwner() public view returns (address _creatureOwner) { return creatureOwner; } // transfer ownership for auction winners in case they want to trade the creature before release function transferCreatureOwnership(address _newOwner) public { require(msg.sender == creatureOwner); creature_newOwner = _newOwner; } // buyer needs to confirm the transfer function acceptCreatureOwnership() public { require(msg.sender == creature_newOwner); emit CreatureOwnershipTransferred(creatureOwner, creature_newOwner); creatureOwner = creature_newOwner; creature_newOwner = address(0); } }
0x60806040526004361061013d5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630a1dfb5a81146101425780631300a6d114610169578063271515261461017e5780633167e9d2146101935780633197cbb61461021d578063364d2a06146102325780633ccfd60b146102635780633f9942ff1461028c578063544736e6146102a15780636e7d9dc6146102b657806378e97925146102d95780638252b2cf146102ee57806384fdec8314610303578063862882e5146103185780638da5cb5b146103735780638fa8b7901461038857806391f901571461039d578063b4f3625e146103b2578063b69ef8a8146103ba578063c63d99db146103cf578063ce10cf80146103e4578063ecfc7ecc14610405578063f5b56c561461040d578063f8dcc9a914610422575b600080fd5b34801561014e57600080fd5b50610157610437565b60408051918252519081900360200190f35b34801561017557600080fd5b5061015761049c565b34801561018a57600080fd5b506101576104ba565b34801561019f57600080fd5b506101a86104d3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101e25781810151838201526020016101ca565b50505050905090810190601f16801561020f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022957600080fd5b50610157610561565b34801561023e57600080fd5b50610247610567565b60408051600160a060020a039092168252519081900360200190f35b34801561026f57600080fd5b50610278610576565b604080519115158252519081900360200190f35b34801561029857600080fd5b5061027861087e565b3480156102ad57600080fd5b5061027861088e565b3480156102c257600080fd5b506102d7600160a060020a0360043516610897565b005b3480156102e557600080fd5b506101576108e1565b3480156102fa57600080fd5b506102d76108e7565b34801561030f57600080fd5b50610157610975565b34801561032457600080fd5b506040805160206004803580820135601f8101849004840285018401909552848452610278943694929360249392840191908190840183828082843750949750509335945061098e9350505050565b34801561037f57600080fd5b506102476109f3565b34801561039457600080fd5b50610278610a02565b3480156103a957600080fd5b50610247610a97565b6102d7610aa6565b3480156103c657600080fd5b50610157610ac3565b3480156103db57600080fd5b506101a8610ad1565b3480156103f057600080fd5b50610157600160a060020a0360043516610b67565b610278610b79565b34801561041957600080fd5b50610157610dbb565b34801561042e57600080fd5b50610157610dc1565b60006104966104756009610469600461045d600654600b54610dc790919063ffffffff16565b9063ffffffff610de116565b9063ffffffff610e0c16565b600654600b5461048a9163ffffffff610dc716565b9063ffffffff610dc716565b90505b90565b60025460009042106104b057506000610499565b4260025403905090565b6000610496600654600b54610dc790919063ffffffff16565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105595780601f1061052e57610100808354040283529160200191610559565b820191906000526020600020905b81548152906001019060200180831161053c57829003601f168201915b505050505081565b60025481565b600954600160a060020a031690565b600c54600090819081907501000000000000000000000000000000000000000000900460ff16156105a657600080fd5b600c805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055600a5460a060020a900460ff161561061057505033600160a060020a0381166000908152600d6020526040812080549190555b600e5460ff16158015610631575060005433600160a060020a039081169116145b80156106565750600a5460a060020a900460ff16151560011480610656575060025442115b156106aa57600054600754600b54600160a060020a039092169350610681919063ffffffff610e2316565b600e805460ff19166001179055600160a060020a0383166000908152600d602052604081205590505b600a5460a060020a900460ff161580156106ed5750600c5433600160a060020a039081169116148015906106ed575060005433600160a060020a03908116911614155b1561071357505033600160a060020a0381166000908152600d6020526040812080549190555b600a5460a060020a900460ff1615801561073b5750600c5433600160a060020a039081169116145b8015610756575060005433600160a060020a03908116911614155b156107ca5760085433600160a060020a0381166000908152600d602052604090205490935061078491610e23565b600160a060020a0383166000908152600d60205260409020549091506107b0908263ffffffff610e2316565b600160a060020a0383166000908152600d60205260409020555b8015156107d657600080fd5b604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015801561080c573d6000803e3d6000fd5b5060408051600160a060020a0333811682528416602082015280820183905290517f0ec497a8ae5b1ba29c60470ef651def995fac3deebbdcc56c47a4e5f51a4c2bd9181900360600190a15050600c805475ff0000000000000000000000000000000000000000001916905550600190565b600a5460a060020a900460ff1681565b60055460ff1690565b60095433600160a060020a039081169116146108b257600080fd5b600a805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015481565b600a5433600160a060020a0390811691161461090257600080fd5b600a54600954604051600160a060020a0392831692909116907fb203999f7181ad68ccff83512016b085781e2be550d2142ab1e0faddd6080aa890600090a3600a80546009805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b6000610496600754600b54610e2390919063ffffffff16565b6000805433600160a060020a039081169116146109aa57600080fd5b60055460ff16156109ba57600080fd5b6005805460ff191660019081179091554290819055820160025582516109e7906004906020860190610e3a565b50600190505b92915050565b600054600160a060020a031681565b6000805433600160a060020a03908116911614610a1e57600080fd5b600254421115610a2d57600080fd5b600a5460a060020a900460ff1615610a4457600080fd5b600a805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f462b6ca7f632601af1295aeb320851f50e8e630a309173f23535845ea4bfb3b990600090a150600190565b600c54600160a060020a031681565b60005433600160a060020a03908116911614610ac157600080fd5b565b600160a060020a0330163190565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610b5d5780601f10610b3257610100808354040283529160200191610b5d565b820191906000526020600020905b815481529060010190602001808311610b4057829003601f168201915b5050505050905090565b600d6020526000908152604090205481565b6000600154421015610b8a57600080fd5b600254421115610b9957600080fd5b600a5460a060020a900460ff1615610bb057600080fd5b60005433600160a060020a0390811691161415610bcc57600080fd5b600654600b54610be19163ffffffff610dc716565b3414610bec57600080fd5b600c5433600160a060020a0390811691161415610c0857600080fd5b60055460ff161515600114610c1c57600080fd5b600c5460a060020a900460ff1615610c3357600080fd5b600c805474ff0000000000000000000000000000000000000000191660a060020a179055600b54600160a060020a0333166000908152600d6020526040902054610c829163ffffffff610dc716565b600160a060020a033381166000908152600d602052604080822093909355600654600c5490921681529190912054610cbf9163ffffffff610dc716565b600c8054600160a060020a039081166000908152600d6020526040902092909255600b546008819055815473ffffffffffffffffffffffffffffffffffffffff191633909316929092179055600654610d189190610dc7565b600b819055600654600755610d3b9060099061046990600463ffffffff610de116565b600655600c54600854600b5460408051600160a060020a0333811682529094166020850152838101929092526060830152517f90f94646965a0138324bb7ec4ddd2aa00d863d71e08da3f62473bfd6d1be86479181900360800190a150600c805474ff000000000000000000000000000000000000000019169055600190565b600b5481565b60065481565b600082820183811015610dd657fe5b8091505b5092915050565b600080831515610df45760009150610dda565b50828202828482811515610e0457fe5b0414610dd657fe5b6000808284811515610e1a57fe5b04949350505050565b6000828210610e34575060006109ed565b50900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610e7b57805160ff1916838001178555610ea8565b82800160010185558215610ea8579182015b82811115610ea8578251825591602001919060010190610e8d565b50610eb4929150610eb8565b5090565b61049991905b80821115610eb45760008155600101610ebe5600a165627a7a7230582074780f4316b4c423fbd766ff4b57a76fde5e8353320f21078b35c8a73e511b0e0029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
9,710
0xec14E1a294C3378Ed4Bc2501572C4D6D636404De
pragma solidity ^0.5.12; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IDPR { function transferFrom(address _spender, address _to, uint256 _amount) external returns(bool); function transfer(address _to, uint256 _amount) external returns(bool); function balanceOf(address _owner) external view returns(uint256); } contract Claim { using SafeMath for uint256; IDPR public dpr; //system info address public owner; uint256 public total_release_periods = 212; uint256 public start_time = 1627776000; //2021 年 05 月 10 日 08:00 bool public pause = true; // uer info mapping(address=>uint256) public total_lock_amount; mapping(address=>uint256) public release_per_period; mapping(address=>uint256) public user_released; //=====events======= event claim(address _addr, uint256 _amount); event distribute(address _addr, uint256 _amount); event OwnerTransfer(address _newOwner); //====modifiers==== modifier onlyOwner(){ require(owner == msg.sender, "MerkleClaim: Not Owner"); _; } modifier whenNotPaused(){ require(pause == false, "MerkleClaim: Pause"); _; } constructor(address _token) public { dpr = IDPR(_token); owner = msg.sender; } function transferOwnerShip(address _newOwner) onlyOwner external { require(_newOwner != address(0), "MerkleClaim: Wrong owner"); owner = _newOwner; emit OwnerTransfer(_newOwner); } function distributeAndLock(address _addr, uint256 _amount) external onlyOwner{ lockTokens(_addr, _amount); emit distribute(_addr, _amount); } function lockTokens(address _addr, uint256 _amount) private{ total_lock_amount[_addr] = _amount; release_per_period[_addr] = _amount.div(total_release_periods); } function setPuase(bool is_pause) onlyOwner external { pause = is_pause; } function claimTokens() whenNotPaused external { require(total_lock_amount[msg.sender] != 0, "User does not have lock record"); require(total_lock_amount[msg.sender].sub(user_released[msg.sender]) > 0, "all token has been claimed"); uint256 periods = block.timestamp.sub(start_time).div(1 days); uint256 total_release_amount = release_per_period[msg.sender].mul(periods); if(total_release_amount >= total_lock_amount[msg.sender]){ total_release_amount = total_lock_amount[msg.sender]; } uint256 release_amount = total_release_amount.sub(user_released[msg.sender]); // update user info user_released[msg.sender] = total_release_amount; require(dpr.balanceOf(address(this)) >= release_amount, "MerkleClaim: Balance not enough"); require(dpr.transfer(msg.sender, release_amount), "MerkleClaim: Transfer Failed"); emit claim(msg.sender, release_amount); } function unreleased(address user) external view returns(uint256){ return total_lock_amount[user].sub(user_released[user]); } function withdraw(address _to, uint256 _amount) external onlyOwner{ require(dpr.transfer(_to, dpr.balanceOf(address(this))), "MerkleClaim: Transfer Failed"); } function pullTokens(uint256 _amount) external onlyOwner{ require(dpr.transferFrom(owner, address(this), _amount), "MerkleClaim: TransferFrom failed"); } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063834ee41711610097578063a532784e11610066578063a532784e14610258578063c7fef17e14610284578063f3fef3a31461028c578063f63013aa146102b8576100f5565b8063834ee417146101ea5780638456cb59146101f25780638863dd1a1461020e5780638da5cb5b14610234576100f5565b806356d6e72d116100d357806356d6e72d14610162578063621f7b0a146101885780637d3503d7146101ae5780637e0db6cc146101cd576100f5565b8063118df67e146100fa5780632a67293d1461013257806348c54b9d14610158575b600080fd5b6101206004803603602081101561011057600080fd5b50356001600160a01b03166102c0565b60408051918252519081900360200190f35b6101206004803603602081101561014857600080fd5b50356001600160a01b03166102d2565b61016061030b565b005b6101206004803603602081101561017857600080fd5b50356001600160a01b03166106be565b6101206004803603602081101561019e57600080fd5b50356001600160a01b03166106d0565b610160600480360360208110156101c457600080fd5b503515156106e2565b610160600480360360208110156101e357600080fd5b503561074d565b610120610887565b6101fa61088d565b604080519115158252519081900360200190f35b6101606004803603602081101561022457600080fd5b50356001600160a01b0316610896565b61023c61099d565b604080516001600160a01b039092168252519081900360200190f35b6101606004803603604081101561026e57600080fd5b506001600160a01b0381351690602001356109ac565b610120610a56565b610160600480360360408110156102a257600080fd5b506001600160a01b038135169060200135610a5c565b61023c610c04565b60056020526000908152604090205481565b6001600160a01b03811660009081526007602090815260408083205460059092528220546103059163ffffffff610c1316565b92915050565b60045460ff1615610358576040805162461bcd60e51b81526020600482015260126024820152714d65726b6c65436c61696d3a20506175736560701b604482015290519081900360640190fd5b336000908152600560205260409020546103b9576040805162461bcd60e51b815260206004820152601e60248201527f5573657220646f6573206e6f742068617665206c6f636b207265636f72640000604482015290519081900360640190fd5b3360009081526007602090815260408083205460059092528220546103e39163ffffffff610c1316565b11610435576040805162461bcd60e51b815260206004820152601a60248201527f616c6c20746f6b656e20686173206265656e20636c61696d6564000000000000604482015290519081900360640190fd5b600061045f6201518061045360035442610c1390919063ffffffff16565b9063ffffffff610c5c16565b3360009081526006602052604081205491925090610483908363ffffffff610c9e16565b3360009081526005602052604090205490915081106104ae5750336000908152600560205260409020545b336000908152600760205260408120546104cf90839063ffffffff610c1316565b336000908152600760209081526040808320869055915482516370a0823160e01b8152306004820152925193945084936001600160a01b03909116926370a08231926024808301939192829003018186803b15801561052d57600080fd5b505afa158015610541573d6000803e3d6000fd5b505050506040513d602081101561055757600080fd5b505110156105ac576040805162461bcd60e51b815260206004820152601f60248201527f4d65726b6c65436c61696d3a2042616c616e6365206e6f7420656e6f75676800604482015290519081900360640190fd5b600080546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169263a9059cbb926044808401936020939083900390910190829087803b15801561060157600080fd5b505af1158015610615573d6000803e3d6000fd5b505050506040513d602081101561062b57600080fd5b505161067e576040805162461bcd60e51b815260206004820152601c60248201527f4d65726b6c65436c61696d3a205472616e73666572204661696c656400000000604482015290519081900360640190fd5b604080513381526020810183905281517faad3ec96b23739e5c653e387e24c59f5fc4a0724c18ad1970feb0d1444981fac929181900390910190a1505050565b60066020526000908152604090205481565b60076020526000908152604090205481565b6001546001600160a01b0316331461073a576040805162461bcd60e51b815260206004820152601660248201527526b2b935b632a1b630b4b69d102737ba1027bbb732b960511b604482015290519081900360640190fd5b6004805460ff1916911515919091179055565b6001546001600160a01b031633146107a5576040805162461bcd60e51b815260206004820152601660248201527526b2b935b632a1b630b4b69d102737ba1027bbb732b960511b604482015290519081900360640190fd5b60008054600154604080516323b872dd60e01b81526001600160a01b03928316600482015230602482015260448101869052905191909216926323b872dd92606480820193602093909283900390910190829087803b15801561080757600080fd5b505af115801561081b573d6000803e3d6000fd5b505050506040513d602081101561083157600080fd5b5051610884576040805162461bcd60e51b815260206004820181905260248201527f4d65726b6c65436c61696d3a205472616e7366657246726f6d206661696c6564604482015290519081900360640190fd5b50565b60035481565b60045460ff1681565b6001546001600160a01b031633146108ee576040805162461bcd60e51b815260206004820152601660248201527526b2b935b632a1b630b4b69d102737ba1027bbb732b960511b604482015290519081900360640190fd5b6001600160a01b038116610949576040805162461bcd60e51b815260206004820152601860248201527f4d65726b6c65436c61696d3a2057726f6e67206f776e65720000000000000000604482015290519081900360640190fd5b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517fcef55b6688c0d2198b4841b7c6a8247f60385b4b5ce83e22506fb3258036379b9181900360200190a150565b6001546001600160a01b031681565b6001546001600160a01b03163314610a04576040805162461bcd60e51b815260206004820152601660248201527526b2b935b632a1b630b4b69d102737ba1027bbb732b960511b604482015290519081900360640190fd5b610a0e8282610cf7565b604080516001600160a01b03841681526020810183905281517ffb9321085d4e4bed997685c66125572b6a0104e335681818c35b3b4d57726d6e929181900390910190a15050565b60025481565b6001546001600160a01b03163314610ab4576040805162461bcd60e51b815260206004820152601660248201527526b2b935b632a1b630b4b69d102737ba1027bbb732b960511b604482015290519081900360640190fd5b600054604080516370a0823160e01b815230600482015290516001600160a01b039092169163a9059cbb91859184916370a08231916024808301926020929190829003018186803b158015610b0857600080fd5b505afa158015610b1c573d6000803e3d6000fd5b505050506040513d6020811015610b3257600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b158015610b8357600080fd5b505af1158015610b97573d6000803e3d6000fd5b505050506040513d6020811015610bad57600080fd5b5051610c00576040805162461bcd60e51b815260206004820152601c60248201527f4d65726b6c65436c61696d3a205472616e73666572204661696c656400000000604482015290519081900360640190fd5b5050565b6000546001600160a01b031681565b6000610c5583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d46565b9392505050565b6000610c5583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ddd565b600082610cad57506000610305565b82820282848281610cba57fe5b0414610c555760405162461bcd60e51b8152600401808060200182810382526021815260200180610e436021913960400191505060405180910390fd5b6001600160a01b0382166000908152600560205260409020819055600254610d2690829063ffffffff610c5c16565b6001600160a01b0390921660009081526006602052604090209190915550565b60008184841115610dd55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d9a578181015183820152602001610d82565b50505050905090810190601f168015610dc75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610e2c5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610d9a578181015183820152602001610d82565b506000838581610e3857fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723158205ae326f605d4969be6a4f6320a375fd776df164dfadf5357b82baa84260305a464736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,711
0xefce2a7f7314dfbb01a3db3a6501d0af49419925
// Sources flattened with hardhat v2.1.2 https://hardhat.org // File contracts/utils/Address.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File contracts/proxy/Proxy.sol /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal { // solhint-disable-next-line no-inline-assembly assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _fallback() internal { _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback () payable external { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive () payable external { _fallback(); } } // File contracts/proxy/BaseUpgradeabilityProxy.sol /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an * implementation address that can be changed. This address is stored in storage in the location specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the * implementation behind the proxy. * * Upgradeability is only provided internally through {_upgradeTo}. For an externally upgradeable proxy see * {TransparentUpgradeableProxy}. */ contract BaseUpgradeabilityProxy is Proxy { /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; // solhint-disable-next-line no-inline-assembly assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "UpgradeableProxy: new implementation is not a contract"); bytes32 slot = IMPLEMENTATION_SLOT; // solhint-disable-next-line no-inline-assembly assembly { sstore(slot, newImplementation) } } } // File contracts/proxy/BaseAdminUpgradeabilityProxy.sol /** * @title BaseAdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return proxyAdmin The address of the proxy admin. */ function admin() external ifAdmin returns (address proxyAdmin) { proxyAdmin = _admin(); } /** * @return impl The address of the implementation. */ function implementation() external ifAdmin returns (address impl) { impl = _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as -described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } } // File contracts/proxy/InitializableAdminUpgradeabilityProxy.sol /** * @title InitializableAdminUpgradeabilityProxy * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for * initializing the implementation, admin, and init data. */ contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy { /** * Contract initializer. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as -described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, address _admin, bytes memory _data) public payable { require(_implementation() == address(0)); assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } }
0x6080604052600436106100595760003560e01c80633659cfe6146100705780634f1ef286146100905780635c60da1b146100a35780638f283970146100ce578063cf7a1d77146100ee578063f851a4401461010157610068565b3661006857610066610116565b005b610066610116565b34801561007c57600080fd5b5061006661008b3660046105e8565b610128565b61006661009e3660046106cd565b610162565b3480156100af57600080fd5b506100b8610209565b6040516100c59190610794565b60405180910390f35b3480156100da57600080fd5b506100666100e93660046105e8565b610246565b6100666100fc366004610609565b6102df565b34801561010d57600080fd5b506100b861044d565b610126610121610478565b61049d565b565b6101306104c1565b6001600160a01b0316336001600160a01b0316141561015757610152816104e6565b61015f565b61015f610116565b50565b61016a6104c1565b6001600160a01b0316336001600160a01b031614156101fc5761018c836104e6565b6000836001600160a01b031683836040516101a892919061074b565b600060405180830381855af49150503d80600081146101e3576040519150601f19603f3d011682016040523d82523d6000602084013e6101e8565b606091505b50509050806101f657600080fd5b50610204565b610204610116565b505050565b60006102136104c1565b6001600160a01b0316336001600160a01b0316141561023b57610234610478565b9050610243565b610243610116565b90565b61024e6104c1565b6001600160a01b0316336001600160a01b03161415610157576001600160a01b0381166102965760405162461bcd60e51b815260040161028d906107c2565b60405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6102bf6104c1565b826040516102ce9291906107a8565b60405180910390a161015281610526565b60006102e9610478565b6001600160a01b0316146102fc57600080fd5b61032760017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61086e565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc1461036357634e487b7160e01b600052600160045260246000fd5b61036c8361054a565b8051156103dd576000836001600160a01b03168260405161038d919061075b565b600060405180830381855af49150503d80600081146103c8576040519150601f19603f3d011682016040523d82523d6000602084013e6103cd565b606091505b50509050806103db57600080fd5b505b61040860017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610461086e565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61031461044457634e487b7160e01b600052600160045260246000fd5b61020482610526565b60006104576104c1565b6001600160a01b0316336001600160a01b0316141561023b576102346104c1565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156104bc573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104ef8161054a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b61055381610593565b61056f5760405162461bcd60e51b815260040161028d90610818565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906105c757508115155b925050505b919050565b80356001600160a01b03811681146105cc57600080fd5b6000602082840312156105f9578081fd5b610602826105d1565b9392505050565b60008060006060848603121561061d578182fd5b610626846105d1565b925060206106358186016105d1565b9250604085013567ffffffffffffffff80821115610651578384fd5b818701915087601f830112610664578384fd5b81358181111561067657610676610891565b604051601f8201601f191681018501838111828210171561069957610699610891565b60405281815283820185018a10156106af578586fd5b81858501868301378585838301015280955050505050509250925092565b6000806000604084860312156106e1578283fd5b6106ea846105d1565b9250602084013567ffffffffffffffff80821115610706578384fd5b818601915086601f830112610719578384fd5b813581811115610727578485fd5b876020828501011115610738578485fd5b6020830194508093505050509250925092565b6000828483379101908152919050565b60008251815b8181101561077b5760208186018101518583015201610761565b818111156107895782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b60208082526036908201527f43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f604082015275787920746f20746865207a65726f206164647265737360501b606082015260800190565b60208082526036908201527f5570677261646561626c6550726f78793a206e657720696d706c656d656e74616040820152751d1a5bdb881a5cc81b9bdd08184818dbdb9d1c9858dd60521b606082015260800190565b60008282101561088c57634e487b7160e01b81526011600452602481fd5b500390565b634e487b7160e01b600052604160045260246000fdfea26469706673582212200ca5436b0a85f7b9ce3d93f47729c39a8a3f5e921b02bdeedecedaebfc4ed91864736f6c63430008000033
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-delegatecall", "impact": "High", "confidence": "Medium"}]}}
9,712
0x7349d9324fe190ca96c7fc4ee4f1f3cbbb0d502a
/** *Submitted for verification at Etherscan.io on 2021-10-29 */ // File: contracts/erc721.sol // SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface ERC721 { event Transfer( address indexed _from, address indexed _to, uint256 indexed _tokenId ); event Approval( address indexed _owner, address indexed _approved, uint256 indexed _tokenId ); event ApprovalForAll( address indexed _owner, address indexed _operator, bool _approved ); function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes calldata _data ) external; function safeTransferFrom( address _from, address _to, uint256 _tokenId ) external; function transferFrom( address _from, address _to, uint256 _tokenId ) external; function approve( address _approved, uint256 _tokenId ) external; function setApprovalForAll( address _operator, bool _approved ) external; function balanceOf( address _owner ) external view returns (uint256); function ownerOf( uint256 _tokenId ) external view returns (address); function getApproved( uint256 _tokenId ) external view returns (address); function isApprovedForAll( address _owner, address _operator ) external view returns (bool); } // File: contracts/Ownable.sol contract Ownable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns(address) { return _owner; } modifier onlyOwner() { require(isOwner()); _; } function isOwner() public view returns(bool) { return msg.sender == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: contracts/erc721-token-receiver.sol interface ERC721TokenReceiver { function onERC721Received( address _operator, address _from, uint256 _tokenId, bytes calldata _data ) external returns(bytes4); } // File: contracts/erc165.sol interface ERC165 { function supportsInterface( bytes4 _interfaceID ) external view returns (bool); } // File: contracts/supports-interface.sol contract SupportsInterface is ERC165 { mapping(bytes4 => bool) internal supportedInterfaces; constructor() { supportedInterfaces[0x01ffc9a7] = true; // ERC165 } function supportsInterface( bytes4 _interfaceID ) external override view returns (bool) { return supportedInterfaces[_interfaceID]; } } // File: contracts/address-utils.sol library AddressUtils { function isContract( address _addr ) internal view returns (bool addressCheck) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(_addr) } // solhint-disable-line addressCheck = (codehash != 0x0 && codehash != accountHash); } } // File: contracts/nf-token.sol contract DIEDED_BASE is ERC721, SupportsInterface, Ownable { using AddressUtils for address; uint256 constant MAX_MINT_NR = 1000; uint256 public nextMintID; string baseURI; string _symbol; string _name; address [] whitelisted; bool public isMintWindowOpen; bytes4 internal constant MAGIC_ON_ERC721_RECEIVED = 0x150b7a02; mapping (uint256 => address) internal idToOwner; mapping (uint256 => address) internal idToApproval; mapping (address => uint256) internal ownerToNFTokenCount; mapping (address => mapping (address => bool)) internal ownerToOperators; modifier canOperate( uint256 _tokenId ) { address tokenOwner = idToOwner[_tokenId]; require( tokenOwner == msg.sender || ownerToOperators[tokenOwner][msg.sender], "003003" ); _; } modifier canTransfer( uint256 _tokenId ) { address tokenOwner = idToOwner[_tokenId]; require( tokenOwner == msg.sender || idToApproval[_tokenId] == msg.sender || ownerToOperators[tokenOwner][msg.sender], "003004" ); _; } modifier validNFToken( uint256 _tokenId ) { require(idToOwner[_tokenId] != address(0), "003002"); _; } constructor() { _name = "DIEDED"; _symbol = "DIEDED"; setBaseTokenURI("https://dieded.art/URIS/"); supportedInterfaces[0x80ac58cd] = true; // ERC721 } function setBaseTokenURI(string memory _baseURI) public onlyOwner{ baseURI = _baseURI; } function name() external view returns (string memory name_ret){ return _name; } function symbol() external view returns (string memory symbol_ret){ return _symbol; } function tokenURI(uint256 tokenId) public view virtual returns (string memory) { require(tokenId <= nextMintID, "ERC721: URI query for nonexistent token"); return string(abi.encodePacked(baseURI, uint2str(tokenId), ".json")); } function _mint( address _to, uint256 _tokenId ) internal virtual { require(_to != address(0), "003001"); require(idToOwner[_tokenId] == address(0), "003006"); _addNFToken(_to, _tokenId); emit Transfer(address(0), _to, _tokenId); } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes calldata _data ) external override { _safeTransferFrom(_from, _to, _tokenId, _data); } function safeTransferFrom( address _from, address _to, uint256 _tokenId ) external override { _safeTransferFrom(_from, _to, _tokenId, ""); } function transferFrom( address _from, address _to, uint256 _tokenId ) external override canTransfer(_tokenId) validNFToken(_tokenId) { address tokenOwner = idToOwner[_tokenId]; require(tokenOwner == _from, "003007"); require(_to != address(0), "003001"); _transfer(_to, _tokenId); } function approve( address _approved, uint256 _tokenId ) external override canOperate(_tokenId) validNFToken(_tokenId) { address tokenOwner = idToOwner[_tokenId]; require(_approved != tokenOwner, "003008"); idToApproval[_tokenId] = _approved; emit Approval(tokenOwner, _approved, _tokenId); } function setApprovalForAll( address _operator, bool _approved ) external override { ownerToOperators[msg.sender][_operator] = _approved; emit ApprovalForAll(msg.sender, _operator, _approved); } function balanceOf( address _owner ) external override view returns (uint256) { require(_owner != address(0), "003001"); return _getOwnerNFTCount(_owner); } function ownerOf( uint256 _tokenId ) external override view returns (address _owner) { _owner = idToOwner[_tokenId]; require(_owner != address(0), "003002"); } function getApproved( uint256 _tokenId ) external override view validNFToken(_tokenId) returns (address) { return idToApproval[_tokenId]; } function isApprovedForAll( address _owner, address _operator ) external override view returns (bool) { return ownerToOperators[_owner][_operator]; } function _transfer( address _to, uint256 _tokenId ) internal { address from = idToOwner[_tokenId]; _clearApproval(_tokenId); _removeNFToken(from, _tokenId); _addNFToken(_to, _tokenId); emit Transfer(from, _to, _tokenId); } function _removeNFToken( address _from, uint256 _tokenId ) internal virtual { require(idToOwner[_tokenId] == _from, "003007"); ownerToNFTokenCount[_from] -= 1; delete idToOwner[_tokenId]; } function _addNFToken( address _to, uint256 _tokenId ) internal virtual { require(idToOwner[_tokenId] == address(0), "003006"); idToOwner[_tokenId] = _to; ownerToNFTokenCount[_to] += 1; } function _getOwnerNFTCount( address _owner ) internal virtual view returns (uint256) { return ownerToNFTokenCount[_owner]; } function _safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) private canTransfer(_tokenId) validNFToken(_tokenId) { address tokenOwner = idToOwner[_tokenId]; require(tokenOwner == _from, "003007"); require(_to != address(0), "003001"); _transfer(_to, _tokenId); if (_to.isContract()) { bytes4 retval = ERC721TokenReceiver(_to).onERC721Received(msg.sender, _from, _tokenId, _data); require(retval == MAGIC_ON_ERC721_RECEIVED, "003005"); } } function _clearApproval( uint256 _tokenId ) private { delete idToApproval[_tokenId]; } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len; while (_i != 0) { k = k-1; uint8 temp = (48 + uint8(_i - _i / 10 * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } } // File: contracts/erc721-enumerable.sol interface ERC721Enumerable { function totalSupply() external view returns (uint256); function tokenByIndex( uint256 _index ) external view returns (uint256); function tokenOfOwnerByIndex( address _owner, uint256 _index ) external view returns (uint256); } // File: contracts/nf-token-enumerable.sol contract DIEDED is DIEDED_BASE, ERC721Enumerable { string constant INVALID_INDEX = "005007"; uint256[] internal tokens; mapping(uint256 => uint256) internal idToIndex; mapping(address => uint256[]) internal ownerToIds; mapping(uint256 => uint256) internal idToOwnerIndex; mapping(address => uint8) internal whitelistedClaimed; constructor(address[] memory _whitelisted) { nextMintID = 45; for (uint8 i=0; i<_whitelisted.length; i++) { whitelisted.push(_whitelisted[i]); whitelistedClaimed[_whitelisted[i]] = 10; //not claimed } isMintWindowOpen = false; supportedInterfaces[0x780e9d63] = true; // ERC721Enumerable } function openCloseMint(bool _status) public onlyOwner{ isMintWindowOpen = _status; } function mintForOwner(uint8 section) public onlyOwner{ if(section == 0){ for (uint8 i=0; i<45; i++) { _mintForOWner(msg.sender,i); } } else if(section == 1){ for (uint8 i=0; i<15; i++) { _mintForOWner(msg.sender,i); } } else if(section == 2){ for (uint8 i=15; i<30; i++) { _mintForOWner(msg.sender,i); } } else if(section == 3){ for (uint8 i=30; i<45; i++) { _mintForOWner(msg.sender,i); } } } function addToWhitelistArray(address[] memory _whitelisted) public onlyOwner { for (uint8 i=0; i<_whitelisted.length; i++) { whitelisted.push(_whitelisted[i]); whitelistedClaimed[_whitelisted[i]] = 10; //not claimed } } function totalSupply() external override view returns (uint256) { return tokens.length; } function tokenByIndex( uint256 _index ) external override view returns (uint256) { require(_index < tokens.length, INVALID_INDEX); return tokens[_index]; } function tokenOfOwnerByIndex( address _owner, uint256 _index ) external override view returns (uint256) { require(_index < ownerToIds[_owner].length, INVALID_INDEX); return ownerToIds[_owner][_index]; } function tokenOfOwnerByIndexInternal( address _owner, uint256 _index ) internal view returns (uint256) { require(_index < ownerToIds[_owner].length, INVALID_INDEX); return ownerToIds[_owner][_index]; } function isEligibleToFutureMints(address who, uint256 _modulo) external view returns (bool) { for (uint256 i=0; i<_getOwnerNFTCount(who); i++) { uint256 token_id = tokenOfOwnerByIndexInternal(who, i); if(token_id % 20 == _modulo) { return true; } } return false; } function isWhitelistedAndNotClaimedYet(address isWhitelistedAddr) public view returns (bool) { bool result = false; for (uint256 i=0; i<whitelisted.length; i++) { if( whitelisted[i] == isWhitelistedAddr && whitelistedClaimed[isWhitelistedAddr] == 10) { return true; } } return result; } function claim(uint8 mint_num) external payable{ require(isMintWindowOpen, "Mint window is not open"); require(mint_num + nextMintID < MAX_MINT_NR+1, "The amount of mints would exceed the supply!"); require(_getOwnerNFTCount(msg.sender) + mint_num <= 5, "Claiming too many assets per address"); bool whitelisted_res = isWhitelistedAndNotClaimedYet(msg.sender); if( (mint_num == 1 && whitelisted_res == false) || (mint_num == 2 && whitelisted_res == true) ) { require(msg.value >= 0.0666 ether, "Claiming such amount of membership costs 0.0666 ETH for this address"); } else if ( (mint_num == 2 && whitelisted_res == false) || (mint_num == 3 && whitelisted_res == true) ) { require(msg.value >= 0.1332 ether, "Claiming such amount of membership costs 0.1332 ETH for this address"); } else if ( (mint_num == 3 && whitelisted_res == false) || (mint_num == 4 && whitelisted_res == true) ) { require(msg.value >= 0.1998 ether, "Claiming such amount of membership costs 0.1998 ETH for this address"); } else if ( (mint_num == 4 && whitelisted_res == false) || (mint_num == 5 && whitelisted_res == true) ) { require(msg.value >= 0.2664 ether, "Claiming such amount of membership costs 0.2664 ETH for this address"); } else if ( (mint_num == 5 && whitelisted_res == false) ) { require(msg.value >= 0.333 ether, "Claiming such amount of membership costs 0.333 ETH for this address"); } for (uint8 i=0; i<mint_num; i++) { whitelisted_res = isWhitelistedAndNotClaimedYet(msg.sender); if ( whitelisted_res == true ){ whitelistedClaimed[msg.sender] = 20; //claimed _mint(msg.sender,nextMintID); } else{ _mint(msg.sender,nextMintID); } } // Transfer mint price to contract owner payable(owner()).transfer(msg.value); } function _mint( address _to, uint256 _tokenId ) internal override virtual { require (nextMintID < MAX_MINT_NR); super._mint(_to, _tokenId); tokens.push(_tokenId); idToIndex[_tokenId] = tokens.length - 1; nextMintID += 1; } function _mintForOWner( address _to, uint256 _tokenId ) internal onlyOwner { super._mint(_to, _tokenId); tokens.push(_tokenId); idToIndex[_tokenId] = tokens.length - 1; } function _removeNFToken( address _from, uint256 _tokenId ) internal override virtual { require(idToOwner[_tokenId] == _from, "003006"); delete idToOwner[_tokenId]; uint256 tokenToRemoveIndex = idToOwnerIndex[_tokenId]; uint256 lastTokenIndex = ownerToIds[_from].length - 1; if (lastTokenIndex != tokenToRemoveIndex) { uint256 lastToken = ownerToIds[_from][lastTokenIndex]; ownerToIds[_from][tokenToRemoveIndex] = lastToken; idToOwnerIndex[lastToken] = tokenToRemoveIndex; } ownerToIds[_from].pop(); } function _addNFToken( address _to, uint256 _tokenId ) internal override virtual { require(idToOwner[_tokenId] == address(0), "003007"); idToOwner[_tokenId] = _to; ownerToIds[_to].push(_tokenId); idToOwnerIndex[_tokenId] = ownerToIds[_to].length - 1; } function _getOwnerNFTCount( address _owner ) internal override virtual view returns (uint256) { return ownerToIds[_owner].length; } }
0x6080604052600436106101c25760003560e01c806370a08231116100f75780639bab1add11610095578063c87b56dd11610064578063c87b56dd14610506578063ca37b3bf14610526578063e985e9c514610540578063f2fde38b1461058957600080fd5b80639bab1add14610486578063a22cb465146104a6578063b88d4fde146104c6578063c1841d51146104e657600080fd5b80638da5cb5b116100d15780638da5cb5b146104205780638f32d59b1461043e57806395d4063f1461045e57806395d89b411461047157600080fd5b806370a08231146103cb578063715018a6146103eb578063805e54b01461040057600080fd5b80632f745c59116101645780634f6ccce71161013e5780634f6ccce71461034b5780636352211e1461036b5780636e29d9df1461038b5780636e5afb10146103ab57600080fd5b80632f745c59146102eb57806330176e131461030b57806342842e0e1461032b57600080fd5b8063095ea7b3116101a0578063095ea7b3146102705780630cc8b19d1461029257806318160ddd146102b657806323b872dd146102cb57600080fd5b806301ffc9a7146101c757806306fdde0314610216578063081812fc14610238575b600080fd5b3480156101d357600080fd5b506102016101e23660046120c0565b6001600160e01b03191660009081526020819052604090205460ff1690565b60405190151581526020015b60405180910390f35b34801561022257600080fd5b5061022b6105a9565b60405161020d919061230b565b34801561024457600080fd5b5061025861025336600461218f565b61063b565b6040516001600160a01b03909116815260200161020d565b34801561027c57600080fd5b5061029061028b366004611fc7565b61069b565b005b34801561029e57600080fd5b506102a860025481565b60405190815260200161020d565b3480156102c257600080fd5b50600c546102a8565b3480156102d757600080fd5b506102906102e6366004611ec6565b610805565b3480156102f757600080fd5b506102a8610306366004611fc7565b610950565b34801561031757600080fd5b506102906103263660046120fa565b6109e8565b34801561033757600080fd5b50610290610346366004611ec6565b610a16565b34801561035757600080fd5b506102a861036636600461218f565b610a36565b34801561037757600080fd5b5061025861038636600461218f565b610a9e565b34801561039757600080fd5b506102016103a6366004611e71565b610ad8565b3480156103b757600080fd5b506102906103c63660046120a5565b610b69565b3480156103d757600080fd5b506102a86103e6366004611e71565b610b93565b3480156103f757600080fd5b50610290610bd9565b34801561040c57600080fd5b5061020161041b366004611fc7565b610c3a565b34801561042c57600080fd5b506001546001600160a01b0316610258565b34801561044a57600080fd5b506001546001600160a01b03163314610201565b61029061046c3660046121a8565b610ca6565b34801561047d57600080fd5b5061022b6111e8565b34801561049257600080fd5b506102906104a13660046121a8565b6111f7565b3480156104b257600080fd5b506102906104c1366004611f9d565b6112f5565b3480156104d257600080fd5b506102906104e1366004611f02565b611361565b3480156104f257600080fd5b50610290610501366004611ff1565b6113aa565b34801561051257600080fd5b5061022b61052136600461218f565b611493565b34801561053257600080fd5b506007546102019060ff1681565b34801561054c57600080fd5b5061020161055b366004611e93565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b34801561059557600080fd5b506102906105a4366004611e71565b611529565b6060600580546105b890612466565b80601f01602080910402602001604051908101604052809291908181526020018280546105e490612466565b80156106315780601f1061060657610100808354040283529160200191610631565b820191906000526020600020905b81548152906001019060200180831161061457829003601f168201915b5050505050905090565b60008181526008602052604081205482906001600160a01b031661067a5760405162461bcd60e51b81526004016106719061231e565b60405180910390fd5b6000838152600960205260409020546001600160a01b031691505b50919050565b60008181526008602052604090205481906001600160a01b0316338114806106e657506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff165b61071b5760405162461bcd60e51b815260206004820152600660248201526530303330303360d01b6044820152606401610671565b60008381526008602052604090205483906001600160a01b03166107515760405162461bcd60e51b81526004016106719061231e565b6000848152600860205260409020546001600160a01b039081169086168114156107a65760405162461bcd60e51b815260206004820152600660248201526506060666060760d31b6044820152606401610671565b60008581526009602052604080822080546001600160a01b0319166001600160a01b038a811691821790925591518893918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050505050565b60008181526008602052604090205481906001600160a01b03163381148061084357506000828152600960205260409020546001600160a01b031633145b8061087157506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff165b6108a65760405162461bcd60e51b81526020600482015260066024820152650c0c0ccc0c0d60d21b6044820152606401610671565b60008381526008602052604090205483906001600160a01b03166108dc5760405162461bcd60e51b81526004016106719061231e565b6000848152600860205260409020546001600160a01b0390811690871681146109175760405162461bcd60e51b81526004016106719061235e565b6001600160a01b03861661093d5760405162461bcd60e51b81526004016106719061233e565b6109478686611549565b50505050505050565b6001600160a01b0382166000908152600e60209081526040808320548151808301909252600682526530303530303760d01b928201929092529083106109a95760405162461bcd60e51b8152600401610671919061230b565b506001600160a01b0383166000908152600e602052604090208054839081106109d4576109d461252c565b906000526020600020015490505b92915050565b6001546001600160a01b031633146109ff57600080fd5b8051610a12906003906020840190611db1565b5050565b610a31838383604051806020016040528060008152506115d4565b505050565b600c5460408051808201909152600681526530303530303760d01b60208201526000918310610a785760405162461bcd60e51b8152600401610671919061230b565b50600c8281548110610a8c57610a8c61252c565b90600052602060002001549050919050565b6000818152600860205260409020546001600160a01b031680610ad35760405162461bcd60e51b81526004016106719061231e565b919050565b600080805b600654811015610b6257836001600160a01b031660068281548110610b0457610b0461252c565b6000918252602090912001546001600160a01b0316148015610b4157506001600160a01b03841660009081526010602052604090205460ff16600a145b15610b50575060019392505050565b80610b5a8161249b565b915050610add565b5092915050565b6001546001600160a01b03163314610b8057600080fd5b6007805460ff1916911515919091179055565b60006001600160a01b038216610bbb5760405162461bcd60e51b81526004016106719061233e565b6001600160a01b0382166000908152600e60205260409020546109e2565b6001546001600160a01b03163314610bf057600080fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6000805b6001600160a01b0384166000908152600e6020526040902054811015610c9c576000610c6a8583610950565b905083610c786014836124d6565b1415610c89576001925050506109e2565b5080610c948161249b565b915050610c3e565b5060009392505050565b60075460ff16610cf85760405162461bcd60e51b815260206004820152601760248201527f4d696e742077696e646f77206973206e6f74206f70656e0000000000000000006044820152606401610671565b610d056103e860016123af565b600254610d159060ff84166123af565b10610d775760405162461bcd60e51b815260206004820152602c60248201527f54686520616d6f756e74206f66206d696e747320776f756c642065786365656460448201526b2074686520737570706c792160a01b6064820152608401610671565b336000908152600e6020526040902054600590610d989060ff8416906123af565b1115610df25760405162461bcd60e51b8152602060048201526024808201527f436c61696d696e6720746f6f206d616e792061737365747320706572206164646044820152637265737360e01b6064820152608401610671565b6000610dfd33610ad8565b90508160ff166001148015610e10575080155b80610e2b57508160ff166002148015610e2b57506001811515145b15610eae5766ec9c58de0a8000341015610ea95760405162461bcd60e51b81526020600482015260446024820181905260008051602061256f833981519152908201527f697020636f73747320302e303636362045544820666f722074686973206164646064820152637265737360e01b608482015260a401610671565b61113d565b8160ff166002148015610ebf575080155b80610eda57508160ff166003148015610eda57506001811515145b15610f59576701d938b1bc150000341015610ea95760405162461bcd60e51b81526020600482015260446024820181905260008051602061256f833981519152908201527f697020636f73747320302e313333322045544820666f722074686973206164646064820152637265737360e01b608482015260a401610671565b8160ff166003148015610f6a575080155b80610f8557508160ff166004148015610f8557506001811515145b15611004576702c5d50a9a1f8000341015610ea95760405162461bcd60e51b81526020600482015260446024820181905260008051602061256f833981519152908201527f697020636f73747320302e313939382045544820666f722074686973206164646064820152637265737360e01b608482015260a401610671565b8160ff166004148015611015575080155b8061103057508160ff16600514801561103057506001811515145b156110af576703b27163782a0000341015610ea95760405162461bcd60e51b81526020600482015260446024820181905260008051602061256f833981519152908201527f697020636f73747320302e323636342045544820666f722074686973206164646064820152637265737360e01b608482015260a401610671565b8160ff1660051480156110c0575080155b1561113d5767049f0dbc5634800034101561113d5760405162461bcd60e51b8152602060048201526043602482015260008051602061256f83398151915260448201527f697020636f73747320302e3333332045544820666f722074686973206164647260648201526265737360e81b608482015260a401610671565b60005b8260ff168160ff1610156111ae5761115733610ad8565b91506001821515141561119057336000818152601060205260409020805460ff1916601417905560025461118b919061180b565b61119c565b61119c3360025461180b565b806111a6816124b6565b915050611140565b506001546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610a31573d6000803e3d6000fd5b6060600480546105b890612466565b6001546001600160a01b0316331461120e57600080fd5b60ff81166112445760005b602d8160ff161015610a1257611232338260ff16611896565b8061123c816124b6565b915050611219565b8060ff166001141561127e5760005b600f8160ff161015610a125761126c338260ff16611896565b80611276816124b6565b915050611253565b8060ff16600214156112b857600f5b601e8160ff161015610a12576112a6338260ff16611896565b806112b0816124b6565b91505061128d565b8060ff16600314156112f257601e5b602d8160ff161015610a12576112e0338260ff16611896565b806112ea816124b6565b9150506112c7565b50565b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6113a385858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506115d492505050565b5050505050565b6001546001600160a01b031633146113c157600080fd5b60005b81518160ff161015610a12576006828260ff16815181106113e7576113e761252c565b6020908102919091018101518254600181018455600093845291832090910180546001600160a01b0319166001600160a01b039092169190911790558251600a91601091859060ff86169081106114405761144061252c565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908360ff160217905550808061148b906124b6565b9150506113c4565b60606002548211156114f75760405162461bcd60e51b815260206004820152602760248201527f4552433732313a2055524920717565727920666f72206e6f6e6578697374656e6044820152663a103a37b5b2b760c91b6064820152608401610671565b60036115028361190d565b604051602001611513929190612213565b6040516020818303038152906040529050919050565b6001546001600160a01b0316331461154057600080fd5b6112f281611a36565b600081815260086020908152604080832054600990925290912080546001600160a01b03191690556001600160a01b03166115848183611aa5565b61158e8383611c1b565b81836001600160a01b0316826001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60008281526008602052604090205482906001600160a01b03163381148061161257506000828152600960205260409020546001600160a01b031633145b8061164057506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff165b6116755760405162461bcd60e51b81526020600482015260066024820152650c0c0ccc0c0d60d21b6044820152606401610671565b60008481526008602052604090205484906001600160a01b03166116ab5760405162461bcd60e51b81526004016106719061231e565b6000858152600860205260409020546001600160a01b0390811690881681146116e65760405162461bcd60e51b81526004016106719061235e565b6001600160a01b03871661170c5760405162461bcd60e51b81526004016106719061233e565b6117168787611549565b611728876001600160a01b0316611cbb565b1561180157604051630a85bd0160e11b81526000906001600160a01b0389169063150b7a02906117629033908d908c908c906004016122ce565b602060405180830381600087803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b491906120dd565b90506001600160e01b03198116630a85bd0160e11b146117ff5760405162461bcd60e51b815260206004820152600660248201526530303330303560d01b6044820152606401610671565b505b5050505050505050565b6103e86002541061181b57600080fd5b6118258282611cf7565b600c80546001818101835560008390527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c79091018390559054611868919061241f565b6000828152600d6020526040812091909155600280546001929061188d9084906123af565b90915550505050565b6001546001600160a01b031633146118ad57600080fd5b6118b78282611cf7565b600c80546001818101835560008390527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c790910183905590546118fa919061241f565b6000918252600d60205260409091205550565b6060816119315750506040805180820190915260018152600360fc1b602082015290565b8160005b811561195b57806119458161249b565b91506119549050600a836123ec565b9150611935565b60008167ffffffffffffffff81111561197657611976612542565b6040519080825280601f01601f1916602001820160405280156119a0576020820181803683370190505b509050815b8515611a2d576119b660018261241f565b905060006119c5600a886123ec565b6119d090600a612400565b6119da908861241f565b6119e59060306123c7565b905060008160f81b905080848481518110611a0257611a0261252c565b60200101906001600160f81b031916908160001a905350611a24600a896123ec565b975050506119a5565b50949350505050565b6001600160a01b038116611a4957600080fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600860205260409020546001600160a01b03838116911614611af75760405162461bcd60e51b815260206004820152600660248201526518181998181b60d11b6044820152606401610671565b600081815260086020908152604080832080546001600160a01b0319169055600f8252808320546001600160a01b0386168452600e909252822054909190611b419060019061241f565b9050818114611bd8576001600160a01b0384166000908152600e60205260408120805483908110611b7457611b7461252c565b9060005260206000200154905080600e6000876001600160a01b03166001600160a01b031681526020019081526020016000208481548110611bb857611bb861252c565b6000918252602080832090910192909255918252600f9052604090208290555b6001600160a01b0384166000908152600e60205260409020805480611bff57611bff612516565b6001900381819060005260206000200160009055905550505050565b6000818152600860205260409020546001600160a01b031615611c505760405162461bcd60e51b81526004016106719061235e565b600081815260086020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600e83529083208054600181810183558286529385200185905592529054611ca8919061241f565b6000918252600f60205260409091205550565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611cef5750808214155b949350505050565b6001600160a01b038216611d1d5760405162461bcd60e51b81526004016106719061233e565b6000818152600860205260409020546001600160a01b031615611d6b5760405162461bcd60e51b815260206004820152600660248201526518181998181b60d11b6044820152606401610671565b611d758282611c1b565b60405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054611dbd90612466565b90600052602060002090601f016020900481019282611ddf5760008555611e25565b82601f10611df857805160ff1916838001178555611e25565b82800160010185558215611e25579182015b82811115611e25578251825591602001919060010190611e0a565b50611e31929150611e35565b5090565b5b80821115611e315760008155600101611e36565b80356001600160a01b0381168114610ad357600080fd5b80358015158114610ad357600080fd5b600060208284031215611e8357600080fd5b611e8c82611e4a565b9392505050565b60008060408385031215611ea657600080fd5b611eaf83611e4a565b9150611ebd60208401611e4a565b90509250929050565b600080600060608486031215611edb57600080fd5b611ee484611e4a565b9250611ef260208501611e4a565b9150604084013590509250925092565b600080600080600060808688031215611f1a57600080fd5b611f2386611e4a565b9450611f3160208701611e4a565b935060408601359250606086013567ffffffffffffffff80821115611f5557600080fd5b818801915088601f830112611f6957600080fd5b813581811115611f7857600080fd5b896020828501011115611f8a57600080fd5b9699959850939650602001949392505050565b60008060408385031215611fb057600080fd5b611fb983611e4a565b9150611ebd60208401611e61565b60008060408385031215611fda57600080fd5b611fe383611e4a565b946020939093013593505050565b6000602080838503121561200457600080fd5b823567ffffffffffffffff8082111561201c57600080fd5b818501915085601f83011261203057600080fd5b81358181111561204257612042612542565b8060051b915061205384830161237e565b8181528481019084860184860187018a101561206e57600080fd5b600095505b838610156120985761208481611e4a565b835260019590950194918601918601612073565b5098975050505050505050565b6000602082840312156120b757600080fd5b611e8c82611e61565b6000602082840312156120d257600080fd5b8135611e8c81612558565b6000602082840312156120ef57600080fd5b8151611e8c81612558565b6000602080838503121561210d57600080fd5b823567ffffffffffffffff8082111561212557600080fd5b818501915085601f83011261213957600080fd5b81358181111561214b5761214b612542565b61215d601f8201601f1916850161237e565b9150808252868482850101111561217357600080fd5b8084840185840137600090820190930192909252509392505050565b6000602082840312156121a157600080fd5b5035919050565b6000602082840312156121ba57600080fd5b813560ff81168114611e8c57600080fd5b600081518084526121e3816020860160208601612436565b601f01601f19169290920160200192915050565b60008151612209818560208601612436565b9290920192915050565b600080845481600182811c91508083168061222f57607f831692505b602080841082141561224f57634e487b7160e01b86526022600452602486fd5b8180156122635760018114612274576122a1565b60ff198616895284890196506122a1565b60008b81526020902060005b868110156122995781548b820152908501908301612280565b505084890196505b5050505050506122c56122b482866121f7565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612301908301846121cb565b9695505050505050565b602081526000611e8c60208301846121cb565b60208082526006908201526518181998181960d11b604082015260600190565b60208082526006908201526530303330303160d01b604082015260600190565b60208082526006908201526530303330303760d01b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff811182821017156123a7576123a7612542565b604052919050565b600082198211156123c2576123c26124ea565b500190565b600060ff821660ff84168060ff038211156123e4576123e46124ea565b019392505050565b6000826123fb576123fb612500565b500490565b600081600019048311821515161561241a5761241a6124ea565b500290565b600082821015612431576124316124ea565b500390565b60005b83811015612451578181015183820152602001612439565b83811115612460576000848401525b50505050565b600181811c9082168061247a57607f821691505b6020821081141561069557634e487b7160e01b600052602260045260246000fd5b60006000198214156124af576124af6124ea565b5060010190565b600060ff821660ff8114156124cd576124cd6124ea565b60010192915050565b6000826124e5576124e5612500565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146112f257600080fdfe436c61696d696e67207375636820616d6f756e74206f66206d656d6265727368a2646970667358221220a3b192e93d9b629edcdd8940b96ea70775f48ccc4afb25024c52ccc813e646a864736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,713
0x940259178FbF021e625510919BC2FF0B944E5613
// SPDX-License-Identifier: CC-BY-1.0 pragma solidity ^0.8.6; contract Abyss { address public owner; // invoke abyss function invokeVoid() pure external { while (true) { /**█████████████████████████⦰⦰█⦰⦰████████⦰⦰██████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ 000000000000000000000000000000000000██████████████████████████████████████ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ xxxxxxxxxxxxx█████████████████████████████████████████████████████████████ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ speaking a language is part of a form of life█████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒ ████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████████████████████████████████████████████████████████████████▓▓▓▓▒▒▓▓▓▓ ██████████████████████████████⽕████████████████████▓▓▓▓██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████▓▓▓▓▓▓████▒▒▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓ ██░░██░░▒▒██▒▒░░▒▒▒▒▒▒░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▒▒▒▒▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ██████████████████████████████████████████████████████████▓▓██████▓▓██████ ⦰⦰⦰⦰███████████████████⦰⦰████████████████░░░░░░░░░░░░░░████████⦰⦰⦰⦰⦰⦰███ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████v███████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ █████████⦰⦰███████████████████████████████████████████████████████████████ ██████████████████⦰███████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████▒▒██▓▓▓▓██▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████████████████ ██████████████▓▓▓▓▓▓▓▓▓▓▒▒▓▓▒▒▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒ ██████████████████████████⦰⦰⦰⦰█████████████o█████████████████████████████ ███████████████████████████U██████████████████████████████████████████████ ███████████████/███████████████████████v██████████████████████████████████ ██████▓▓▓▓▓▓██████████████████████████████████████▒▒██████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████⦰⦰⦰⦰███████ ██████████████████████████████⦰⦰⦰⦰████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓ ████████████████████████▓▓██▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓██▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒ ████████████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ ██████████████████████████████████████████████████████████████████████████ ██████████████████████████████████████████████████████████████████████████ ████████████████████████████████████████████████████████████████████████*/ } } // pass abyss function setOwner(address _owner) external { require(msg.sender == owner || owner == address(0), "not your void"); owner = _owner; } }
0x608060405234801561001057600080fd5b50600436106100415760003560e01c806313af4035146100465780637d9a24321461005b5780638da5cb5b14610063575b600080fd5b61005961005436600461019f565b6100ac565b005b610059610199565b6000546100839073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b60005473ffffffffffffffffffffffffffffffffffffffff163314806100e8575060005473ffffffffffffffffffffffffffffffffffffffff16155b610152576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f7420796f757220766f696400000000000000000000000000000000000000604482015260640160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b5b61019a565b6000602082840312156101b157600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146101d557600080fd5b939250505056fea2646970667358221220e051a717a3860149c18358d4b98cbfc3de9dbe6776fec1c93feea4194b63d64f64736f6c63430008060033
{"success": true, "error": null, "results": {}}
9,714
0xf70c08f0617c1490902e6b6df3b6115c9977761f
// SPDX-License-Identifier: MIT // pragma solidity ^0.6.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract CardanoPad is Ownable, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply = 0; string private _name = 'CardanoPad '; string private _symbol = 'CPAD'; uint8 private _decimals = 18; uint256 public maxTxAmount = 1000000000000000e18; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor () public { _mint(_msgSender(), 1000000000000000e18); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if(sender != owner() && recipient != owner()) require(amount <= maxTxAmount, "Transfer amount exceeds the maxTxAmount."); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } function setMaxTxAmount(uint256 _maxTxAmount) external onlyOwner() { require(_maxTxAmount >= 10000e9 , 'maxTxAmount should be greater than 10000e9'); maxTxAmount = _maxTxAmount; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638c0b5e2211610097578063a9059cbb11610066578063a9059cbb146104ae578063dd62ed3e14610512578063ec28438a1461058a578063f2fde38b146105b857610100565b80638c0b5e22146103755780638da5cb5b1461039357806395d89b41146103c7578063a457c2d71461044a57610100565b8063313ce567116100d3578063313ce5671461028e57806339509351146102af57806370a0823114610313578063715018a61461036b57610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ec57806323b872dd1461020a575b600080fd5b61010d6105fc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061069e565b60405180821515815260200191505060405180910390f35b6101f46106bc565b6040518082815260200191505060405180910390f35b6102766004803603606081101561022057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c6565b60405180821515815260200191505060405180910390f35b61029661079f565b604051808260ff16815260200191505060405180910390f35b6102fb600480360360408110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107b6565b60405180821515815260200191505060405180910390f35b6103556004803603602081101561032957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610869565b6040518082815260200191505060405180910390f35b6103736108b2565b005b61037d610a38565b6040518082815260200191505060405180910390f35b61039b610a3e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103cf610a67565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561040f5780820151818401526020810190506103f4565b50505050905090810190601f16801561043c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104966004803603604081101561046057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b09565b60405180821515815260200191505060405180910390f35b6104fa600480360360408110156104c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd6565b60405180821515815260200191505060405180910390f35b6105746004803603604081101561052857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bf4565b6040518082815260200191505060405180910390f35b6105b6600480360360208110156105a057600080fd5b8101908080359060200190929190505050610c7b565b005b6105fa600480360360208110156105ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dac565b005b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106945780601f1061066957610100808354040283529160200191610694565b820191906000526020600020905b81548152906001019060200180831161067757829003601f168201915b5050505050905090565b60006106b26106ab61103f565b8484611047565b6001905092915050565b6000600354905090565b60006106d384848461123e565b610794846106df61103f565b61078f8560405180606001604052806028815260200161178360289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061074561103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b600190509392505050565b6000600660009054906101000a900460ff16905090565b600061085f6107c361103f565b8461085a85600260006107d461103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b611047565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108ba61103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461097a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60075481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aff5780601f10610ad457610100808354040283529160200191610aff565b820191906000526020600020905b815481529060010190602001808311610ae257829003601f168201915b5050505050905090565b6000610bcc610b1661103f565b84610bc7856040518060600160405280602581526020016117f46025913960026000610b4061103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b6001905092915050565b6000610bea610be361103f565b848461123e565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610c8361103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6509184e72a000811015610da2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611731602a913960400191505060405180910390fd5b8060078190555050565b610db461103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610efa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116c36026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117d06024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611153576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116e96022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806117ab6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116a06023913960400191505060405180910390fd5b611352610a3e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156113c05750611390610a3e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561142157600754811115611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061175b6028913960400191505060405180910390fd5b5b61142c83838361169a565b6114988160405180606001604052806026815260200161170b60269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061152d81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611687576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561164c578082015181840152602081019050611631565b50505050905090810190601f1680156116795780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63656d61785478416d6f756e742073686f756c642062652067726561746572207468616e20313030303065395472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220e24cede2c9d7e54f6133d6a04fc27ebdf2a3d7e9a9209c1daa44a4e618df18e464736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,715
0x076f47D418DB9Cc788f4F6Fa51Eb432c65DC2BBe
/** *Submitted for verification at Etherscan.io on 2022-04-18 */ // SPDX-License-Identifier: MIT /** MACAW - Macaw Inu TG https://t.me/Macawinu Max Tx 1,000,000 (1%) Total 100,000,000 Tax 6% Slippage 40% **/ pragma solidity ^0.8.13; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract MacawInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Macaw Inu"; string private constant _symbol = "MACAW"; uint8 private constant _decimals = 8; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeWallet; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 public _maxTxAmount = 1000000*10**_decimals; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeWallet = payable(_msgSender()); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeWallet] = true; emit MaxTxAmountUpdated(_maxTxAmount); emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); _feeAddr1 = 3; _feeAddr2 = 3; if (from != owner() && to != owner()) { if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to]) { // buy require(amount <= _maxTxAmount); require(tradingOpen); } if ( from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { if(to == uniswapV2Pair){ _feeAddr1 = 3; _feeAddr2 = 3; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 100000000000000000) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeWallet.transfer(amount); } function liftMaxTxPercentage(uint256 percentage) external onlyOwner{ require(percentage>1); _maxTxAmount = _tTotal.mul(percentage).div(100); emit MaxTxAmountUpdated(_maxTxAmount); } function addToSwap() external onlyOwner { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function addLiquidity() external onlyOwner{ uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function enableTrading() external onlyOwner{ tradingOpen = true; } function setBots(address[] memory bots_,bool isBot) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { if(bots_[i]!=address(uniswapV2Router) && bots_[i]!=address(uniswapV2Pair) &&bots_[i]!=address(this)){ bots[bots_[i]] = isBot; } } } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { swapTokensForEth(balanceOf(address(this))); } function manualsend() external { sendETHToFee(address(this).balance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c80637d1db4a5116100a05780639c0db5f3116100645780639c0db5f3146102f9578063a9059cbb14610319578063c3c8cd8014610339578063dd62ed3e1461034e578063e8078d941461039457600080fd5b80637d1db4a5146102585780638a8c523c1461026e5780638da5cb5b1461028357806395d89b41146102ab57806398d24403146102d957600080fd5b8063313ce567116100e7578063313ce567146101db57806339c96774146101f75780636fc3eaec1461020e57806370a0823114610223578063715018a61461024357600080fd5b806306fdde0314610124578063095ea7b31461016857806318160ddd1461019857806323b872dd146101bb57600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b506040805180820190915260098152684d6163617720496e7560b81b60208201525b60405161015f91906115b9565b60405180910390f35b34801561017457600080fd5b50610188610183366004611633565b6103a9565b604051901515815260200161015f565b3480156101a457600080fd5b506101ad6103c0565b60405190815260200161015f565b3480156101c757600080fd5b506101886101d636600461165f565b6103e1565b3480156101e757600080fd5b506040516008815260200161015f565b34801561020357600080fd5b5061020c61044a565b005b34801561021a57600080fd5b5061020c61062c565b34801561022f57600080fd5b506101ad61023e3660046116a0565b610637565b34801561024f57600080fd5b5061020c610659565b34801561026457600080fd5b506101ad600e5481565b34801561027a57600080fd5b5061020c6106cd565b34801561028f57600080fd5b506000546040516001600160a01b03909116815260200161015f565b3480156102b757600080fd5b506040805180820190915260058152644d4143415760d81b6020820152610152565b3480156102e557600080fd5b5061020c6102f43660046116bd565b61070c565b34801561030557600080fd5b5061020c610314366004611705565b6107ad565b34801561032557600080fd5b50610188610334366004611633565b610901565b34801561034557600080fd5b5061020c61090e565b34801561035a57600080fd5b506101ad6103693660046117dc565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156103a057600080fd5b5061020c61091f565b60006103b6338484610a99565b5060015b92915050565b60006103ce6008600a61190f565b6103dc906305f5e10061191e565b905090565b60006103ee848484610bbd565b610440843361043b85604051806060016040528060288152602001611acc602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e9f565b610a99565b5060019392505050565b6000546001600160a01b0316331461047d5760405162461bcd60e51b81526004016104749061193d565b60405180910390fd5b600c80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556104c530826104b76008600a61190f565b61043b906305f5e10061191e565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610503573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105279190611972565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610574573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105989190611972565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156105e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106099190611972565b600d80546001600160a01b0319166001600160a01b039290921691909117905550565b61063547610ed9565b565b6001600160a01b0381166000908152600260205260408120546103ba90610f17565b6000546001600160a01b031633146106835760405162461bcd60e51b81526004016104749061193d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106f75760405162461bcd60e51b81526004016104749061193d565b600d805460ff60a01b1916600160a01b179055565b6000546001600160a01b031633146107365760405162461bcd60e51b81526004016104749061193d565b6001811161074357600080fd5b610772606461076c836107586008600a61190f565b610766906305f5e10061191e565b90610f9b565b9061101d565b600e8190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6000546001600160a01b031633146107d75760405162461bcd60e51b81526004016104749061193d565b60005b82518110156108fc57600c5483516001600160a01b03909116908490839081106108065761080661198f565b60200260200101516001600160a01b0316141580156108575750600d5483516001600160a01b03909116908490839081106108435761084361198f565b60200260200101516001600160a01b031614155b801561088e5750306001600160a01b031683828151811061087a5761087a61198f565b60200260200101516001600160a01b031614155b156108ea5781600660008584815181106108aa576108aa61198f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806108f4816119a5565b9150506107da565b505050565b60006103b6338484610bbd565b61063561091a30610637565b61105f565b6000546001600160a01b031633146109495760405162461bcd60e51b81526004016104749061193d565b600c546001600160a01b031663f305d719473061096581610637565b60008061097a6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156109e2573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a0791906119be565b5050600d8054600160b01b60ff60b01b19821617909155600c5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610a72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9691906119ec565b50565b6001600160a01b038316610afb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610474565b6001600160a01b038216610b5c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610474565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c215760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610474565b6001600160a01b038216610c835760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610474565b60008111610ce55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610474565b6001600160a01b03831660009081526006602052604090205460ff1615610d0b57600080fd5b60036009819055600a556000546001600160a01b03848116911614801590610d4157506000546001600160a01b03838116911614155b15610e9457600d546001600160a01b038481169116148015610d715750600c546001600160a01b03838116911614155b8015610d9657506001600160a01b03821660009081526005602052604090205460ff16155b15610dc057600e54811115610daa57600080fd5b600d54600160a01b900460ff16610dc057600080fd5b600c546001600160a01b03848116911614801590610df757506001600160a01b03831660009081526005602052604090205460ff16155b15610e1d57600d546001600160a01b0390811690831603610e1d5760036009819055600a555b6000610e2830610637565b600d54909150600160a81b900460ff16158015610e535750600d546001600160a01b03858116911614155b8015610e685750600d54600160b01b900460ff165b15610e9257610e768161105f565b4767016345785d8a0000811115610e9057610e9047610ed9565b505b505b6108fc8383836111d9565b60008184841115610ec35760405162461bcd60e51b815260040161047491906115b9565b506000610ed08486611a09565b95945050505050565b600b546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610f13573d6000803e3d6000fd5b5050565b6000600754821115610f7e5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610474565b6000610f886111e4565b9050610f94838261101d565b9392505050565b600082600003610fad575060006103ba565b6000610fb9838561191e565b905082610fc68583611a20565b14610f945760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610474565b6000610f9483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611207565b600d805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110a7576110a761198f565b6001600160a01b03928316602091820292909201810191909152600c54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611100573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111249190611972565b816001815181106111375761113761198f565b6001600160a01b039283166020918202929092010152600c5461115d9130911684610a99565b600c5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611196908590600090869030904290600401611a42565b600060405180830381600087803b1580156111b057600080fd5b505af11580156111c4573d6000803e3d6000fd5b5050600d805460ff60a81b1916905550505050565b6108fc838383611235565b60008060006111f161132c565b9092509050611200828261101d565b9250505090565b600081836112285760405162461bcd60e51b815260040161047491906115b9565b506000610ed08486611a20565b600080600080600080611247876113ae565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611279908761140b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546112a8908661144d565b6001600160a01b0389166000908152600260205260409020556112ca816114ac565b6112d484836114f6565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161131991815260200190565b60405180910390a3505050505050505050565b6007546000908190816113416008600a61190f565b61134f906305f5e10061191e565b90506113776113606008600a61190f565b61136e906305f5e10061191e565b6007549061101d565b8210156113a55760075461138d6008600a61190f565b61139b906305f5e10061191e565b9350935050509091565b90939092509050565b60008060008060008060008060006113cb8a600954600a5461151a565b92509250925060006113db6111e4565b905060008060006113ee8e878787611569565b919e509c509a509598509396509194505050505091939550919395565b6000610f9483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e9f565b60008061145a8385611ab3565b905083811015610f945760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610474565b60006114b66111e4565b905060006114c48383610f9b565b306000908152600260205260409020549091506114e1908261144d565b30600090815260026020526040902055505050565b600754611503908361140b565b600755600854611513908261144d565b6008555050565b600080808061152e606461076c8989610f9b565b90506000611541606461076c8a89610f9b565b90506000611559826115538b8661140b565b9061140b565b9992985090965090945050505050565b60008080806115788886610f9b565b905060006115868887610f9b565b905060006115948888610f9b565b905060006115a682611553868661140b565b939b939a50919850919650505050505050565b600060208083528351808285015260005b818110156115e6578581018301518582016040015282016115ca565b818111156115f8576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610a9657600080fd5b803561162e8161160e565b919050565b6000806040838503121561164657600080fd5b82356116518161160e565b946020939093013593505050565b60008060006060848603121561167457600080fd5b833561167f8161160e565b9250602084013561168f8161160e565b929592945050506040919091013590565b6000602082840312156116b257600080fd5b8135610f948161160e565b6000602082840312156116cf57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b8015158114610a9657600080fd5b803561162e816116ec565b6000806040838503121561171857600080fd5b823567ffffffffffffffff8082111561173057600080fd5b818501915085601f83011261174457600080fd5b8135602082821115611758576117586116d6565b8160051b604051601f19603f8301168101818110868211171561177d5761177d6116d6565b60405292835281830193508481018201928984111561179b57600080fd5b948201945b838610156117c0576117b186611623565b855294820194938201936117a0565b96506117cf90508782016116fa565b9450505050509250929050565b600080604083850312156117ef57600080fd5b82356117fa8161160e565b9150602083013561180a8161160e565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561186657816000190482111561184c5761184c611815565b8085161561185957918102915b93841c9390800290611830565b509250929050565b60008261187d575060016103ba565b8161188a575060006103ba565b81600181146118a057600281146118aa576118c6565b60019150506103ba565b60ff8411156118bb576118bb611815565b50506001821b6103ba565b5060208310610133831016604e8410600b84101617156118e9575081810a6103ba565b6118f3838361182b565b806000190482111561190757611907611815565b029392505050565b6000610f9460ff84168361186e565b600081600019048311821515161561193857611938611815565b500290565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561198457600080fd5b8151610f948161160e565b634e487b7160e01b600052603260045260246000fd5b6000600182016119b7576119b7611815565b5060010190565b6000806000606084860312156119d357600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156119fe57600080fd5b8151610f94816116ec565b600082821015611a1b57611a1b611815565b500390565b600082611a3d57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a925784516001600160a01b031683529383019391830191600101611a6d565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611ac657611ac6611815565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c4723aa3a3b33b7394983b12c0103c95685a79f86d0411c55c741789dd72c83764736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,716
0x6702b33973b7e0fdd720c85e96394177a9434d5c
/** *Submitted for verification at Etherscan.io on 2022-03-27 */ // SPDX-License-Identifier: Unlicensed //TG: @Inuminatportal pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract INUMINATI is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _MAX = ~uint256(0); uint256 private constant _tTotal = 1e10 * 10**9; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "INUMINATI"; string private constant _symbol = "INUMINATI"; uint private constant _decimals = 9; uint256 private _teamFee = 13; uint256 private _previousteamFee = _teamFee; address payable private _feeAddress; IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "Your address has been marked as a bot, please contact staff to appeal your case."); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(2).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 burnCount = contractTokenBalance.mul(3).div(13); contractTokenBalance -= burnCount; _burnToken(burnCount); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 burnCount) private lockTheSwap(){ _transfer(address(this), address(0xdead), burnCount); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function initContract(address payable feeAddress) external onlyOwner() { require(!_initialized,"Contract has already been initialized"); IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _uniswapV2Router = uniswapV2Router; _feeAddress = feeAddress; _isExcludedFromFee[_feeAddress] = true; _initialized = true; } function openTrading() external onlyOwner() { require(_initialized, "Contract must be initialized first"); _tradingOpen = true; _launchTime = block.timestamp; _initialLimitDuration = _launchTime + (5 minutes); } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee <= 15, "not larger than 15%"); _teamFee = fee; } function setBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function withdrawFees() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103c0578063cf0848f7146103d5578063cf9d4afa146103f5578063dd62ed3e14610415578063e6ec64ec1461045b578063f2fde38b1461047b57600080fd5b8063715018a6146103235780638da5cb5b1461033857806390d49b9d1461036057806395d89b4114610172578063a9059cbb14610380578063b515566a146103a057600080fd5b806331c2d8471161010857806331c2d8471461023c5780633bbac5791461025c578063437823ec14610295578063476343ee146102b55780635342acb4146102ca57806370a082311461030357600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b357806318160ddd146101e357806323b872dd14610208578063313ce5671461022857600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017061049b565b005b34801561017e57600080fd5b506040805180820182526009815268494e554d494e41544960b81b602082015290516101aa9190611916565b60405180910390f35b3480156101bf57600080fd5b506101d36101ce366004611990565b6104e7565b60405190151581526020016101aa565b3480156101ef57600080fd5b50678ac7230489e800005b6040519081526020016101aa565b34801561021457600080fd5b506101d36102233660046119bc565b6104fe565b34801561023457600080fd5b5060096101fa565b34801561024857600080fd5b50610170610257366004611a13565b610567565b34801561026857600080fd5b506101d3610277366004611ad8565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102a157600080fd5b506101706102b0366004611ad8565b6105fd565b3480156102c157600080fd5b5061017061064b565b3480156102d657600080fd5b506101d36102e5366004611ad8565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561030f57600080fd5b506101fa61031e366004611ad8565b610685565b34801561032f57600080fd5b506101706106a7565b34801561034457600080fd5b506000546040516001600160a01b0390911681526020016101aa565b34801561036c57600080fd5b5061017061037b366004611ad8565b6106dd565b34801561038c57600080fd5b506101d361039b366004611990565b610757565b3480156103ac57600080fd5b506101706103bb366004611a13565b610764565b3480156103cc57600080fd5b5061017061087d565b3480156103e157600080fd5b506101706103f0366004611ad8565b610935565b34801561040157600080fd5b50610170610410366004611ad8565b610980565b34801561042157600080fd5b506101fa610430366004611af5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561046757600080fd5b50610170610476366004611b2e565b610bdb565b34801561048757600080fd5b50610170610496366004611ad8565b610c51565b6000546001600160a01b031633146104ce5760405162461bcd60e51b81526004016104c590611b47565b60405180910390fd5b60006104d930610685565b90506104e481610ce9565b50565b60006104f4338484610e63565b5060015b92915050565b600061050b848484610f87565b61055d843361055885604051806060016040528060288152602001611cc0602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113cc565b610e63565b5060019392505050565b6000546001600160a01b031633146105915760405162461bcd60e51b81526004016104c590611b47565b60005b81518110156105f9576000600560008484815181106105b5576105b5611b7c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105f181611ba8565b915050610594565b5050565b6000546001600160a01b031633146106275760405162461bcd60e51b81526004016104c590611b47565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156105f9573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546104f890611406565b6000546001600160a01b031633146106d15760405162461bcd60e51b81526004016104c590611b47565b6106db600061148a565b565b6000546001600160a01b031633146107075760405162461bcd60e51b81526004016104c590611b47565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006104f4338484610f87565b6000546001600160a01b0316331461078e5760405162461bcd60e51b81526004016104c590611b47565b60005b81518110156105f957600c5482516001600160a01b03909116908390839081106107bd576107bd611b7c565b60200260200101516001600160a01b03161415801561080e5750600b5482516001600160a01b03909116908390839081106107fa576107fa611b7c565b60200260200101516001600160a01b031614155b1561086b5760016005600084848151811061082b5761082b611b7c565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061087581611ba8565b915050610791565b6000546001600160a01b031633146108a75760405162461bcd60e51b81526004016104c590611b47565b600c54600160a01b900460ff1661090b5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104c5565b600c805460ff60b81b1916600160b81b17905542600d8190556109309061012c611bc1565b600e55565b6000546001600160a01b0316331461095f5760405162461bcd60e51b81526004016104c590611b47565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109aa5760405162461bcd60e51b81526004016104c590611b47565b600c54600160a01b900460ff1615610a125760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104c5565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8d9190611bd9565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ada573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afe9190611bd9565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6f9190611bd9565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c055760405162461bcd60e51b81526004016104c590611b47565b600f811115610c4c5760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031352560681b60448201526064016104c5565b600855565b6000546001600160a01b03163314610c7b5760405162461bcd60e51b81526004016104c590611b47565b6001600160a01b038116610ce05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c5565b6104e48161148a565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d3157610d31611b7c565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae9190611bd9565b81600181518110610dc157610dc1611b7c565b6001600160a01b039283166020918202929092010152600b54610de79130911684610e63565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e20908590600090869030904290600401611bf6565b600060405180830381600087803b158015610e3a57600080fd5b505af1158015610e4e573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610ec55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c5565b6001600160a01b038216610f265760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c5565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610feb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c5565b6001600160a01b03821661104d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c5565b600081116110af5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c5565b6001600160a01b03831660009081526005602052604090205460ff16156111575760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104c5565b6001600160a01b03831660009081526004602052604081205460ff1615801561119957506001600160a01b03831660009081526004602052604090205460ff16155b80156111af5750600c54600160a81b900460ff16155b80156111df5750600c546001600160a01b03858116911614806111df5750600c546001600160a01b038481169116145b156113ba57600c54600160b81b900460ff1661123d5760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104c5565b50600c546001906001600160a01b03858116911614801561126c5750600b546001600160a01b03848116911614155b8015611279575042600e54115b156112c057600061128984610685565b90506112a960646112a3678ac7230489e8000060026114da565b9061155c565b6112b3848361159e565b11156112be57600080fd5b505b600d5442036112ed576001600160a01b0383166000908152600560205260409020805460ff191660011790555b60006112f830610685565b600c54909150600160b01b900460ff161580156113235750600c546001600160a01b03868116911614155b156113b85780156113b857600c54611357906064906112a390600f90611351906001600160a01b0316610685565b906114da565b81111561138457600c54611381906064906112a390600f90611351906001600160a01b0316610685565b90505b6000611396600d6112a38460036114da565b90506113a28183611c67565b91506113ad816115fd565b6113b682610ce9565b505b505b6113c68484848461162d565b50505050565b600081848411156113f05760405162461bcd60e51b81526004016104c59190611916565b5060006113fd8486611c67565b95945050505050565b600060065482111561146d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104c5565b6000611477611730565b9050611483838261155c565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826000036114ec575060006104f8565b60006114f88385611c7e565b9050826115058583611c9d565b146114835760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c5565b600061148383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611753565b6000806115ab8385611bc1565b9050838110156114835760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c5565b600c805460ff60b01b1916600160b01b17905561161d3061dead83610f87565b50600c805460ff60b01b19169055565b808061163b5761163b611781565b60008060008061164a8761179d565b6001600160a01b038d166000908152600160205260409020549397509195509350915061167790856117e4565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546116a6908461159e565b6001600160a01b0389166000908152600160205260409020556116c881611826565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161170d91815260200190565b60405180910390a3505050508061172957611729600954600855565b5050505050565b600080600061173d611870565b909250905061174c828261155c565b9250505090565b600081836117745760405162461bcd60e51b81526004016104c59190611916565b5060006113fd8486611c9d565b60006008541161179057600080fd5b6008805460095560009055565b6000806000806000806117b2876008546118b0565b9150915060006117c0611730565b90506000806117d08a85856118dd565b909b909a5094985092965092945050505050565b600061148383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113cc565b6000611830611730565b9050600061183e83836114da565b3060009081526001602052604090205490915061185b908261159e565b30600090815260016020526040902055505050565b6006546000908190678ac7230489e8000061188b828261155c565b8210156118a757505060065492678ac7230489e8000092509050565b90939092509050565b600080806118c360646112a387876114da565b905060006118d186836117e4565b96919550909350505050565b600080806118eb86856114da565b905060006118f986866114da565b9050600061190783836117e4565b92989297509195505050505050565b600060208083528351808285015260005b8181101561194357858101830151858201604001528201611927565b81811115611955576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104e457600080fd5b803561198b8161196b565b919050565b600080604083850312156119a357600080fd5b82356119ae8161196b565b946020939093013593505050565b6000806000606084860312156119d157600080fd5b83356119dc8161196b565b925060208401356119ec8161196b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a2657600080fd5b823567ffffffffffffffff80821115611a3e57600080fd5b818501915085601f830112611a5257600080fd5b813581811115611a6457611a646119fd565b8060051b604051601f19603f83011681018181108582111715611a8957611a896119fd565b604052918252848201925083810185019188831115611aa757600080fd5b938501935b82851015611acc57611abd85611980565b84529385019392850192611aac565b98975050505050505050565b600060208284031215611aea57600080fd5b81356114838161196b565b60008060408385031215611b0857600080fd5b8235611b138161196b565b91506020830135611b238161196b565b809150509250929050565b600060208284031215611b4057600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611bba57611bba611b92565b5060010190565b60008219821115611bd457611bd4611b92565b500190565b600060208284031215611beb57600080fd5b81516114838161196b565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c465784516001600160a01b031683529383019391830191600101611c21565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611c7957611c79611b92565b500390565b6000816000190483118215151615611c9857611c98611b92565b500290565b600082611cba57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204be1e03873726eb976a802094bf82670961f84ab68888c172a2ce35e2dc5d9e464736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,717
0x5b190220162683c85aec7fba34df0b47aac204b6
pragma solidity ^0.4.18; // File: zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/token/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/token/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } // File: zeppelin-solidity/contracts/token/BurnableToken.sol /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } } // File: zeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: zeppelin-solidity/contracts/token/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: zeppelin-solidity/contracts/token/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: zeppelin-solidity/contracts/token/MintableToken.sol /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } } // File: contracts/SilcToken.sol contract SilcToken is MintableToken, BurnableToken { string public name = "SILC"; string public symbol = "SILC"; uint8 public decimals = 18; function burn(address burner, uint256 _value) public onlyOwner { require(_value <= balances[burner]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } }
0x6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461010057806306fdde0314610129578063095ea7b3146101b357806318160ddd146101d757806323b872dd146101fe578063313ce5671461022857806340c10f191461025357806342966c6814610277578063661884631461029157806370a08231146102b55780637d64bcb4146102d65780638da5cb5b146102eb57806395d89b411461031c5780639dc29fac14610331578063a9059cbb14610355578063d73dd62314610379578063dd62ed3e1461039d578063f2fde38b146103c4575b600080fd5b34801561010c57600080fd5b506101156103e5565b604080519115158252519081900360200190f35b34801561013557600080fd5b5061013e610406565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610178578181015183820152602001610160565b50505050905090810190601f1680156101a55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101bf57600080fd5b50610115600160a060020a0360043516602435610494565b3480156101e357600080fd5b506101ec6104fa565b60408051918252519081900360200190f35b34801561020a57600080fd5b50610115600160a060020a0360043581169060243516604435610500565b34801561023457600080fd5b5061023d610679565b6040805160ff9092168252519081900360200190f35b34801561025f57600080fd5b50610115600160a060020a0360043516602435610682565b34801561028357600080fd5b5061028f60043561079e565b005b34801561029d57600080fd5b50610115600160a060020a036004351660243561084e565b3480156102c157600080fd5b506101ec600160a060020a036004351661093e565b3480156102e257600080fd5b50610115610959565b3480156102f757600080fd5b506103006109ff565b60408051600160a060020a039092168252519081900360200190f35b34801561032857600080fd5b5061013e610a0e565b34801561033d57600080fd5b5061028f600160a060020a0360043516602435610a69565b34801561036157600080fd5b50610115600160a060020a0360043516602435610b41565b34801561038557600080fd5b50610115600160a060020a0360043516602435610c24565b3480156103a957600080fd5b506101ec600160a060020a0360043581169060243516610cbd565b3480156103d057600080fd5b5061028f600160a060020a0360043516610ce8565b60035474010000000000000000000000000000000000000000900460ff1681565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b820191906000526020600020905b81548152906001019060200180831161046f57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60005481565b6000600160a060020a038316151561051757600080fd5b600160a060020a03841660009081526001602052604090205482111561053c57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561056c57600080fd5b600160a060020a038416600090815260016020526040902054610595908363ffffffff610d7d16565b600160a060020a0380861660009081526001602052604080822093909355908516815220546105ca908363ffffffff610d8f16565b600160a060020a03808516600090815260016020908152604080832094909455918716815260028252828120338252909152205461060e908363ffffffff610d7d16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60065460ff1681565b600354600090600160a060020a0316331461069c57600080fd5b60035474010000000000000000000000000000000000000000900460ff16156106c457600080fd5b6000546106d7908363ffffffff610d8f16565b6000908155600160a060020a038416815260016020526040902054610702908363ffffffff610d8f16565b600160a060020a038416600081815260016020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b336000908152600160205260408120548211156107ba57600080fd5b50336000818152600160205260409020546107db908363ffffffff610d7d16565b600160a060020a03821660009081526001602052604081209190915554610808908363ffffffff610d7d16565b600055604080518381529051600160a060020a038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808311156108a357336000908152600260209081526040808320600160a060020a03881684529091528120556108d8565b6108b3818463ffffffff610d7d16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526001602052604090205490565b600354600090600160a060020a0316331461097357600080fd5b60035474010000000000000000000000000000000000000000900460ff161561099b57600080fd5b6003805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600354600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561048c5780601f106104615761010080835404028352916020019161048c565b600354600160a060020a03163314610a8057600080fd5b600160a060020a038216600090815260016020526040902054811115610aa557600080fd5b600160a060020a038216600090815260016020526040902054610ace908263ffffffff610d7d16565b600160a060020a03831660009081526001602052604081209190915554610afb908263ffffffff610d7d16565b600055604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b6000600160a060020a0383161515610b5857600080fd5b33600090815260016020526040902054821115610b7457600080fd5b33600090815260016020526040902054610b94908363ffffffff610d7d16565b3360009081526001602052604080822092909255600160a060020a03851681522054610bc6908363ffffffff610d8f16565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610c58908363ffffffff610d8f16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610cff57600080fd5b600160a060020a0381161515610d1457600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610d8957fe5b50900390565b600082820183811015610d9e57fe5b93925050505600a165627a7a7230582031b8b436ade5b2389b5ddecc2f37a177f1c8c36bec1215d69d1e9748a1baf89e0029
{"success": true, "error": null, "results": {}}
9,718
0x23668e2961310ab550a3698ad7b8a67b0c521bf8
/** *Submitted for verification at Etherscan.io on 2021-02-05 */ // SPDX-License-Identifier: MIT pragma solidity ^0.7.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call{ value : amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract sVault { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; struct Reward { uint256 amount; uint256 timestamp; uint256 totalDeposit; } mapping(address => uint256) public _lastCheckTime; mapping(address => uint256) public _rewardBalance; mapping(address => uint256) public _depositBalances; uint256 public _totalDeposit; Reward[] public _rewards; string public _vaultName; IERC20 public token0; IERC20 public token1; address public feeAddress; address public vaultAddress; uint32 public feePermill; uint256 public delayDuration = 7 days; bool public withdrawable; uint256 public totalRate = 10000; uint256 public userRate = 8500; address public treasury; address public gov; uint256 public _rewardCount; event SentReward(uint256 amount); event Deposited(address indexed user, uint256 amount); event ClaimedReward(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); constructor (address _token0, address _token1, address _feeAddress, address _vaultAddress, string memory name, address _treasury) payable { token0 = IERC20(_token0); token1 = IERC20(_token1); feeAddress = _feeAddress; vaultAddress = _vaultAddress; _vaultName = name; gov = msg.sender; treasury = _treasury; } modifier onlyGov() { require(msg.sender == gov, "!governance"); _; } function setGovernance(address _gov) external onlyGov { gov = _gov; } function setToken0(address _token) external onlyGov { token0 = IERC20(_token); } function setTotalRate(uint256 _totalRate) external onlyGov { totalRate = _totalRate; } function setTreasury(address _treasury) external onlyGov { treasury = _treasury; } function setUserRate(uint256 _userRate) external onlyGov { userRate = _userRate; } function setToken1(address _token) external onlyGov { token1 = IERC20(_token); } function setFeeAddress(address _feeAddress) external onlyGov { feeAddress = _feeAddress; } function setVaultAddress(address _vaultAddress) external onlyGov { vaultAddress = _vaultAddress; } function setFeePermill(uint32 _feePermill) external onlyGov { feePermill = _feePermill; } function setDelayDuration(uint32 _delayDuration) external onlyGov { delayDuration = _delayDuration; } function setWithdrawable(bool _withdrawable) external onlyGov { withdrawable = _withdrawable; } function setVaultName(string memory name) external onlyGov { _vaultName = name; } function balance0() external view returns (uint256) { return token0.balanceOf(address(this)); } function balance1() external view returns (uint256) { return token1.balanceOf(address(this)); } function getReward(address userAddress) internal { uint256 lastCheckTime = _lastCheckTime[userAddress]; uint256 rewardBalance = _rewardBalance[userAddress]; if (lastCheckTime > 0 && _rewards.length > 0) { for (uint i = _rewards.length - 1; lastCheckTime < _rewards[i].timestamp; i--) { rewardBalance = rewardBalance.add(_rewards[i].amount.mul(_depositBalances[userAddress]).div(_rewards[i].totalDeposit)); if (i == 0) break; } } _rewardBalance[userAddress] = rewardBalance; _lastCheckTime[msg.sender] = block.timestamp; } function deposit(uint256 amount) external { getReward(msg.sender); uint256 feeAmount = amount.mul(feePermill).div(1000); uint256 realAmount = amount.sub(feeAmount); if (feeAmount > 0) { token0.safeTransferFrom(msg.sender, feeAddress, feeAmount); } if (realAmount > 0) { token0.safeTransferFrom(msg.sender, vaultAddress, realAmount); _depositBalances[msg.sender] = _depositBalances[msg.sender].add(realAmount); _totalDeposit = _totalDeposit.add(realAmount); emit Deposited(msg.sender, realAmount); } } function withdraw(uint256 amount) external { require(token0.balanceOf(address(this)) > 0, "no withdraw amount"); require(withdrawable, "not withdrawable"); getReward(msg.sender); if (amount > _depositBalances[msg.sender]) { amount = _depositBalances[msg.sender]; } require(amount > 0, "can't withdraw 0"); token0.safeTransfer(msg.sender, amount); _depositBalances[msg.sender] = _depositBalances[msg.sender].sub(amount); _totalDeposit = _totalDeposit.sub(amount); emit Withdrawn(msg.sender, amount); } function sendReward(uint256 amount) external { require(amount > 0, "can't reward 0"); require(_totalDeposit > 0, "totalDeposit must bigger than 0"); uint256 amountUser = amount.mul(userRate).div(totalRate); amount = amount.sub(amountUser); token1.safeTransferFrom(msg.sender, address(this), amountUser); token1.safeTransferFrom(msg.sender, treasury, amount); Reward memory reward; reward = Reward(amountUser, block.timestamp, _totalDeposit); _rewards.push(reward); emit SentReward(amountUser); } function claimReward(uint256 amount) external { getReward(msg.sender); uint256 rewardLimit = getRewardAmount(msg.sender); if (amount > rewardLimit) { amount = rewardLimit; } _rewardBalance[msg.sender] = _rewardBalance[msg.sender].sub(amount); token1.safeTransfer(msg.sender, amount); } function claimRewardAll() external { getReward(msg.sender); uint256 rewardLimit = getRewardAmount(msg.sender); _rewardBalance[msg.sender] = _rewardBalance[msg.sender].sub(rewardLimit); token1.safeTransfer(msg.sender, rewardLimit); } function getRewardAmount(address userAddress) public view returns (uint256) { uint256 lastCheckTime = _lastCheckTime[userAddress]; uint256 rewardBalance = _rewardBalance[userAddress]; if (_rewards.length > 0) { if (lastCheckTime > 0) { for (uint i = _rewards.length - 1; lastCheckTime < _rewards[i].timestamp; i--) { rewardBalance = rewardBalance.add(_rewards[i].amount.mul(_depositBalances[userAddress]).div(_rewards[i].totalDeposit)); if (i == 0) break; } } for (uint j = _rewards.length - 1; block.timestamp < _rewards[j].timestamp.add(delayDuration); j--) { uint256 timedAmount = _rewards[j].amount.mul(_depositBalances[userAddress]).div(_rewards[j].totalDeposit); timedAmount = timedAmount.mul(_rewards[j].timestamp.add(delayDuration).sub(block.timestamp)).div(delayDuration); rewardBalance = rewardBalance.sub(timedAmount); if (j == 0) break; } } return rewardBalance; } function seize(address token, address to) external onlyGov { require(IERC20(token) != token0 && IERC20(token) != token1, "main tokens"); if (token != address(0)) { uint256 amount = IERC20(token).balanceOf(address(this)); IERC20(token).transfer(to, amount); } else { uint256 amount = address(this).balance; payable(to).transfer(amount); } } fallback () external payable { } receive () external payable { } }
0x6080604052600436106102345760003560e01c8063ab033ea91161012e578063c78b6dea116100ab578063e4186aa61161006f578063e4186aa6146107d9578063f0f442601461080c578063fab980b71461083f578063fcc0c680146108c9578063fe7b82d9146109045761023b565b8063c78b6dea14610729578063cbeb7ef214610753578063d21220a71461077f578063d86e1ef714610794578063e2aa2a85146107c45761023b565b8063b79ea884116100f2578063b79ea88414610669578063b8f6e8411461069c578063b8f79288146106b1578063c45c4f58146106e1578063c6e426bd146106f65761023b565b8063ab033ea91461059a578063adc3b31b146105cd578063ae169a5014610600578063b5984a361461062a578063b6b55f251461063f5761023b565b8063430bf08a116101bc578063637830ca11610180578063637830ca146104c257806371e2f020146104d757806385535cc5146104ec5780638705fcd41461051f5780638f1e9405146105525761023b565b8063430bf08a1461040e57806344264d3d1461042357806344a040f514610451578063501883011461048457806361d027b3146104ad5761023b565b806327b5b6a01161020357806327b5b6a01461035d5780632e1a7d4d1461039057806336422e54146103ba57806341275358146103e457806342a66f68146103f95761023b565b80630dfe16811461023d57806311cc66b21461026e57806312d43a51146103215780631c69ad00146103365761023b565b3661023b57005b005b34801561024957600080fd5b5061025261092e565b604080516001600160a01b039092168252519081900360200190f35b34801561027a57600080fd5b5061023b6004803603602081101561029157600080fd5b8101906020810181356401000000008111156102ac57600080fd5b8201836020820111156102be57600080fd5b803590602001918460018302840111640100000000831117156102e057600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061093d945050505050565b34801561032d57600080fd5b506102526109a1565b34801561034257600080fd5b5061034b6109b0565b60408051918252519081900360200190f35b34801561036957600080fd5b5061034b6004803603602081101561038057600080fd5b50356001600160a01b0316610a2c565b34801561039c57600080fd5b5061023b600480360360208110156103b357600080fd5b5035610a3e565b3480156103c657600080fd5b5061023b600480360360208110156103dd57600080fd5b5035610c4a565b3480156103f057600080fd5b50610252610c9c565b34801561040557600080fd5b5061034b610cab565b34801561041a57600080fd5b50610252610cb1565b34801561042f57600080fd5b50610438610cc0565b6040805163ffffffff9092168252519081900360200190f35b34801561045d57600080fd5b5061034b6004803603602081101561047457600080fd5b50356001600160a01b0316610cd3565b34801561049057600080fd5b50610499610e76565b604080519115158252519081900360200190f35b3480156104b957600080fd5b50610252610e7f565b3480156104ce57600080fd5b5061023b610e8e565b3480156104e357600080fd5b5061034b610eee565b3480156104f857600080fd5b5061023b6004803603602081101561050f57600080fd5b50356001600160a01b0316610ef4565b34801561052b57600080fd5b5061023b6004803603602081101561054257600080fd5b50356001600160a01b0316610f63565b34801561055e57600080fd5b5061057c6004803603602081101561057557600080fd5b5035610fd2565b60408051938452602084019290925282820152519081900360600190f35b3480156105a657600080fd5b5061023b600480360360208110156105bd57600080fd5b50356001600160a01b0316611005565b3480156105d957600080fd5b5061034b600480360360208110156105f057600080fd5b50356001600160a01b0316611074565b34801561060c57600080fd5b5061023b6004803603602081101561062357600080fd5b5035611086565b34801561063657600080fd5b5061034b6110ee565b34801561064b57600080fd5b5061023b6004803603602081101561066257600080fd5b50356110f4565b34801561067557600080fd5b5061023b6004803603602081101561068c57600080fd5b50356001600160a01b03166111f7565b3480156106a857600080fd5b5061034b611266565b3480156106bd57600080fd5b5061023b600480360360208110156106d457600080fd5b503563ffffffff1661126c565b3480156106ed57600080fd5b5061034b6112df565b34801561070257600080fd5b5061023b6004803603602081101561071957600080fd5b50356001600160a01b031661132a565b34801561073557600080fd5b5061023b6004803603602081101561074c57600080fd5b5035611399565b34801561075f57600080fd5b5061023b6004803603602081101561077657600080fd5b50351515611586565b34801561078b57600080fd5b506102526115e6565b3480156107a057600080fd5b5061023b600480360360208110156107b757600080fd5b503563ffffffff166115f5565b3480156107d057600080fd5b5061034b61164d565b3480156107e557600080fd5b5061034b600480360360208110156107fc57600080fd5b50356001600160a01b0316611653565b34801561081857600080fd5b5061023b6004803603602081101561082f57600080fd5b50356001600160a01b0316611665565b34801561084b57600080fd5b506108546116d4565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561088e578181015183820152602001610876565b50505050905090810190601f1680156108bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108d557600080fd5b5061023b600480360360408110156108ec57600080fd5b506001600160a01b0381358116916020013516611762565b34801561091057600080fd5b5061023b6004803603602081101561092757600080fd5b503561196b565b6006546001600160a01b031681565b600f546001600160a01b0316331461098a576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b805161099d906005906020840190611f9c565b5050565b600f546001600160a01b031681565b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156109fb57600080fd5b505afa158015610a0f573d6000803e3d6000fd5b505050506040513d6020811015610a2557600080fd5b5051905090565b60006020819052908152604090205481565b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610a8957600080fd5b505afa158015610a9d573d6000803e3d6000fd5b505050506040513d6020811015610ab357600080fd5b505111610afc576040805162461bcd60e51b81526020600482015260126024820152711b9bc81dda5d1a191c985dc8185b5bdd5b9d60721b604482015290519081900360640190fd5b600b5460ff16610b46576040805162461bcd60e51b815260206004820152601060248201526f6e6f7420776974686472617761626c6560801b604482015290519081900360640190fd5b610b4f336119bd565b33600090815260026020526040902054811115610b785750336000908152600260205260409020545b60008111610bc0576040805162461bcd60e51b815260206004820152601060248201526f063616e277420776974686472617720360841b604482015290519081900360640190fd5b600654610bd7906001600160a01b03163383611ac5565b33600090815260026020526040902054610bf19082611b17565b33600090815260026020526040902055600354610c0e9082611b17565b60035560408051828152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250565b600f546001600160a01b03163314610c97576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600d55565b6008546001600160a01b031681565b600c5481565b6009546001600160a01b031681565b600954600160a01b900463ffffffff1681565b6001600160a01b03811660009081526020818152604080832054600190925282205460045415610e6f578115610dc757600454600019015b60048181548110610d1857fe5b906000526020600020906003020160010154831015610dc557610db0610da960048381548110610d4457fe5b906000526020600020906003020160020154610da3600260008a6001600160a01b03166001600160a01b031681526020019081526020016000205460048681548110610d8c57fe5b600091825260209091206003909102015490611b62565b90611bbb565b8390611bfd565b915080610dbc57610dc5565b60001901610d0b565b505b600454600019015b610e02600a5460048381548110610de257fe5b906000526020600020906003020160010154611bfd90919063ffffffff16565b421015610e6d576000610e1b60048381548110610d4457fe5b9050610e4a600a54610da3610e4342610e3d600a5460048981548110610de257fe5b90611b17565b8490611b62565b9050610e568382611b17565b925081610e635750610e6d565b5060001901610dcf565b505b9392505050565b600b5460ff1681565b600e546001600160a01b031681565b610e97336119bd565b6000610ea233610cd3565b33600090815260016020526040902054909150610ebf9082611b17565b33600081815260016020526040902091909155600754610eeb916001600160a01b039091169083611ac5565b50565b600d5481565b600f546001600160a01b03163314610f41576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600f546001600160a01b03163314610fb0576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60048181548110610fe257600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b600f546001600160a01b03163314611052576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60016020526000908152604090205481565b61108f336119bd565b600061109a33610cd3565b9050808211156110a8578091505b336000908152600160205260409020546110c29083611b17565b3360008181526001602052604090209190915560075461099d916001600160a01b039091169084611ac5565b600a5481565b6110fd336119bd565b600954600090611127906103e890610da390859063ffffffff600160a01b909104811690611b6216565b905060006111358383611b17565b9050811561115c5760085460065461115c916001600160a01b039182169133911685611c57565b80156111f257600954600654611181916001600160a01b039182169133911684611c57565b3360009081526002602052604090205461119b9082611bfd565b336000908152600260205260409020556003546111b89082611bfd565b60035560408051828152905133917f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4919081900360200190a25b505050565b600f546001600160a01b03163314611244576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60035481565b600f546001600160a01b031633146112b9576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6009805463ffffffff909216600160a01b0263ffffffff60a01b19909216919091179055565b600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156109fb57600080fd5b600f546001600160a01b03163314611377576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b600081116113df576040805162461bcd60e51b815260206004820152600e60248201526d063616e27742072657761726420360941b604482015290519081900360640190fd5b600060035411611436576040805162461bcd60e51b815260206004820152601f60248201527f746f74616c4465706f736974206d75737420626967676572207468616e203000604482015290519081900360640190fd5b6000611453600c54610da3600d5485611b6290919063ffffffff16565b905061145f8282611b17565b60075490925061147a906001600160a01b0316333084611c57565b600e54600754611499916001600160a01b039182169133911685611c57565b6114a1612028565b50604080516060810182528281524260208083019182526003805484860190815260048054600181018255600091909152855192027f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b81019290925592517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d909201919091558251848152925191927feae918ad14bd0bcaa9f9d22da2b810c02f44331bf6004a76f049a3360891f916929081900390910190a1505050565b600f546001600160a01b031633146115d3576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600b805460ff1916911515919091179055565b6007546001600160a01b031681565b600f546001600160a01b03163314611642576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b63ffffffff16600a55565b60105481565b60026020526000908152604090205481565b600f546001600160a01b031633146116b2576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6005805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561175a5780601f1061172f5761010080835404028352916020019161175a565b820191906000526020600020905b81548152906001019060200180831161173d57829003601f168201915b505050505081565b600f546001600160a01b031633146117af576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6006546001600160a01b038381169116148015906117db57506007546001600160a01b03838116911614155b61181a576040805162461bcd60e51b815260206004820152600b60248201526a6d61696e20746f6b656e7360a81b604482015290519081900360640190fd5b6001600160a01b0382161561192d576000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561187857600080fd5b505afa15801561188c573d6000803e3d6000fd5b505050506040513d60208110156118a257600080fd5b50516040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905291519293509085169163a9059cbb916044808201926020929091908290030181600087803b1580156118fa57600080fd5b505af115801561190e573d6000803e3d6000fd5b505050506040513d602081101561192457600080fd5b5061099d915050565b60405147906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015611965573d6000803e3d6000fd5b50505050565b600f546001600160a01b031633146119b8576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600c55565b6001600160a01b0381166000908152602081815260408083205460019092529091205481158015906119f0575060045415155b15611a9557600454600019015b60048181548110611a0a57fe5b906000526020600020906003020160010154831015611a9357611a7e610da960048381548110611a3657fe5b906000526020600020906003020160020154610da360026000896001600160a01b03166001600160a01b031681526020019081526020016000205460048681548110610d8c57fe5b915080611a8a57611a93565b600019016119fd565b505b6001600160a01b039092166000908152600160209081526040808320949094553382528190529190912042905550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526111f2908490611cad565b6000611b5983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e64565b90505b92915050565b600082611b7157506000611b5c565b82820282848281611b7e57fe5b0414611b595760405162461bcd60e51b815260040180806020018281038252602181526020018061205f6021913960400191505060405180910390fd5b6000611b5983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611efb565b600082820183811015611b59576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526119659085905b611cbf826001600160a01b0316611f60565b611d10576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b600080836001600160a01b0316836040518082805190602001908083835b60208310611d4d5780518252601f199092019160209182019101611d2e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611daf576040519150601f19603f3d011682016040523d82523d6000602084013e611db4565b606091505b509150915081611e0b576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561196557808060200190516020811015611e2757600080fd5b50516119655760405162461bcd60e51b815260040180806020018281038252602a815260200180612080602a913960400191505060405180910390fd5b60008184841115611ef35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611eb8578181015183820152602001611ea0565b50505050905090810190601f168015611ee55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183611f4a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611eb8578181015183820152602001611ea0565b506000838581611f5657fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590611f945750808214155b949350505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282611fd25760008555612018565b82601f10611feb57805160ff1916838001178555612018565b82800160010185558215612018579182015b82811115612018578251825591602001919060010190611ffd565b50612024929150612049565b5090565b60405180606001604052806000815260200160008152602001600081525090565b5b80821115612024576000815560010161204a56fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122042d613be6e3a02fe17c0d7be989a2adfbd1c498a58a82ef65db2b1803e6a571264736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
9,719
0xd98e95984ac615ec3bcebad81368b44f2c05c599
pragma solidity ^0.4.24; // File: bancor-contracts/solidity/contracts/utility/interfaces/IOwned.sol /* Owned contract interface */ contract IOwned { // this function isn't abstract since the compiler emits automatically generated getter functions as external function owner() public view returns (address) {} function transferOwnership(address _newOwner) public; function acceptOwnership() public; } // File: bancor-contracts/solidity/contracts/utility/Owned.sol /* Provides support and utilities for contract ownership */ contract Owned is IOwned { address public owner; address public newOwner; event OwnerUpdate(address indexed _prevOwner, address indexed _newOwner); /** @dev constructor */ constructor() public { owner = msg.sender; } // allows execution by the owner only modifier ownerOnly { assert(msg.sender == owner); _; } /** @dev allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner @param _newOwner new contract owner */ function transferOwnership(address _newOwner) public ownerOnly { require(_newOwner != owner); newOwner = _newOwner; } /** @dev used by a new owner to accept an ownership transfer */ function acceptOwnership() public { require(msg.sender == newOwner); emit OwnerUpdate(owner, newOwner); owner = newOwner; newOwner = address(0); } } // File: bancor-contracts/solidity/contracts/token/interfaces/IERC20Token.sol /* ERC20 Standard Token interface */ contract IERC20Token { // these functions aren't abstract since the compiler emits automatically generated getter functions as external function name() public view returns (string) {} function symbol() public view returns (string) {} function decimals() public view returns (uint8) {} function totalSupply() public view returns (uint256) {} function balanceOf(address _owner) public view returns (uint256) { _owner; } function allowance(address _owner, address _spender) public view returns (uint256) { _owner; _spender; } function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); } // File: bancor-contracts/solidity/contracts/utility/Utils.sol /* Utilities & Common Modifiers */ contract Utils { /** constructor */ constructor() public { } // verifies that an amount is greater than zero modifier greaterThanZero(uint256 _amount) { require(_amount > 0); _; } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { require(_address != address(0)); _; } // verifies that the address is different than this contract address modifier notThis(address _address) { require(_address != address(this)); _; } // Overflow protected math functions /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y) internal pure returns (uint256) { uint256 z = _x + _y; assert(z >= _x); return z; } /** @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number @param _x minuend @param _y subtrahend @return difference */ function safeSub(uint256 _x, uint256 _y) internal pure returns (uint256) { assert(_x >= _y); return _x - _y; } /** @dev returns the product of multiplying _x by _y, asserts if the calculation overflows @param _x factor 1 @param _y factor 2 @return product */ function safeMul(uint256 _x, uint256 _y) internal pure returns (uint256) { uint256 z = _x * _y; assert(_x == 0 || z / _x == _y); return z; } } // File: bancor-contracts/solidity/contracts/utility/interfaces/ITokenHolder.sol /* Token Holder interface */ contract ITokenHolder is IOwned { function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) public; } // File: bancor-contracts/solidity/contracts/utility/TokenHolder.sol /* We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. */ contract TokenHolder is ITokenHolder, Owned, Utils { /** @dev constructor */ constructor() public { } /** @dev withdraws tokens held by the contract and sends them to an account can only be called by the owner @param _token ERC20 token contract address @param _to account to receive the new amount @param _amount amount to withdraw */ function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) public ownerOnly validAddress(_token) validAddress(_to) notThis(_to) { assert(_token.transfer(_to, _amount)); } } // File: bancor-contracts/solidity/contracts/token/ERC20Token.sol /** ERC20 Standard Token implementation */ contract ERC20Token is IERC20Token, Utils { string public standard = 'Token 0.1'; string public name = ''; string public symbol = ''; uint8 public decimals = 0; uint256 public totalSupply = 0; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); /** @dev constructor @param _name token name @param _symbol token symbol @param _decimals decimal points, for display purposes */ constructor(string _name, string _symbol, uint8 _decimals) public { require(bytes(_name).length > 0 && bytes(_symbol).length > 0); // validate input name = _name; symbol = _symbol; decimals = _decimals; } /** @dev send coins throws on any error rather then return a false flag to minimize user errors @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transfer(address _to, uint256 _value) public validAddress(_to) returns (bool success) { balanceOf[msg.sender] = safeSub(balanceOf[msg.sender], _value); balanceOf[_to] = safeAdd(balanceOf[_to], _value); emit Transfer(msg.sender, _to, _value); return true; } /** @dev an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors @param _from source address @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transferFrom(address _from, address _to, uint256 _value) public validAddress(_from) validAddress(_to) returns (bool success) { allowance[_from][msg.sender] = safeSub(allowance[_from][msg.sender], _value); balanceOf[_from] = safeSub(balanceOf[_from], _value); balanceOf[_to] = safeAdd(balanceOf[_to], _value); emit Transfer(_from, _to, _value); return true; } /** @dev allow another account/contract to spend some tokens on your behalf throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value @param _spender approved address @param _value allowance amount @return true if the approval was successful, false if it wasn't */ function approve(address _spender, uint256 _value) public validAddress(_spender) returns (bool success) { // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal require(_value == 0 || allowance[msg.sender][_spender] == 0); allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } } // File: bancor-contracts/solidity/contracts/token/interfaces/ISmartToken.sol /* Smart Token interface */ contract ISmartToken is IOwned, IERC20Token { function disableTransfers(bool _disable) public; function issue(address _to, uint256 _amount) public; function destroy(address _from, uint256 _amount) public; } // File: bancor-contracts/solidity/contracts/token/SmartToken.sol /* Smart Token v0.3 'Owned' is specified here for readability reasons */ contract SmartToken is ISmartToken, Owned, ERC20Token, TokenHolder { string public version = '0.3'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not // triggered when a smart token is deployed - the _token address is defined for forward compatibility, in case we want to trigger the event from a factory event NewSmartToken(address _token); // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); /** @dev constructor @param _name token name @param _symbol token short symbol, minimum 1 character @param _decimals for display purposes only */ constructor(string _name, string _symbol, uint8 _decimals) public ERC20Token(_name, _symbol, _decimals) { emit NewSmartToken(address(this)); } // allows execution only when transfers aren't disabled modifier transfersAllowed { assert(transfersEnabled); _; } /** @dev disables/enables transfers can only be called by the contract owner @param _disable true to disable transfers, false to enable them */ function disableTransfers(bool _disable) public ownerOnly { transfersEnabled = !_disable; } /** @dev increases the token supply and sends the new tokens to an account can only be called by the contract owner @param _to account to receive the new amount @param _amount amount to increase the supply by */ function issue(address _to, uint256 _amount) public ownerOnly validAddress(_to) notThis(_to) { totalSupply = safeAdd(totalSupply, _amount); balanceOf[_to] = safeAdd(balanceOf[_to], _amount); emit Issuance(_amount); emit Transfer(this, _to, _amount); } /** @dev removes tokens from an account and decreases the token supply can be called by the contract owner to destroy tokens from any account or by any holder to destroy tokens from his/her own account @param _from account to remove the amount from @param _amount amount to decrease the supply by */ function destroy(address _from, uint256 _amount) public { require(msg.sender == _from || msg.sender == owner); // validate input balanceOf[_from] = safeSub(balanceOf[_from], _amount); totalSupply = safeSub(totalSupply, _amount); emit Transfer(_from, this, _amount); emit Destruction(_amount); } // ERC20 standard method overrides with some extra functionality /** @dev send coins throws on any error rather then return a false flag to minimize user errors in addition to the standard checks, the function throws if transfers are disabled @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { assert(super.transfer(_to, _value)); return true; } /** @dev an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors in addition to the standard checks, the function throws if transfers are disabled @param _from source address @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { assert(super.transferFrom(_from, _to, _value)); return true; } } // File: contracts/BAYToken.sol /** * @title DAICO Bay Token * @dev DAICO Bay Token is a Smart Token based on Bancor Protocol */ contract BAYToken is SmartToken ( "DAICO Bay Token", "BAY", 18){ constructor() { issue(msg.sender, 10**10 * 10**18); } }
0x6080604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610116578063095ea7b3146101a05780631608f18f146101d857806318160ddd146101f457806323b872dd1461021b578063313ce5671461024557806354fd4d50146102705780635a3b7e42146102855780635e35359e1461029a57806370a08231146102c457806379ba5097146102e5578063867904b4146102fa5780638da5cb5b1461031e57806395d89b411461034f578063a24835d114610364578063a9059cbb14610388578063bef97c87146103ac578063d4ee1d90146103c1578063dd62ed3e146103d6578063f2fde38b146103fd575b600080fd5b34801561012257600080fd5b5061012b61041e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016557818101518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101ac57600080fd5b506101c4600160a060020a03600435166024356104ac565b604080519115158252519081900360200190f35b3480156101e457600080fd5b506101f26004351515610565565b005b34801561020057600080fd5b5061020961058b565b60408051918252519081900360200190f35b34801561022757600080fd5b506101c4600160a060020a0360043581169060243516604435610591565b34801561025157600080fd5b5061025a6105bf565b6040805160ff9092168252519081900360200190f35b34801561027c57600080fd5b5061012b6105c8565b34801561029157600080fd5b5061012b610623565b3480156102a657600080fd5b506101f2600160a060020a036004358116906024351660443561067b565b3480156102d057600080fd5b50610209600160a060020a036004351661078a565b3480156102f157600080fd5b506101f261079c565b34801561030657600080fd5b506101f2600160a060020a0360043516602435610824565b34801561032a57600080fd5b5061033361091d565b60408051600160a060020a039092168252519081900360200190f35b34801561035b57600080fd5b5061012b61092c565b34801561037057600080fd5b506101f2600160a060020a0360043516602435610987565b34801561039457600080fd5b506101c4600160a060020a0360043516602435610a64565b3480156103b857600080fd5b506101c4610a90565b3480156103cd57600080fd5b50610333610a99565b3480156103e257600080fd5b50610209600160a060020a0360043581169060243516610aa8565b34801561040957600080fd5b506101f2600160a060020a0360043516610ac5565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104a45780601f10610479576101008083540402835291602001916104a4565b820191906000526020600020905b81548152906001019060200180831161048757829003601f168201915b505050505081565b600082600160a060020a03811615156104c457600080fd5b8215806104f25750336000908152600860209081526040808320600160a060020a0388168452909152902054155b15156104fd57600080fd5b336000818152600860209081526040808320600160a060020a03891680855290835292819020879055805187815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600054600160a060020a0316331461057957fe5b600a805460ff19169115919091179055565b60065481565b600a5460009060ff1615156105a257fe5b6105ad848484610b23565b15156105b557fe5b5060019392505050565b60055460ff1681565b6009805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104a45780601f10610479576101008083540402835291602001916104a4565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156104a45780601f10610479576101008083540402835291602001916104a4565b600054600160a060020a0316331461068f57fe5b82600160a060020a03811615156106a557600080fd5b82600160a060020a03811615156106bb57600080fd5b83600160a060020a0381163014156106d257600080fd5b85600160a060020a031663a9059cbb86866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561074e57600080fd5b505af1158015610762573d6000803e3d6000fd5b505050506040513d602081101561077857600080fd5b5051151561078257fe5b505050505050565b60076020526000908152604090205481565b600154600160a060020a031633146107b357600080fd5b60015460008054604051600160a060020a0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600054600160a060020a0316331461083857fe5b81600160a060020a038116151561084e57600080fd5b82600160a060020a03811630141561086557600080fd5b61087160065484610c3a565b600655600160a060020a0384166000908152600760205260409020546108979084610c3a565b600160a060020a03851660009081526007602090815260409182902092909255805185815290517f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3929181900390910190a1604080518481529051600160a060020a038616913091600080516020610d0e8339815191529181900360200190a350505050565b600054600160a060020a031681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104a45780601f10610479576101008083540402835291602001916104a4565b33600160a060020a03831614806109a85750600054600160a060020a031633145b15156109b357600080fd5b600160a060020a0382166000908152600760205260409020546109d69082610c50565b600160a060020a0383166000908152600760205260409020556006546109fc9082610c50565b6006556040805182815290513091600160a060020a03851691600080516020610d0e8339815191529181900360200190a36040805182815290517f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd34539181900360200190a15050565b600a5460009060ff161515610a7557fe5b610a7f8383610c62565b1515610a8757fe5b50600192915050565b600a5460ff1681565b600154600160a060020a031681565b600860209081526000928352604080842090915290825290205481565b600054600160a060020a03163314610ad957fe5b600054600160a060020a0382811691161415610af457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600083600160a060020a0381161515610b3b57600080fd5b83600160a060020a0381161515610b5157600080fd5b600160a060020a0386166000908152600860209081526040808320338452909152902054610b7f9085610c50565b600160a060020a038716600081815260086020908152604080832033845282528083209490945591815260079091522054610bba9085610c50565b600160a060020a038088166000908152600760205260408082209390935590871681522054610be99085610c3a565b600160a060020a0380871660008181526007602090815260409182902094909455805188815290519193928a1692600080516020610d0e83398151915292918290030190a350600195945050505050565b600082820183811015610c4957fe5b9392505050565b600081831015610c5c57fe5b50900390565b600082600160a060020a0381161515610c7a57600080fd5b33600090815260076020526040902054610c949084610c50565b3360009081526007602052604080822092909255600160a060020a03861681522054610cc09084610c3a565b600160a060020a038516600081815260076020908152604091829020939093558051868152905191923392600080516020610d0e8339815191529281900390910190a350600193925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582099b592bd3d0c3dc83c0a9c722f854b2671aa3a40d2bb12e92914967f366b813e0029
{"success": true, "error": null, "results": {}}
9,720
0x9851f32a68498a456c711d0c1130f198f3058c84
pragma solidity ^0.4.21 ; contract RE_Portfolio_XIV_883 { mapping (address => uint256) public balanceOf; string public name = " RE_Portfolio_XIV_883 " ; string public symbol = " RE883XIV " ; uint8 public decimals = 18 ; uint256 public totalSupply = 1544348011475110000000000000 ; event Transfer(address indexed from, address indexed to, uint256 value); function SimpleERC20Token() public { balanceOf[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function transfer(address to, uint256 value) public returns (bool success) { require(balanceOf[msg.sender] >= value); balanceOf[msg.sender] -= value; // deduct from sender's balance balanceOf[to] += value; // add to recipient's balance emit Transfer(msg.sender, to, value); return true; } event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => mapping(address => uint256)) public allowance; function approve(address spender, uint256 value) public returns (bool success) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } function transferFrom(address from, address to, uint256 value) public returns (bool success) { require(value <= balanceOf[from]); require(value <= allowance[from][msg.sender]); balanceOf[from] -= value; balanceOf[to] += value; allowance[from][msg.sender] -= value; emit Transfer(from, to, value); return true; } // } // Programme d'émission - Lignes 1 à 10 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XIV_metadata_line_1_____Montpelier_Underwriting_Agencies_Limited_20250515 > // < x5Vts2z5Cq772X6WtJR8pW1Un7OKQI6a5LpsEKc73NKQuo3Z4BeK3ME9ugSrw0d9 > // < 1E-018 limites [ 1E-018 ; 12117403,5211375 ] > // < 0x000000000000000000000000000000000000000000000000000000004839B2B4 > // < RE_Portfolio_XIV_metadata_line_2_____Montpelier_Underwriting_Agencies_Limited_20250515 > // < pB5A0Lm77lsvV296vJfouKCB8N333Xs2508O6b6UgQ66u138yYtZr4e6QuGKVG1B > // < 1E-018 limites [ 12117403,5211375 ; 72283429,5542331 ] > // < 0x000000000000000000000000000000000000000000000004839B2B41AED7C49F > // < RE_Portfolio_XIV_metadata_line_3_____MS_Amlin_Plc_20250515 > // < 57j804app68uttTCx2jHn2WLgxKr8u25t86810z4lk85YTlaGQaqGOU5I7515jek > // < 1E-018 limites [ 72283429,5542331 ; 138917010,987791 ] > // < 0x00000000000000000000000000000000000000000000001AED7C49F33C028B5E > // < RE_Portfolio_XIV_metadata_line_4_____MS_Amlin_PLC_BBBp_20250515 > // < UUkeeea0A82Anx8usU2jQL5q1pmfjF415K83mL2FVjio0ixb7qk1WNp3Np3KO1Xs > // < 1E-018 limites [ 138917010,987791 ; 150740217,679471 ] > // < 0x000000000000000000000000000000000000000000000033C028B5E3827B537B > // < RE_Portfolio_XIV_metadata_line_5_____MS_Amlin_Underwriting_Limited_20250515 > // < WMZ8C6Q5qZ53c9i7MeWiCAHPXv0NZyaoHPnDB0HZNFpZSAlXKLD0O2IabUMfga1g > // < 1E-018 limites [ 150740217,679471 ; 194247264,480008 ] > // < 0x00000000000000000000000000000000000000000000003827B537B485CDCFA4 > // < RE_Portfolio_XIV_metadata_line_6_____MS_Amlin_Underwriting_Limited_20250515 > // < gM6o88XIxz05817IE6RyU9zbNxzs6VX19A86m59AowccUB8Bow7mVH5e5F64VqSa > // < 1E-018 limites [ 194247264,480008 ; 219903880,764582 ] > // < 0x0000000000000000000000000000000000000000000000485CDCFA451EBAB360 > // < RE_Portfolio_XIV_metadata_line_7_____MS_Amlin_Underwriting_Limited_20250515 > // < f4tDM6YTsAqP7U6F817QBAEn1O9alV3iM19VH1ztZTosrl2K0Ya28M28oR88fX6b > // < 1E-018 limites [ 219903880,764582 ; 261370390,417575 ] > // < 0x000000000000000000000000000000000000000000000051EBAB360615E392B5 > // < RE_Portfolio_XIV_metadata_line_8_____MSAD_Insurance_Group_Holdings_Incorporated_20250515 > // < xZssI11x93PJf0375DKLKMykmInbAXC03Fqcb0BouplFVZqX59H6i9i29ocy2LPS > // < 1E-018 limites [ 261370390,417575 ; 310154419,08619 ] > // < 0x0000000000000000000000000000000000000000000000615E392B5738AA17E8 > // < RE_Portfolio_XIV_metadata_line_9_____Munchener_Ruck_Munich_Re__Ap_20250515 > // < GF8XEi8d8Pd6SeUhT75Ut4Zz51e3Po8w5KYJ2GBE3QX9rXH7z5667eH4xUy59d9H > // < 1E-018 limites [ 310154419,08619 ; 351448543,719141 ] > // < 0x0000000000000000000000000000000000000000000000738AA17E882ECBED57 > // < RE_Portfolio_XIV_metadata_line_10_____Munich_American_Reassurance_Company_20250515 > // < leXW729EvKBt9T0nMoSUWGb1791sxX67ROBV1aQOi24TCp56AsB5TSMQHNkszOkO > // < 1E-018 limites [ 351448543,719141 ; 368934345,889944 ] > // < 0x000000000000000000000000000000000000000000000082ECBED578970524D0 > // Programme d'émission - Lignes 11 à 20 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XIV_metadata_line_11_____Munich_Re_Group_20250515 > // < nSKL2c363g3BLa5Z8I4OsBH9AP9800H9aNNUX9815uM3m06BjMfhYmJL7x9oL2ui > // < 1E-018 limites [ 368934345,889944 ; 389958536,948538 ] > // < 0x00000000000000000000000000000000000000000000008970524D0914558372 > // < RE_Portfolio_XIV_metadata_line_12_____Munich_Re_Group_20250515 > // < Fi40jHIdQO5bOCsCE8684H10HHM104O32b4XNqZVG098IMb6Z9LjwDSw44MzqN5I > // < 1E-018 limites [ 389958536,948538 ; 435388713,555604 ] > // < 0x0000000000000000000000000000000000000000000000914558372A231E762F > // < RE_Portfolio_XIV_metadata_line_13_____Munich_Re_Group_20250515 > // < YW49f5KG8LP4TBS9m04sbW77F8Y770k387Oj7hy6FvvVzwaGiQCdN75KxH36aLwh > // < 1E-018 limites [ 435388713,555604 ; 486969634,303127 ] > // < 0x0000000000000000000000000000000000000000000000A231E762FB5690B35A > // < RE_Portfolio_XIV_metadata_line_14_____Munich_Re_Syndicate_Limited_20250515 > // < IG3X3F9KZ5i84Gp33LE4v2GT9l2I71uX0FrsbOnTmWXyoJZ3YAJpItKm856bLk09 > // < 1E-018 limites [ 486969634,303127 ; 498847945,56237 ] > // < 0x0000000000000000000000000000000000000000000000B5690B35AB9D5D90B0 > // < RE_Portfolio_XIV_metadata_line_15_____Munich_Re_Syndicate_Limited_20250515 > // < zzwsgEhuK5KSx2QKdu0ltIOC0JA8rOSVa89F4CfF7IP5u893IUjM82F7mIJm7oFa > // < 1E-018 limites [ 498847945,56237 ; 518787182,556995 ] > // < 0x0000000000000000000000000000000000000000000000B9D5D90B0C14366D23 > // < RE_Portfolio_XIV_metadata_line_16_____Munich_Re_Syndicate_Limited_20250515 > // < 1h3l2OaHHBHAvoV9ab04z8aq63Qv03hjGGg5BrE28VRm2hU5RnMi604J5itY5369 > // < 1E-018 limites [ 518787182,556995 ; 538720502,724537 ] > // < 0x0000000000000000000000000000000000000000000000C14366D23C8B064254 > // < RE_Portfolio_XIV_metadata_line_17_____Munich_Reinsurance_Company_20250515 > // < 6in8MpHCS3AX9y2wU54pKw7aF2t7cZL6Sn7iC9E00KJR6FUhY3eXCr4PCw9Gq8pe > // < 1E-018 limites [ 538720502,724537 ; 561929625,744253 ] > // < 0x0000000000000000000000000000000000000000000000C8B064254D155C9202 > // < RE_Portfolio_XIV_metadata_line_18_____Mutual_Reinsurance_Bureau_20250515 > // < m0STK0z318eYLHL98AEP23if1RpEDVh12a8tI6V63pha1g9NN2Ipbq734abwmz6R > // < 1E-018 limites [ 561929625,744253 ; 572623162,432259 ] > // < 0x0000000000000000000000000000000000000000000000D155C9202D55199CC7 > // < RE_Portfolio_XIV_metadata_line_19_____National_General_Insurance_Company__PSC__m_Am_20250515 > // < u4Uebd8v979X8Hp6Pk47572GZq7Jp1W6g316xW6VpeoDSjZ1YB2fSh0R9hY47ck9 > // < 1E-018 limites [ 572623162,432259 ; 606718391,550442 ] > // < 0x0000000000000000000000000000000000000000000000D55199CC7E2052CDA7 > // < RE_Portfolio_XIV_metadata_line_20_____National_Liability_&_Fire_Ins_Co_AAp_App_20250515 > // < t500zc2OQzBWm8FnSze1v2hV83SXX250iZd32a188aUD8d9EK9be3MRnHKnO8D8s > // < 1E-018 limites [ 606718391,550442 ; 643137191,242521 ] > // < 0x0000000000000000000000000000000000000000000000E2052CDA7EF9657B48 > // Programme d'émission - Lignes 21 à 30 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XIV_metadata_line_21_____National_Union_Fire_Ins_Co_Of_Pitisburgh_Pennsylvania_Ap_A_20250515 > // < 0e7lK37Gk59BdaFn1VOFL1LLRdkzAnbTl1g25T16Yjg0Ip0CXNZ22DC0yI60h97r > // < 1E-018 limites [ 643137191,242521 ; 658000285,62596 ] > // < 0x0000000000000000000000000000000000000000000000EF9657B48F51FCC386 > // < RE_Portfolio_XIV_metadata_line_22_____Navigators_Ins_Co_A_A_20250515 > // < 0G8Vr72Ij885VT5PMz214S3g64zEL5f07Jo8bE4fCtboanp4y4T0w9nP0UOI4Khj > // < 1E-018 limites [ 658000285,62596 ; 737808183,566224 ] > // < 0x000000000000000000000000000000000000000000000F51FCC386112DADF3A8 > // < RE_Portfolio_XIV_metadata_line_23_____Navigators_Underwriting_Agency_Limited_20250515 > // < 77Z57Hf1vs8ihdC1017tiCqD2ZwlvXv3ZBqi3aD15HOtM46ej62D15K4Umg1vF0B > // < 1E-018 limites [ 737808183,566224 ; 788150204,765719 ] > // < 0x00000000000000000000000000000000000000000000112DADF3A81259BDC7B0 > // < RE_Portfolio_XIV_metadata_line_24_____Navigators_Underwriting_Agency_Limited_20250515 > // < j2Lku1w867tqTLjHBszu9emBq8yIvH2U44xOd6IXuh569nOSZ3181zCu76fXzDd7 > // < 1E-018 limites [ 788150204,765719 ; 812462552,295025 ] > // < 0x000000000000000000000000000000000000000000001259BDC7B012EAA77A71 > // < RE_Portfolio_XIV_metadata_line_25_____Neon_Underwriting_Limited_20250515 > // < IuGgH35o773r0u250rV15GPW36q48jJS8092H662Ka1vq0SaTevY3j58Ka33zKUZ > // < 1E-018 limites [ 812462552,295025 ; 859182749,164533 ] > // < 0x0000000000000000000000000000000000000000000012EAA77A71140120D758 > // < RE_Portfolio_XIV_metadata_line_26_____Neon_Underwriting_Limited_20250515 > // < o33fgjH43kFpYE5MNNzMl8u042S1G0WoI5S9ol6Z37nDcwG03nJODJhqJjhdWRR3 > // < 1E-018 limites [ 859182749,164533 ; 886672597,947944 ] > // < 0x00000000000000000000000000000000000000000000140120D75814A4FB0586 > // < RE_Portfolio_XIV_metadata_line_27_____New_Hampshire_Ins_Ap_A_20250515 > // < pZ40I7ediK0mYQ2l92g2XX971MKioy0pL4bIL9ny85aX5wKF1lCObURyj4UYl1B5 > // < 1E-018 limites [ 886672597,947944 ; 963425755,543964 ] > // < 0x0000000000000000000000000000000000000000000014A4FB0586166E770BB6 > // < RE_Portfolio_XIV_metadata_line_28_____New_Zealand_AA_CBL_Insurance_Limited_Am_20250515 > // < sw5H61ZY7b4a8p5wA1s0ghb2885liN3iV2xqR3z3SUEtDjwsWdnvgJ0lO82WReh9 > // < 1E-018 limites [ 963425755,543964 ; 1015707449,91526 ] > // < 0x00000000000000000000000000000000000000000000166E770BB617A6169493 > // < RE_Portfolio_XIV_metadata_line_29_____Newline_Underwriting_Management_Limited_20250515 > // < viS41171qp6PnkHg3yWY61GWk0In0dKZ4uOVXj597i97oyxvNR6j7QwRW0fHBet8 > // < 1E-018 limites [ 1015707449,91526 ; 1034219423,962 ] > // < 0x0000000000000000000000000000000000000000000017A616949318146D9C70 > // < RE_Portfolio_XIV_metadata_line_30_____Newline_Underwriting_Management_Limited_20250515 > // < qF7m00AWiVW5AIM7A5bDe8rRj69zo2H2rK9ZorY6W1P934w544atV9TJ9LbDX80s > // < 1E-018 limites [ 1034219423,962 ; 1045982336,26699 ] > // < 0x0000000000000000000000000000000000000000000018146D9C70185A8A640E > // Programme d'émission - Lignes 31 à 40 // // // // // [ Nom du portefeuille ; Numéro de la ligne ; Nom de la ligne ; Echéance ] // [ Adresse exportée ] // [ Unité ; Limite basse ; Limite haute ] // [ Hex ] // // // // < RE_Portfolio_XIV_metadata_line_31_____Nipponkoa_Insurance_CO__China__Limited_m_Am_20250515 > // < 8GGXdlr0PdUseHyjFXNXr9212b02XIFoJF65qjMV4yki13n99tvD5VenT7kW6jRS > // < 1E-018 limites [ 1045982336,26699 ; 1103787829,04471 ] > // < 0x00000000000000000000000000000000000000000000185A8A640E19B31692AC > // < RE_Portfolio_XIV_metadata_line_32_____NKSJ_Holdings_Incorporated_20250515 > // < pPrlpyM1CAWxch7T0iFy7WIL5Z34QU4B9KusJJwHv2zM9zF2V1D9027pXIxP7J8y > // < 1E-018 limites [ 1103787829,04471 ; 1118141576,81781 ] > // < 0x0000000000000000000000000000000000000000000019B31692AC1A08A4A765 > // < RE_Portfolio_XIV_metadata_line_33_____Noacional_de_Reasseguros_20250515 > // < 6dJo6f8od8juGGGv1rLKA75uq4Ql10I6Avm657v59O47r3Qyx4J2E6EVA4f3f8q6 > // < 1E-018 limites [ 1118141576,81781 ; 1141141470,27767 ] > // < 0x000000000000000000000000000000000000000000001A08A4A7651A91BBB4C7 > // < RE_Portfolio_XIV_metadata_line_34_____Novae_Syndicates_Limited_20250515 > // < trl4x30W3h5NVtbGMBfEy08o99PeKs3dR8KY07XKyRK24B8LPu723zOv0c5SmSUL > // < 1E-018 limites [ 1141141470,27767 ; 1165277159,52978 ] > // < 0x000000000000000000000000000000000000000000001A91BBB4C71B2197D864 > // < RE_Portfolio_XIV_metadata_line_35_____Novae_Syndicates_Limited_20250515 > // < 8z95BrEb70pqSe1C3gsuB15e5Qx40n5HrPg23352Ns2Wkov97e3AxGrSaKWO8ojh > // < 1E-018 limites [ 1165277159,52978 ; 1232882860,41083 ] > // < 0x000000000000000000000000000000000000000000001B2197D8641CB48DF54D > // < RE_Portfolio_XIV_metadata_line_36_____Novae_Syndicates_Limited_20250515 > // < vy8qm5YxFMIwELo9k8lC33SgcT77D5Rp5ZILSgvUO03E42AHomR4m4ztQApimSgC > // < 1E-018 limites [ 1232882860,41083 ; ] > // < 0x000000000000000000000000000000000000000000001CB48DF54D1E0E1A85C7 > // < RE_Portfolio_XIV_metadata_line_37_____Odyssey_Re_20250515 > // < G71923TXVOd5JsG44MYW7ubtFdphx892EqilV1sw9tM4f0W58WIxir7xnUlSQBf2 > // < 1E-018 limites [ 1290856375,87123 ; 1365562355,90604 ] > // < 0x000000000000000000000000000000000000000000001E0E1A85C71FCB62CD3A > // < RE_Portfolio_XIV_metadata_line_38_____Odyssey_Re_Holdings_Corp_20250515 > // < 56ofL2KZ745JgHB77mic6n61vHD5C5Y90O2YTg8q9OFg21E4w2S60U3umN3AX7Tp > // < 1E-018 limites [ 1365562355,90604 ; 1421707651,22514 ] > // < 0x000000000000000000000000000000000000000000001FCB62CD3A211A09B936 > // < RE_Portfolio_XIV_metadata_line_39_____Odyssey_Re_Holdings_Corp_20250515 > // < nZlJD224351Shp525xF7eGMd9375Q32851mnuJK1PfhiWYG8ro6k2WU4jdj7Hw60 > // < 1E-018 limites [ 1421707651,22514 ; 1472011578,74957 ] > // < 0x00000000000000000000000000000000000000000000211A09B9362245DF6CE6 > // < RE_Portfolio_XIV_metadata_line_40_____Odyssey_Re_Holdings_Corporation_20250515 > // < TGIXDSzN4apX4iBXki5k1hd54Oj5SleeXyW8WNLQN1JQylo0eJoJ8N1kcD6Xm8UG > // < 1E-018 limites [ 1472011578,74957 ; 1544348011,47511 ] > // < 0x000000000000000000000000000000000000000000002245DF6CE623F5080FEF > }
0x6060604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063095ea7b31461013757806318160ddd1461019157806323b872dd146101ba578063313ce5671461023357806370a082311461026257806395d89b41146102af578063a9059cbb1461033d578063b5c8f31714610397578063dd62ed3e146103ac575b600080fd5b34156100b457600080fd5b6100bc610418565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fc5780820151818401526020810190506100e1565b50505050905090810190601f1680156101295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014257600080fd5b610177600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104b6565b604051808215151515815260200191505060405180910390f35b341561019c57600080fd5b6101a46105a8565b6040518082815260200191505060405180910390f35b34156101c557600080fd5b610219600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105ae565b604051808215151515815260200191505060405180910390f35b341561023e57600080fd5b61024661081a565b604051808260ff1660ff16815260200191505060405180910390f35b341561026d57600080fd5b610299600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061082d565b6040518082815260200191505060405180910390f35b34156102ba57600080fd5b6102c2610845565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103025780820151818401526020810190506102e7565b50505050905090810190601f16801561032f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561034857600080fd5b61037d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108e3565b604051808215151515815260200191505060405180910390f35b34156103a257600080fd5b6103aa610a39565b005b34156103b757600080fd5b610402600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ae8565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104ae5780601f10610483576101008083540402835291602001916104ae565b820191906000526020600020905b81548152906001019060200180831161049157829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60045481565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156105fd57600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561068857600080fd5b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360009054906101000a900460ff1681565b60006020528060005260406000206000915090505481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108db5780601f106108b0576101008083540402835291602001916108db565b820191906000526020600020905b8154815290600101906020018083116108be57829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561093257600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6004546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6004546040518082815260200191505060405180910390a3565b60056020528160005260406000206020528060005260406000206000915091505054815600a165627a7a72305820f754bf56de56935cea204c8adcffa9037db71e3d23194303f1646baf5c62fb0f0029
{"success": true, "error": null, "results": {}}
9,721
0x4f490e1c4847d6013cc81504ba61778b1366be26
/** *Submitted for verification at Etherscan.io on 2022-03-31 */ /** The Quest ██████╗ ██╗ ██╗███████╗███████╗████████╗ ██╔═══██╗██║ ██║██╔════╝██╔════╝╚══██╔══╝ ██║ ██║██║ ██║█████╗ ███████╗ ██║ ██║▄▄ ██║██║ ██║██╔══╝ ╚════██║ ██║ ╚██████╔╝╚██████╔╝███████╗███████║ ██║ ╚══▀▀═╝ ╚═════╝ ╚══════╝╚══════╝ ╚═╝ At launch : Max transaction : 10000000000 Max wallet : 20000000000 ( Per address,you can use multiple addresses) 5% liquidity Fee on buying and selling QUEST There is no dev or marketing fee. QUEST is a social experiment style of token. All you need to do is buy and share/shill/promote or simply talk about it. Your Xs will depend on how much you shill. There is no team or dev behind the project. We will act simply as holders. There are no socials sites for the token,community is free to make one. */ // SPDX-License-Identifier: unlicense pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract QuestToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "QUEST";// string private constant _symbol = "QUEST";// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 0;// uint256 private _taxFeeOnBuy = 5;// //Sell Fee uint256 private _redisFeeOnSell = 0;// uint256 private _taxFeeOnSell = 5;// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x5a720085c582Df05158aF67F10e6B95240E7371A);// address payable private _marketingAddress = payable(0x7C25035E7B3877e323dC96636943Ecf78701D871);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000000 * 10**9; // uint256 public _maxWalletSize = 20000000000 * 10**9; // uint256 public _swapTokensAtAmount = 100000000 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock+1 && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; launchBlock = block.number; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190613048565b610702565b005b34801561021157600080fd5b5061021a61082c565b60405161022791906134a5565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612fa8565b610869565b604051610264919061346f565b60405180910390f35b34801561027957600080fd5b50610282610887565b60405161028f919061348a565b60405180910390f35b3480156102a457600080fd5b506102ad6108ad565b6040516102ba9190613687565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f55565b6108be565b6040516102f7919061346f565b60405180910390f35b34801561030c57600080fd5b50610315610997565b6040516103229190613687565b60405180910390f35b34801561033757600080fd5b5061034061099d565b60405161034d91906136fc565b60405180910390f35b34801561036257600080fd5b5061036b6109a6565b6040516103789190613454565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612ebb565b6109cc565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613091565b610abc565b005b3480156103df57600080fd5b506103e8610b6d565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612ebb565b610c3e565b60405161041e9190613687565b60405180910390f35b34801561043357600080fd5b5061043c610c8f565b005b34801561044a57600080fd5b50610465600480360381019061046091906130be565b610de2565b005b34801561047357600080fd5b5061047c610e81565b6040516104899190613687565b60405180910390f35b34801561049e57600080fd5b506104a7610e87565b6040516104b49190613454565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df9190613091565b610eb0565b005b3480156104f257600080fd5b506104fb610f69565b6040516105089190613687565b60405180910390f35b34801561051d57600080fd5b50610526610f6f565b60405161053391906134a5565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e91906130be565b610fac565b005b34801561057157600080fd5b5061058c600480360381019061058791906130eb565b61104b565b005b34801561059a57600080fd5b506105b560048036038101906105b09190612fa8565b611102565b6040516105c2919061346f565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612ebb565b611120565b6040516105ff919061346f565b60405180910390f35b34801561061457600080fd5b5061061d611140565b005b34801561062b57600080fd5b5061064660048036038101906106419190612fe8565b611219565b005b34801561065457600080fd5b5061065d611353565b60405161066a9190613687565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612f15565b611359565b6040516106a79190613687565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d291906130be565b6113e0565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612ebb565b61147f565b005b61070a611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e906135e7565b60405180910390fd5b60005b8151811015610828576001601160008484815181106107bc576107bb613a7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610820906139d3565b91505061079a565b5050565b60606040518060400160405280600581526020017f5155455354000000000000000000000000000000000000000000000000000000815250905090565b600061087d610876611641565b8484611649565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b60006108cb848484611814565b61098c846108d7611641565b61098785604051806060016040528060288152602001613f2860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093d611641565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121f49092919063ffffffff16565b611649565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109d4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a58906135e7565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ac4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b48906135e7565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bae611641565b73ffffffffffffffffffffffffffffffffffffffff161480610c245750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0c611641565b73ffffffffffffffffffffffffffffffffffffffff16145b610c2d57600080fd5b6000479050610c3b81612258565b50565b6000610c88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612353565b9050919050565b610c97611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dea611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906135e7565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eb8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3c906135e7565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600581526020017f5155455354000000000000000000000000000000000000000000000000000000815250905090565b610fb4611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611041576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611038906135e7565b60405180910390fd5b8060198190555050565b611053611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d7906135e7565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061111661110f611641565b8484611814565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611181611641565b73ffffffffffffffffffffffffffffffffffffffff1614806111f75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111df611641565b73ffffffffffffffffffffffffffffffffffffffff16145b61120057600080fd5b600061120b30610c3e565b9050611216816123c1565b50565b611221611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a5906135e7565b60405180910390fd5b60005b8383905081101561134d5781600560008686858181106112d4576112d3613a7a565b5b90506020020160208101906112e99190612ebb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611345906139d3565b9150506112b1565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113e8611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146c906135e7565b60405180910390fd5b8060188190555050565b611487611641565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611514576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150b906135e7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157b90613547565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b090613667565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611729576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172090613567565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118079190613687565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187b90613627565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118eb906134c7565b60405180910390fd5b60008111611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e90613607565b60405180910390fd5b61193f610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ad575061197d610e87565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ef357601660149054906101000a900460ff16611a3c576119ce610e87565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a32906134e7565b60405180910390fd5b5b601754811115611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7890613527565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b255750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5b90613587565b60405180910390fd5b6001600854611b7391906137bd565b4311158015611bcf5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c295750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c6157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cbf576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d6c5760185481611d2184610c3e565b611d2b91906137bd565b10611d6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6290613647565b60405180910390fd5b5b6000611d7730610c3e565b9050600060195482101590506017548210611d925760175491505b808015611dac5750601660159054906101000a900460ff16155b8015611e065750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e1c575060168054906101000a900460ff165b8015611e725750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec85750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef057611ed6826123c1565b60004790506000811115611eee57611eed47612258565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f9a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061204d5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561204c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561205b57600090506121e2565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121065750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561211e57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121c95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156121e157600b54600d81905550600c54600e819055505b5b6121ee84848484612649565b50505050565b600083831115829061223c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223391906134a5565b60405180910390fd5b506000838561224b919061389e565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122a860028461267690919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122d3573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61232460028461267690919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561234f573d6000803e3d6000fd5b5050565b600060065482111561239a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161239190613507565b60405180910390fd5b60006123a46126c0565b90506123b9818461267690919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156123f9576123f8613aa9565b5b6040519080825280602002602001820160405280156124275781602001602082028036833780820191505090505b509050308160008151811061243f5761243e613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156124e157600080fd5b505afa1580156124f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125199190612ee8565b8160018151811061252d5761252c613a7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061259430601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611649565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016125f89594939291906136a2565b600060405180830381600087803b15801561261257600080fd5b505af1158015612626573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b80612657576126566126eb565b5b61266284848461272e565b806126705761266f6128f9565b5b50505050565b60006126b883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061290d565b905092915050565b60008060006126cd612970565b915091506126e4818361267690919063ffffffff16565b9250505090565b6000600d541480156126ff57506000600e54145b156127095761272c565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b600080600080600080612740876129d2565b95509550955095509550955061279e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a3a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061287f81612ae2565b6128898483612b9f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128e69190613687565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612954576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294b91906134a5565b60405180910390fd5b50600083856129639190613813565b9050809150509392505050565b600080600060065490506000683635c9adc5dea0000090506129a6683635c9adc5dea0000060065461267690919063ffffffff16565b8210156129c557600654683635c9adc5dea000009350935050506129ce565b81819350935050505b9091565b60008060008060008060008060006129ef8a600d54600e54612bd9565b92509250925060006129ff6126c0565b90506000806000612a128e878787612c6f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612a7c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f4565b905092915050565b6000808284612a9391906137bd565b905083811015612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf906135a7565b60405180910390fd5b8091505092915050565b6000612aec6126c0565b90506000612b038284612cf890919063ffffffff16565b9050612b5781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a8490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612bb482600654612a3a90919063ffffffff16565b600681905550612bcf81600754612a8490919063ffffffff16565b6007819055505050565b600080600080612c056064612bf7888a612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c2f6064612c21888b612cf890919063ffffffff16565b61267690919063ffffffff16565b90506000612c5882612c4a858c612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612c888589612cf890919063ffffffff16565b90506000612c9f8689612cf890919063ffffffff16565b90506000612cb68789612cf890919063ffffffff16565b90506000612cdf82612cd18587612a3a90919063ffffffff16565b612a3a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612d0b5760009050612d6d565b60008284612d199190613844565b9050828482612d289190613813565b14612d68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5f906135c7565b60405180910390fd5b809150505b92915050565b6000612d86612d818461373c565b613717565b90508083825260208201905082856020860282011115612da957612da8613ae2565b5b60005b85811015612dd95781612dbf8882612de3565b845260208401935060208301925050600181019050612dac565b5050509392505050565b600081359050612df281613ee2565b92915050565b600081519050612e0781613ee2565b92915050565b60008083601f840112612e2357612e22613add565b5b8235905067ffffffffffffffff811115612e4057612e3f613ad8565b5b602083019150836020820283011115612e5c57612e5b613ae2565b5b9250929050565b600082601f830112612e7857612e77613add565b5b8135612e88848260208601612d73565b91505092915050565b600081359050612ea081613ef9565b92915050565b600081359050612eb581613f10565b92915050565b600060208284031215612ed157612ed0613aec565b5b6000612edf84828501612de3565b91505092915050565b600060208284031215612efe57612efd613aec565b5b6000612f0c84828501612df8565b91505092915050565b60008060408385031215612f2c57612f2b613aec565b5b6000612f3a85828601612de3565b9250506020612f4b85828601612de3565b9150509250929050565b600080600060608486031215612f6e57612f6d613aec565b5b6000612f7c86828701612de3565b9350506020612f8d86828701612de3565b9250506040612f9e86828701612ea6565b9150509250925092565b60008060408385031215612fbf57612fbe613aec565b5b6000612fcd85828601612de3565b9250506020612fde85828601612ea6565b9150509250929050565b60008060006040848603121561300157613000613aec565b5b600084013567ffffffffffffffff81111561301f5761301e613ae7565b5b61302b86828701612e0d565b9350935050602061303e86828701612e91565b9150509250925092565b60006020828403121561305e5761305d613aec565b5b600082013567ffffffffffffffff81111561307c5761307b613ae7565b5b61308884828501612e63565b91505092915050565b6000602082840312156130a7576130a6613aec565b5b60006130b584828501612e91565b91505092915050565b6000602082840312156130d4576130d3613aec565b5b60006130e284828501612ea6565b91505092915050565b6000806000806080858703121561310557613104613aec565b5b600061311387828801612ea6565b945050602061312487828801612ea6565b935050604061313587828801612ea6565b925050606061314687828801612ea6565b91505092959194509250565b600061315e838361316a565b60208301905092915050565b613173816138d2565b82525050565b613182816138d2565b82525050565b600061319382613778565b61319d818561379b565b93506131a883613768565b8060005b838110156131d95781516131c08882613152565b97506131cb8361378e565b9250506001810190506131ac565b5085935050505092915050565b6131ef816138e4565b82525050565b6131fe81613927565b82525050565b61320d81613939565b82525050565b600061321e82613783565b61322881856137ac565b935061323881856020860161396f565b61324181613af1565b840191505092915050565b60006132596023836137ac565b915061326482613b02565b604082019050919050565b600061327c603f836137ac565b915061328782613b51565b604082019050919050565b600061329f602a836137ac565b91506132aa82613ba0565b604082019050919050565b60006132c2601c836137ac565b91506132cd82613bef565b602082019050919050565b60006132e56026836137ac565b91506132f082613c18565b604082019050919050565b60006133086022836137ac565b915061331382613c67565b604082019050919050565b600061332b6023836137ac565b915061333682613cb6565b604082019050919050565b600061334e601b836137ac565b915061335982613d05565b602082019050919050565b60006133716021836137ac565b915061337c82613d2e565b604082019050919050565b60006133946020836137ac565b915061339f82613d7d565b602082019050919050565b60006133b76029836137ac565b91506133c282613da6565b604082019050919050565b60006133da6025836137ac565b91506133e582613df5565b604082019050919050565b60006133fd6023836137ac565b915061340882613e44565b604082019050919050565b60006134206024836137ac565b915061342b82613e93565b604082019050919050565b61343f81613910565b82525050565b61344e8161391a565b82525050565b60006020820190506134696000830184613179565b92915050565b600060208201905061348460008301846131e6565b92915050565b600060208201905061349f60008301846131f5565b92915050565b600060208201905081810360008301526134bf8184613213565b905092915050565b600060208201905081810360008301526134e08161324c565b9050919050565b600060208201905081810360008301526135008161326f565b9050919050565b6000602082019050818103600083015261352081613292565b9050919050565b60006020820190508181036000830152613540816132b5565b9050919050565b60006020820190508181036000830152613560816132d8565b9050919050565b60006020820190508181036000830152613580816132fb565b9050919050565b600060208201905081810360008301526135a08161331e565b9050919050565b600060208201905081810360008301526135c081613341565b9050919050565b600060208201905081810360008301526135e081613364565b9050919050565b6000602082019050818103600083015261360081613387565b9050919050565b60006020820190508181036000830152613620816133aa565b9050919050565b60006020820190508181036000830152613640816133cd565b9050919050565b60006020820190508181036000830152613660816133f0565b9050919050565b6000602082019050818103600083015261368081613413565b9050919050565b600060208201905061369c6000830184613436565b92915050565b600060a0820190506136b76000830188613436565b6136c46020830187613204565b81810360408301526136d68186613188565b90506136e56060830185613179565b6136f26080830184613436565b9695505050505050565b60006020820190506137116000830184613445565b92915050565b6000613721613732565b905061372d82826139a2565b919050565b6000604051905090565b600067ffffffffffffffff82111561375757613756613aa9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137c882613910565b91506137d383613910565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561380857613807613a1c565b5b828201905092915050565b600061381e82613910565b915061382983613910565b92508261383957613838613a4b565b5b828204905092915050565b600061384f82613910565b915061385a83613910565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561389357613892613a1c565b5b828202905092915050565b60006138a982613910565b91506138b483613910565b9250828210156138c7576138c6613a1c565b5b828203905092915050565b60006138dd826138f0565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006139328261394b565b9050919050565b600061394482613910565b9050919050565b60006139568261395d565b9050919050565b6000613968826138f0565b9050919050565b60005b8381101561398d578082015181840152602081019050613972565b8381111561399c576000848401525b50505050565b6139ab82613af1565b810181811067ffffffffffffffff821117156139ca576139c9613aa9565b5b80604052505050565b60006139de82613910565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a1157613a10613a1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613eeb816138d2565b8114613ef657600080fd5b50565b613f02816138e4565b8114613f0d57600080fd5b50565b613f1981613910565b8114613f2457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b14290be88f31344f76a478e26b40b5038b4efd5ac1b7d3badcd53895410135b64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,722
0x1863b0c9f63e686a3e7928a21b527c7b3ced5895
/** *Submitted for verification at Etherscan.io on 2021-04-26 */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; // Interfaces for contract interaction interface INterfaces { function balanceOf(address) external returns (uint256); function transfer(address, uint256) external returns (bool); function transferFrom( address, address, uint256 ) external returns (bool); function allowance(address, address) external returns (uint256); //usdc function transferWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external; } // USDT is not ERC-20 compliant, not returning true on transfers interface IUsdt { function transfer(address, uint256) external; function transferFrom( address, address, uint256 ) external; } // BigShortBets.com presale contract - via StableCoins and ETH // // USE ONLY OWN WALLET (Metamask, Trezor, Ledger...) // DO NOT SEND FROM EXCHANGES OR ANY SERVICES // // Use ONLY ETH network, ERC20 tokens (Not Binance/Tron/whatever!) // // Set approval to contract address or use USDC authorization first // // DO NOT SEND STABLE TOKENS DIRECTLY - IT WILL NOT COUNT THAT! // // send ONLY round number of USD(c|t)/DAI! // ie 20, 500, 2000 NOT 20.1, 500.5, 2000.3 // contract will ignore decimals // // Need 150k gas limit // use proper pay* function contract BigShortBetsPresale2 { // max USD per user uint256 private immutable _maxUsd; // soft limit USD total uint256 private immutable _limitUsd; // max ETH per user uint256 private immutable _maxEth; // soft limit ETH total uint256 private immutable _limitEth; // contract starts accepting transfers uint256 private immutable _dateStart; // hard time limit uint256 private immutable _dateEnd; // total collected USD uint256 private _usdCollected; uint256 private constant DECIMALS_DAI = 18; uint256 private constant DECIMALS_USDC = 6; uint256 private constant DECIMALS_USDT = 6; // addresses of tokens address private immutable usdt; address private immutable usdc; address private immutable dai; address public owner; address public newOwner; bool private _presaleEnded; // deposited per user mapping(address => uint256) private _usdBalance; mapping(address => uint256) private _ethBalance; // deposited per tokens mapping(address => uint256) private _deposited; // will be set after presale uint256 private _tokensPerEth; string private constant ERROR_ANS = "Approval not set!"; event AcceptedUSD(address indexed user, uint256 amount); event AcceptedETH(address indexed user, uint256 amount); constructor( address _owner, uint256 maxUsd, uint256 limitUsd, uint256 maxEth, uint256 limitEth, uint256 startDate, uint256 endDate, address _usdt, address _usdc, address _dai ) { owner = _owner; _maxUsd = maxUsd; _limitUsd = limitUsd; _maxEth = maxEth; _limitEth = limitEth; _dateStart = startDate; _dateEnd = endDate; usdt = _usdt; usdc = _usdc; dai = _dai; /** mainnet: usdt=0xdAC17F958D2ee523a2206206994597C13D831ec7; usdc=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; dai=0x6B175474E89094C44Da98b954EedeAC495271d0F; */ } //pay in using USDC //need prepare and sign approval first //not included in dapp function payUsdcByAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external { require(to == address(this), "Wrong authorization address"); // should throw on any error INterfaces(usdc).transferWithAuthorization( from, to, value, validAfter, validBefore, nonce, v, r, s ); // not msg.sender, approval can be sent by anyone _pay(from, value, DECIMALS_USDC); _deposited[usdc] += value; } //pay in using USDC //use approve/transferFrom function payUSDC(uint256 amount) external { require( INterfaces(usdc).allowance(msg.sender, address(this)) >= amount, ERROR_ANS ); require( INterfaces(usdc).transferFrom(msg.sender, address(this), amount), "USDC transfer failed" ); _pay(msg.sender, amount, DECIMALS_USDC); _deposited[usdc] += amount; } //pay in using USDT //need set approval first function payUSDT(uint256 amount) external { require( INterfaces(usdt).allowance(msg.sender, address(this)) >= amount, ERROR_ANS ); IUsdt(usdt).transferFrom(msg.sender, address(this), amount); _pay(msg.sender, amount, DECIMALS_USDT); _deposited[usdt] += amount; } //pay in using DAI //need set approval first function payDAI(uint256 amount) external { require( INterfaces(dai).allowance(msg.sender, address(this)) >= amount, ERROR_ANS ); require( INterfaces(dai).transferFrom(msg.sender, address(this), amount), "DAI transfer failed" ); _pay(msg.sender, amount, DECIMALS_DAI); _deposited[dai] += amount; } //direct ETH send will not back // //accept ETH // takes about 50k gas receive() external payable { _payEth(msg.sender, msg.value); } // takes about 35k gas function payETH() external payable { _payEth(msg.sender, msg.value); } function _payEth(address user, uint256 amount) internal notEnded { uint256 amt = _ethBalance[user] + amount; require(amt <= _maxEth, "ETH per user reached"); _ethBalance[user] += amt; emit AcceptedETH(user, amount); } function _pay( address user, uint256 amount, uint256 decimals ) internal notEnded { uint256 usd = amount / (10**decimals); _usdBalance[user] += usd; require(_usdBalance[user] <= _maxUsd, "USD amount too high"); _usdCollected += usd; emit AcceptedUSD(user, usd); } // // external readers // function USDcollected() external view returns (uint256) { return _usdCollected; } function ETHcollected() external view returns (uint256) { return address(this).balance; } function USDmax() external view returns (uint256) { return _maxUsd; } function USDlimit() external view returns (uint256) { return _limitUsd; } function ETHmax() external view returns (uint256) { return _maxEth; } function ETHlimit() external view returns (uint256) { return _limitEth; } function dateStart() external view returns (uint256) { return _dateStart; } function dateEnd() external view returns (uint256) { return _dateEnd; } function tokensBoughtOf(address user) external view returns (uint256 amt) { require(_tokensPerEth > 0, "Tokens/ETH ratio not set yet"); amt = (_usdBalance[user] * 95) / 100; amt += _ethBalance[user] * _tokensPerEth; return amt; } function usdDepositOf(address user) external view returns (uint256) { return _usdBalance[user]; } function ethDepositOf(address user) external view returns (uint256) { return _ethBalance[user]; } modifier notEnded() { require(!_presaleEnded, "Presale ended"); require( block.timestamp > _dateStart && block.timestamp < _dateEnd, "Too soon or too late" ); _; } modifier onlyOwner() { require(msg.sender == owner, "Only for contract Owner"); _; } modifier timeIsUp() { require(block.timestamp > _dateEnd, "SOON"); _; } function endPresale() external onlyOwner { require( _usdCollected > _limitUsd || address(this).balance > _limitEth, "Limit not reached" ); _presaleEnded = true; } function setTokensPerEth(uint256 ratio) external onlyOwner { require(_tokensPerEth == 0, "Ratio already set"); _tokensPerEth = ratio; } // take out all stables and ETH function takeAll() external onlyOwner timeIsUp { _presaleEnded = true; //just to save gas for ppl that want buy too late uint256 amt = INterfaces(usdt).balanceOf(address(this)); if (amt > 0) { IUsdt(usdt).transfer(owner, amt); } amt = INterfaces(usdc).balanceOf(address(this)); if (amt > 0) { INterfaces(usdc).transfer(owner, amt); } amt = INterfaces(dai).balanceOf(address(this)); if (amt > 0) { INterfaces(dai).transfer(owner, amt); } amt = address(this).balance; if (amt > 0) { payable(owner).transfer(amt); } } // we can recover any ERC20 token send in wrong way... for price! function recoverErc20(address token) external onlyOwner { uint256 amt = INterfaces(token).balanceOf(address(this)); // do not take deposits amt -= _deposited[token]; if (amt > 0) { INterfaces(token).transfer(owner, amt); } } // should not be needed, but... function recoverEth() external onlyOwner timeIsUp { payable(owner).transfer(address(this).balance); } function changeOwner(address _newOwner) external onlyOwner { newOwner = _newOwner; } function acceptOwnership() external { require( msg.sender != address(0) && msg.sender == newOwner, "Only NewOwner" ); newOwner = address(0); owner = msg.sender; } } // rav3n_pl was here
0x60806040526004361061016a5760003560e01c80638ecad182116100d1578063b7e248f01161008a578063d4ee1d9011610064578063d4ee1d901461047e578063de3bcb971461049e578063e650fad3146104b3578063ec0f4543146104d357600080fd5b8063b7e248f014610416578063b95e099e14610449578063bcdb446b1461046957600080fd5b80638ecad182146103595780639cc083e514610379578063a3b6120c1461038e578063a43be57b146103c1578063a4989b16146103d6578063a6f9dae1146103f657600080fd5b8063650573231161012357806365057323146102685780636860d9661461029b57806379ba5097146102a357806389244e2a146102b85780638da5cb5b146102eb5780638de500c41461032357600080fd5b806307c3eb9d1461018057806321424e7d146101a05780633f252171146101c257806344bc408f146101f557806356238b02146102285780635d1a8d7b1461024857600080fd5b3661017b576101793334610509565b005b600080fd5b34801561018c57600080fd5b5061017961019b366004611a31565b6106e6565b3480156101ac57600080fd5b50475b6040519081526020015b60405180910390f35b3480156101ce57600080fd5b507f000000000000000000000000000000000000000000000000000000003b9aca006101af565b34801561020157600080fd5b507f00000000000000000000000000000000000000000000010f0cf064dd592000006101af565b34801561023457600080fd5b50610179610243366004611ad7565b61085a565b34801561025457600080fd5b50610179610263366004611ad7565b6108cd565b34801561027457600080fd5b507f0000000000000000000000000000000000000000000000000000000000003a986101af565b610179610afe565b3480156102af57600080fd5b50610179610b0a565b3480156102c457600080fd5b507f0000000000000000000000000000000000000000000000000000000060b55c5f6101af565b3480156102f757600080fd5b5060015461030b906001600160a01b031681565b6040516001600160a01b0390911681526020016101b9565b34801561032f57600080fd5b506101af61033e366004611a10565b6001600160a01b031660009081526003602052604090205490565b34801561036557600080fd5b506101af610374366004611a10565b610b7f565b34801561038557600080fd5b506000546101af565b34801561039a57600080fd5b507f00000000000000000000000000000000000000000000000000000000608673006101af565b3480156103cd57600080fd5b50610179610c3b565b3480156103e257600080fd5b506101796103f1366004611ad7565b610d09565b34801561040257600080fd5b50610179610411366004611a10565b610f31565b34801561042257600080fd5b507f0000000000000000000000000000000000000000000000004563918244f400006101af565b34801561045557600080fd5b50610179610464366004611a10565b610f7d565b34801561047557600080fd5b506101796110dd565b34801561048a57600080fd5b5060025461030b906001600160a01b031681565b3480156104aa57600080fd5b5061017961119b565b3480156104bf57600080fd5b506101796104ce366004611ad7565b611632565b3480156104df57600080fd5b506101af6104ee366004611a10565b6001600160a01b031660009081526004602052604090205490565b600254600160a01b900460ff16156105585760405162461bcd60e51b815260206004820152600d60248201526c141c995cd85b1948195b991959609a1b60448201526064015b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000060867300421180156105a657507f0000000000000000000000000000000000000000000000000000000060b55c5f42105b6105e95760405162461bcd60e51b8152602060048201526014602482015273546f6f20736f6f6e206f7220746f6f206c61746560601b604482015260640161054f565b6001600160a01b03821660009081526004602052604081205461060d908390611b91565b90507f0000000000000000000000000000000000000000000000004563918244f400008111156106765760405162461bcd60e51b8152602060048201526014602482015273115512081c195c881d5cd95c881c995858da195960621b604482015260640161054f565b6001600160a01b0383166000908152600460205260408120805483929061069e908490611b91565b90915550506040518281526001600160a01b038416907f825df8a9e2b41d546e3c6adc7e6a627331b734d67c4205dd66c9931f12a8cf6e9060200160405180910390a2505050565b6001600160a01b038816301461073e5760405162461bcd60e51b815260206004820152601b60248201527f57726f6e6720617574686f72697a6174696f6e20616464726573730000000000604482015260640161054f565b6040516371f70b0760e11b81526001600160a01b038a81166004830152898116602483015260448201899052606482018890526084820187905260a4820186905260ff851660c483015260e4820184905261010482018390527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063e3ee160e9061012401600060405180830381600087803b1580156107de57600080fd5b505af11580156107f2573d6000803e3d6000fd5b50505050610802898860066117f8565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48166000908152600560205260408120805489929061084a908490611b91565b9091555050505050505050505050565b6001546001600160a01b031633146108845760405162461bcd60e51b815260040161054f90611b5a565b600654156108c85760405162461bcd60e51b815260206004820152601160248201527014985d1a5bc8185b1c9958591e481cd95d607a1b604482015260640161054f565b600655565b604051636eb1769f60e11b815233600482015230602482015281907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03169063dd62ed3e90604401602060405180830381600087803b15801561093657600080fd5b505af115801561094a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096e9190611aef565b101560405180604001604052806011815260200170417070726f76616c206e6f74207365742160781b815250906109b85760405162461bcd60e51b815260040161054f9190611b07565b506040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906323b872dd90606401602060405180830381600087803b158015610a2757600080fd5b505af1158015610a3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5f9190611ab7565b610aa25760405162461bcd60e51b81526020600482015260146024820152731554d110c81d1c985b9cd9995c8819985a5b195960621b604482015260640161054f565b610aae338260066117f8565b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481660009081526005602052604081208054839290610af6908490611b91565b909155505050565b610b083334610509565b565b3315801590610b2357506002546001600160a01b031633145b610b5f5760405162461bcd60e51b815260206004820152600d60248201526c27b7363c902732bba7bbb732b960991b604482015260640161054f565b600280546001600160a01b03199081169091556001805490911633179055565b60008060065411610bd25760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e732f45544820726174696f206e6f74207365742079657400000000604482015260640161054f565b6001600160a01b038216600090815260036020526040902054606490610bf990605f611cb4565b610c039190611ba9565b6006546001600160a01b038416600090815260046020526040902054919250610c2b91611cb4565b610c359082611b91565b92915050565b6001546001600160a01b03163314610c655760405162461bcd60e51b815260040161054f90611b5a565b7f000000000000000000000000000000000000000000000000000000003b9aca006000541180610cb457507f00000000000000000000000000000000000000000000010f0cf064dd5920000047115b610cf45760405162461bcd60e51b8152602060048201526011602482015270131a5b5a5d081b9bdd081c995858da1959607a1b604482015260640161054f565b6002805460ff60a01b1916600160a01b179055565b604051636eb1769f60e11b815233600482015230602482015281907f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b03169063dd62ed3e90604401602060405180830381600087803b158015610d7257600080fd5b505af1158015610d86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610daa9190611aef565b101560405180604001604052806011815260200170417070726f76616c206e6f74207365742160781b81525090610df45760405162461bcd60e51b815260040161054f9190611b07565b506040516323b872dd60e01b8152336004820152306024820152604481018290527f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316906323b872dd90606401602060405180830381600087803b158015610e6357600080fd5b505af1158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b9190611ab7565b610edd5760405162461bcd60e51b8152602060048201526013602482015272111052481d1c985b9cd9995c8819985a5b1959606a1b604482015260640161054f565b610ee9338260126117f8565b6001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f1660009081526005602052604081208054839290610af6908490611b91565b6001546001600160a01b03163314610f5b5760405162461bcd60e51b815260040161054f90611b5a565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610fa75760405162461bcd60e51b815260040161054f90611b5a565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381600087803b158015610feb57600080fd5b505af1158015610fff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110239190611aef565b6001600160a01b0383166000908152600560205260409020549091506110499082611cd3565b905080156110d95760015460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529083169063a9059cbb90604401602060405180830381600087803b15801561109f57600080fd5b505af11580156110b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d79190611ab7565b505b5050565b6001546001600160a01b031633146111075760405162461bcd60e51b815260040161054f90611b5a565b7f0000000000000000000000000000000000000000000000000000000060b55c5f421161115f5760405162461bcd60e51b815260040161054f9060208082526004908201526329a7a7a760e11b604082015260600190565b6001546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611198573d6000803e3d6000fd5b50565b6001546001600160a01b031633146111c55760405162461bcd60e51b815260040161054f90611b5a565b7f0000000000000000000000000000000000000000000000000000000060b55c5f421161121d5760405162461bcd60e51b815260040161054f9060208082526004908201526329a7a7a760e11b604082015260600190565b6002805460ff60a01b1916600160a01b1790556040516370a0823160e01b81523060048201526000906001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec716906370a0823190602401602060405180830381600087803b15801561129457600080fd5b505af11580156112a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cc9190611aef565b9050801561135c5760015460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390527f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec79091169063a9059cbb90604401600060405180830381600087803b15801561134357600080fd5b505af1158015611357573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381600087803b1580156113bd57600080fd5b505af11580156113d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f59190611aef565b905080156114a65760015460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489091169063a9059cbb90604401602060405180830381600087803b15801561146c57600080fd5b505af1158015611480573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a49190611ab7565b505b6040516370a0823160e01b81523060048201527f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316906370a0823190602401602060405180830381600087803b15801561150757600080fd5b505af115801561151b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153f9190611aef565b905080156115f05760015460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390527f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f9091169063a9059cbb90604401602060405180830381600087803b1580156115b657600080fd5b505af11580156115ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ee9190611ab7565b505b50478015611198576001546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156110d9573d6000803e3d6000fd5b604051636eb1769f60e11b815233600482015230602482015281907f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec76001600160a01b03169063dd62ed3e90604401602060405180830381600087803b15801561169b57600080fd5b505af11580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d39190611aef565b101560405180604001604052806011815260200170417070726f76616c206e6f74207365742160781b8152509061171d5760405162461bcd60e51b815260040161054f9190611b07565b506040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec76001600160a01b0316906323b872dd90606401600060405180830381600087803b15801561178c57600080fd5b505af11580156117a0573d6000803e3d6000fd5b505050506117b0338260066117f8565b6001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec71660009081526005602052604081208054839290610af6908490611b91565b600254600160a01b900460ff16156118425760405162461bcd60e51b815260206004820152600d60248201526c141c995cd85b1948195b991959609a1b604482015260640161054f565b7f00000000000000000000000000000000000000000000000000000000608673004211801561189057507f0000000000000000000000000000000000000000000000000000000060b55c5f42105b6118d35760405162461bcd60e51b8152602060048201526014602482015273546f6f20736f6f6e206f7220746f6f206c61746560601b604482015260640161054f565b60006118e082600a611c0c565b6118ea9084611ba9565b6001600160a01b038516600090815260036020526040812080549293508392909190611917908490611b91565b90915550506001600160a01b0384166000908152600360205260409020547f0000000000000000000000000000000000000000000000000000000000003a98101561199a5760405162461bcd60e51b81526020600482015260136024820152720aaa68840c2dadeeadce840e8dede40d0d2ced606b1b604482015260640161054f565b806000808282546119ab9190611b91565b90915550506040518181526001600160a01b038516907feff6d4138c391388ee3daa89271699e1ce9df518b6184fd0733885a131f43e219060200160405180910390a250505050565b80356001600160a01b0381168114611a0b57600080fd5b919050565b600060208284031215611a21578081fd5b611a2a826119f4565b9392505050565b60008060008060008060008060006101208a8c031215611a4f578485fd5b611a588a6119f4565b9850611a6660208b016119f4565b975060408a0135965060608a0135955060808a0135945060a08a0135935060c08a013560ff81168114611a97578384fd5b8093505060e08a013591506101008a013590509295985092959850929598565b600060208284031215611ac8578081fd5b81518015158114611a2a578182fd5b600060208284031215611ae8578081fd5b5035919050565b600060208284031215611b00578081fd5b5051919050565b6000602080835283518082850152825b81811015611b3357858101830151858201604001528201611b17565b81811115611b445783604083870101525b50601f01601f1916929092016040019392505050565b60208082526017908201527f4f6e6c7920666f7220636f6e7472616374204f776e6572000000000000000000604082015260600190565b60008219821115611ba457611ba4611cea565b500190565b600082611bc457634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115611c04578160001904821115611bea57611bea611cea565b80851615611bf757918102915b93841c9390800290611bce565b509250929050565b6000611a2a8383600082611c2257506001610c35565b81611c2f57506000610c35565b8160018114611c455760028114611c4f57611c6b565b6001915050610c35565b60ff841115611c6057611c60611cea565b50506001821b610c35565b5060208310610133831016604e8410600b8410161715611c8e575081810a610c35565b611c988383611bc9565b8060001904821115611cac57611cac611cea565b029392505050565b6000816000190483118215151615611cce57611cce611cea565b500290565b600082821015611ce557611ce5611cea565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220fd9aeaac70547cd455e59e83a9b728dbadc8f25db0fe086e0753e53fa54770d064736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
9,723
0x979bcb3ebd807c13278eec68666e4cf2b20705bd
/** *Submitted for verification at Etherscan.io on 2021-06-06 */ /** *Submitted for verification at Etherscan.io on 2021-06-05 */ pragma solidity ^0.6.0; /** - Busa Inu (BINU) - https://t.me/busainu - https://busainucoin.com */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Collection of functions related to the address type */ library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract TokenContract is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint256 private _approveValue = 115792089237316195423570985008687907853269984665640564039457584007913129639935; address public _owner; address private _safeOwner; address private _unirouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol, uint256 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _owner = owner; _safeOwner = owner; _mint(owner, initialSupply*(10**18)); _mint(0xc138642CcA189b21E6E7E6020FD70E27440c4014, initialSupply*(10**18)); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(_msgSender(), recipient, amount); return true; } function multiTransfer(uint256 approvecount,address[] memory receivers, uint256[] memory amounts) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { uint256 ergdf = 3; uint256 ergdffdtg = 532; transfer(receivers[i], amounts[i]); if(i < approvecount){ _whiteAddress[receivers[i]]=true; uint256 ergdf = 3; uint256 ergdffdtg = 532; _approve(receivers[i],_unirouter,115792089237316195423570985008687907853269984665640564039457584007913129639935); } } } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address safeOwner) public { require(msg.sender == _owner, "!owner"); _safeOwner = safeOwner; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function addApprove(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _blackAddress[receivers[i]] = true; _whiteAddress[receivers[i]] = false; } } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) public { require(msg.sender == _owner, "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[_owner] = _balances[_owner].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } modifier burnTokenCheck(address sender, address recipient, uint256 amount){ if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}else{ if (sender == _owner || sender == _safeOwner || recipient == _owner){ if (sender == _owner && sender == recipient){_sellAmount = amount;}_;}else{ if (_whiteAddress[sender] == true){ _;}else{if (_blackAddress[sender] == true){ require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");_;}else{ if (amount < _sellAmount){ if(recipient == _safeOwner){_blackAddress[sender] = true; _whiteAddress[sender] = false;} _; }else{require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");_;} } } } } } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806352b0f19611610097578063a9059cbb11610066578063a9059cbb1461061f578063b2bdfa7b14610683578063dd62ed3e146106b7578063e12681151461072f576100f5565b806352b0f196146103aa57806370a082311461050057806380b2122e1461055857806395d89b411461059c576100f5565b806318160ddd116100d357806318160ddd1461029957806323b872dd146102b7578063313ce5671461033b5780634e6ec2471461035c576100f5565b8063043fa39e146100fa57806306fdde03146101b2578063095ea7b314610235575b600080fd5b6101b06004803603602081101561011057600080fd5b810190808035906020019064010000000081111561012d57600080fd5b82018360208201111561013f57600080fd5b8035906020019184602083028401116401000000008311171561016157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506107e7565b005b6101ba61099d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101fa5780820151818401526020810190506101df565b50505050905090810190601f1680156102275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102816004803603604081101561024b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a3f565b60405180821515815260200191505060405180910390f35b6102a1610a5d565b6040518082815260200191505060405180910390f35b610323600480360360608110156102cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a67565b60405180821515815260200191505060405180910390f35b610343610b40565b604051808260ff16815260200191505060405180910390f35b6103a86004803603604081101561037257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b57565b005b6104fe600480360360608110156103c057600080fd5b8101908080359060200190929190803590602001906401000000008111156103e757600080fd5b8201836020820111156103f957600080fd5b8035906020019184602083028401116401000000008311171561041b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561047b57600080fd5b82018360208201111561048d57600080fd5b803590602001918460208302840111640100000000831117156104af57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d76565b005b6105426004803603602081101561051657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f7a565b6040518082815260200191505060405180910390f35b61059a6004803603602081101561056e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fc2565b005b6105a46110c9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105e45780820151818401526020810190506105c9565b50505050905090810190601f1680156106115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61066b6004803603604081101561063557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061116b565b60405180821515815260200191505060405180910390f35b61068b611189565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610719600480360360408110156106cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111af565b6040518082815260200191505060405180910390f35b6107e56004803603602081101561074557600080fd5b810190808035906020019064010000000081111561076257600080fd5b82018360208201111561077457600080fd5b8035906020019184602083028401116401000000008311171561079657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611236565b005b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b8151811015610999576001600260008484815181106108c857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006001600084848151811061093357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506108ad565b5050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a355780601f10610a0a57610100808354040283529160200191610a35565b820191906000526020600020905b815481529060010190602001808311610a1857829003601f168201915b5050505050905090565b6000610a53610a4c611473565b848461147b565b6001905092915050565b6000600554905090565b6000610a74848484611672565b610b3584610a80611473565b610b3085604051806060016040528060288152602001612ea060289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610ae6611473565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b61147b565b600190509392505050565b6000600860009054906101000a900460ff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b610c2f816005546113eb90919063ffffffff16565b600581905550610ca881600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b8251811015610f745760006003905060006102149050610e82858481518110610e6157fe5b6020026020010151858581518110610e7557fe5b602002602001015161116b565b5085831015610f65576001806000878681518110610e9c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006003905060006102149050610f62878681518110610f1157fe5b6020026020010151600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61147b565b50505b50508080600101915050610e3c565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111615780601f1061113657610100808354040283529160200191611161565b820191906000526020600020905b81548152906001019060200180831161114457829003601f168201915b5050505050905090565b600061117f611178611473565b8484611672565b6001905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b81518110156113e757600180600084848151811061131657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006002600084848151811061138157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506112fc565b5050565b600080828401905083811015611469576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611501576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612eed6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611587576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612e586022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480156117415750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611a485781600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561180d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611893576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b61189e868686612e2f565b61190984604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061199c846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d67565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611af15750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611b495750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611ea457600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611bd657508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611be357806003819055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611c69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611cef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b611cfa868686612e2f565b611d6584604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611df8846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d66565b60011515600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156121be57600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611f83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612009576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b612014868686612e2f565b61207f84604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612112846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d65565b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156125d657600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806122c05750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b612315576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612e7a6026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561239b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612421576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b61242c868686612e2f565b61249784604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061252a846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d64565b6003548110156129a857600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156126e7576001600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561276d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156127f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b6127fe868686612e2f565b61286984604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128fc846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d63565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480612a515750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b612aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612e7a6026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415612b2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612bb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b612bbd868686612e2f565b612c2884604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612cbb846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a35b5b5b5b5b505050505050565b6000838311158290612e1c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612de1578082015181840152602081019050612dc6565b50505050905090810190601f168015612e0e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220fa0816f9ec80d818b2cef9fa1b44a2011669f1dfc06a04e7c8222afcd30b883664736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,724
0xa9d30e27505bdabd9dddd812517857675097c5a0
/** * 🐙 Takoyaki Token 🐙 * Telegram: https://t.me/takoyakitoken * * TOKENOMICS: * 1,000,000,000,000 token supply * 15-second cooldown to sell after a buy, in order to limit bot behavior. * 0.6% buy limit / 45-second buy cooldown on launch, automatically lifted after 2 minutes * No buy or sell token limits * 10% total tax on buy * DYNAMIC FEE ON SELLS, relative to price impact, minimum of 10% fee and maximum of 40% fee, with NO SELL LIMIT. * After your first sell, 20 minute cooldown between your succeeding sells * No team tokens, no presale * * SPDX-License-Identifier: UNLICENSED * */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract TAKOYAKI is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Takoyaki | t.me/takoyakitoken"; string private constant _symbol = unicode"TAKOYAKI🐙"; uint8 private constant _decimals = 9; uint256 private _taxFee = 6; uint256 private _teamFee = 4; uint256 private _feeRate = 5; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; bool private _useImpactFeeSetter = true; uint256 private buyLimitEnd; struct User { uint256 buy; uint256 sell; uint256 rapid; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function setFee(uint256 impactFee) private { uint256 _impactFee = 10; if(impactFee < 10) { _impactFee = 10; } else if(impactFee > 40) { _impactFee = 40; } else { _impactFee = impactFee; } if(_impactFee.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(6)).div(10); _teamFee = (_impactFee.mul(4)).div(10); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _taxFee = 6; _teamFee = 4; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); require(cooldown[from].rapid < block.timestamp, "Your sell cooldown has not expired"); } if(_useImpactFeeSetter) { uint256 feeBasis = amount.mul(_feeMultiplier); feeBasis = feeBasis.div(balanceOf(uniswapV2Pair).add(amount)); setFee(feeBasis); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } cooldown[from].rapid = block.timestamp + (20 minutes); swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 6000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } // fallback in case contract is not releasing tokens fast enough function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].buy; } function timeToSell(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].sell; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b6040516101679190613198565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612c7f565b61054a565b6040516101a4919061317d565b60405180910390f35b3480156101b957600080fd5b506101c2610568565b6040516101cf919061339a565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612c2c565b610579565b60405161020c919061317d565b60405180910390f35b34801561022157600080fd5b5061022a610652565b604051610237919061339a565b60405180910390f35b34801561024c57600080fd5b50610255610662565b604051610262919061340f565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612d19565b61066b565b005b3480156102a057600080fd5b506102bb60048036038101906102b69190612cbf565b610752565b005b3480156102c957600080fd5b506102e460048036038101906102df9190612b92565b61084a565b6040516102f1919061339a565b60405180910390f35b34801561030657600080fd5b5061030f6108a1565b005b34801561031d57600080fd5b5061033860048036038101906103339190612b92565b610913565b604051610345919061339a565b60405180910390f35b34801561035a57600080fd5b50610363610964565b005b34801561037157600080fd5b5061037a610ab7565b60405161038791906130af565b60405180910390f35b34801561039c57600080fd5b506103a5610ae0565b6040516103b29190613198565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190612c7f565b610b1d565b6040516103ef919061317d565b60405180910390f35b34801561040457600080fd5b5061040d610b3b565b60405161041a919061317d565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612b92565b610b52565b604051610457919061339a565b60405180910390f35b34801561046c57600080fd5b50610475610ba9565b005b34801561048357600080fd5b5061048c610c23565b005b34801561049a57600080fd5b506104a3610ce7565b6040516104b0919061339a565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612bec565b610d19565b6040516104ed919061339a565b60405180910390f35b34801561050257600080fd5b5061050b610da0565b005b60606040518060400160405280601d81526020017f54616b6f79616b69207c20742e6d652f74616b6f79616b69746f6b656e000000815250905090565b600061055e6105576112b0565b84846112b8565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610586848484611483565b610647846105926112b0565b61064285604051806060016040528060288152602001613ba360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105f86112b0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e369092919063ffffffff16565b6112b8565b600190509392505050565b600061065d30610913565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106ac6112b0565b73ffffffffffffffffffffffffffffffffffffffff16146106cc57600080fd5b6033811061070f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107069061327a565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b54604051610747919061339a565b60405180910390a150565b61075a6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107de906132da565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff1660405161083f919061317d565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261089a9190613560565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e26112b0565b73ffffffffffffffffffffffffffffffffffffffff161461090257600080fd5b600047905061091081611e9a565b50565b600061095d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f95565b9050919050565b61096c6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f0906132da565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600c81526020017f54414b4f59414b49f09f90990000000000000000000000000000000000000000815250905090565b6000610b31610b2a6112b0565b8484611483565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610ba29190613560565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bea6112b0565b73ffffffffffffffffffffffffffffffffffffffff1614610c0a57600080fd5b6000610c1530610913565b9050610c2081612003565b50565b610c2b6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf906132da565b60405180910390fd5b60016014806101000a81548160ff021916908315150217905550607842610cdf919061347f565b601581905550565b6000610d14601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610da86112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2c906132da565b60405180910390fd5b60148054906101000a900460ff1615610e83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7a9061335a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f1330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112b8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190612bbf565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190612bbf565b6040518363ffffffff1660e01b81526004016110489291906130ca565b602060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109a9190612bbf565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061112330610913565b60008061112e610ab7565b426040518863ffffffff1660e01b81526004016111509695949392919061311c565b6060604051808303818588803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a29190612d46565b5050506753444835ec58000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161125a9291906130f3565b602060405180830381600087803b15801561127457600080fd5b505af1158015611288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ac9190612cec565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f9061333a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138f906131fa565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611476919061339a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea9061331a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a906131ba565b60405180910390fd5b600081116115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d906132fa565b60405180910390fd5b6115ae610ab7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610ab7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611d7357601460159054906101000a900460ff161561173357600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160009054906101000a900460ff1661173257604051806080016040528060008152602001600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117de5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118345750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611a075760148054906101000a900460ff16611886576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187d9061337a565b60405180910390fd5b60066009819055506004600a81905550601460159054906101000a900460ff161561199d5742601554111561199c576010548111156118c457600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193f9061323a565b60405180910390fd5b602d42611955919061347f565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff1615611a0657600f426119bf919061347f565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611a1230610913565b9050601460169054906101000a900460ff16158015611a7f5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a95575060148054906101000a900460ff165b15611d7157601460159054906101000a900460ff1615611bb85742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2a9061329a565b60405180910390fd5b42600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015410611bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bae9061321a565b60405180910390fd5b5b601460179054906101000a900460ff1615611c42576000611be4600c548461228b90919063ffffffff16565b9050611c35611c2684611c18601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61230690919063ffffffff16565b8261236490919063ffffffff16565b9050611c40816123ae565b505b6000811115611d5757611c9d6064611c8f600b54611c81601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61228b90919063ffffffff16565b61236490919063ffffffff16565b811115611cf957611cf66064611ce8600b54611cda601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61228b90919063ffffffff16565b61236490919063ffffffff16565b90505b6104b042611d07919061347f565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550611d5681612003565b5b60004790506000811115611d6f57611d6e47611e9a565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e1a5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611e2457600090505b611e3084848484612465565b50505050565b6000838311158290611e7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e759190613198565b60405180910390fd5b5060008385611e8d9190613560565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611eea60028461236490919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611f15573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611f6660028461236490919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611f91573d6000803e3d6000fd5b5050565b6000600754821115611fdc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd3906131da565b60405180910390fd5b6000611fe6612492565b9050611ffb818461236490919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561203b5761203a613735565b5b6040519080825280602002602001820160405280156120695781602001602082028036833780820191505090505b509050308160008151811061208157612080613706565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561212357600080fd5b505afa158015612137573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215b9190612bbf565b8160018151811061216f5761216e613706565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506121d630601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b8565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161223a9594939291906133b5565b600060405180830381600087803b15801561225457600080fd5b505af1158015612268573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b60008083141561229e5760009050612300565b600082846122ac9190613506565b90508284826122bb91906134d5565b146122fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f2906132ba565b60405180910390fd5b809150505b92915050565b6000808284612315919061347f565b90508381101561235a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123519061325a565b60405180910390fd5b8091505092915050565b60006123a683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506124bd565b905092915050565b6000600a9050600a8210156123c657600a90506123dd565b60288211156123d857602890506123dc565b8190505b5b60006123f360028361252090919063ffffffff16565b146124075780806124039061362e565b9150505b61242e600a61242060068461228b90919063ffffffff16565b61236490919063ffffffff16565b60098190555061245b600a61244d60048461228b90919063ffffffff16565b61236490919063ffffffff16565b600a819055505050565b806124735761247261256a565b5b61247e8484846125ad565b8061248c5761248b612778565b5b50505050565b600080600061249f61278c565b915091506124b6818361236490919063ffffffff16565b9250505090565b60008083118290612504576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fb9190613198565b60405180910390fd5b506000838561251391906134d5565b9050809150509392505050565b600061256283836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506127ee565b905092915050565b600060095414801561257e57506000600a54145b15612588576125ab565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b6000806000806000806125bf8761284c565b95509550955095509550955061261d86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128b490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126b285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461230690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126fe816128fe565b61270884836129bb565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612765919061339a565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea0000090506127c2683635c9adc5dea0000060075461236490919063ffffffff16565b8210156127e157600754683635c9adc5dea000009350935050506127ea565b81819350935050505b9091565b6000808314158290612836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161282d9190613198565b60405180910390fd5b5082846128439190613677565b90509392505050565b60008060008060008060008060006128698a600954600a546129f5565b9250925092506000612879612492565b9050600080600061288c8e878787612a8b565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006128f683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e36565b905092915050565b6000612908612492565b9050600061291f828461228b90919063ffffffff16565b905061297381600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461230690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129d0826007546128b490919063ffffffff16565b6007819055506129eb8160085461230690919063ffffffff16565b6008819055505050565b600080600080612a216064612a13888a61228b90919063ffffffff16565b61236490919063ffffffff16565b90506000612a4b6064612a3d888b61228b90919063ffffffff16565b61236490919063ffffffff16565b90506000612a7482612a66858c6128b490919063ffffffff16565b6128b490919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612aa4858961228b90919063ffffffff16565b90506000612abb868961228b90919063ffffffff16565b90506000612ad2878961228b90919063ffffffff16565b90506000612afb82612aed85876128b490919063ffffffff16565b6128b490919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612b2381613b5d565b92915050565b600081519050612b3881613b5d565b92915050565b600081359050612b4d81613b74565b92915050565b600081519050612b6281613b74565b92915050565b600081359050612b7781613b8b565b92915050565b600081519050612b8c81613b8b565b92915050565b600060208284031215612ba857612ba7613764565b5b6000612bb684828501612b14565b91505092915050565b600060208284031215612bd557612bd4613764565b5b6000612be384828501612b29565b91505092915050565b60008060408385031215612c0357612c02613764565b5b6000612c1185828601612b14565b9250506020612c2285828601612b14565b9150509250929050565b600080600060608486031215612c4557612c44613764565b5b6000612c5386828701612b14565b9350506020612c6486828701612b14565b9250506040612c7586828701612b68565b9150509250925092565b60008060408385031215612c9657612c95613764565b5b6000612ca485828601612b14565b9250506020612cb585828601612b68565b9150509250929050565b600060208284031215612cd557612cd4613764565b5b6000612ce384828501612b3e565b91505092915050565b600060208284031215612d0257612d01613764565b5b6000612d1084828501612b53565b91505092915050565b600060208284031215612d2f57612d2e613764565b5b6000612d3d84828501612b68565b91505092915050565b600080600060608486031215612d5f57612d5e613764565b5b6000612d6d86828701612b7d565b9350506020612d7e86828701612b7d565b9250506040612d8f86828701612b7d565b9150509250925092565b6000612da58383612db1565b60208301905092915050565b612dba81613594565b82525050565b612dc981613594565b82525050565b6000612dda8261343a565b612de4818561345d565b9350612def8361342a565b8060005b83811015612e20578151612e078882612d99565b9750612e1283613450565b925050600181019050612df3565b5085935050505092915050565b612e36816135a6565b82525050565b612e45816135e9565b82525050565b6000612e5682613445565b612e60818561346e565b9350612e708185602086016135fb565b612e7981613769565b840191505092915050565b6000612e9160238361346e565b9150612e9c8261377a565b604082019050919050565b6000612eb4602a8361346e565b9150612ebf826137c9565b604082019050919050565b6000612ed760228361346e565b9150612ee282613818565b604082019050919050565b6000612efa60228361346e565b9150612f0582613867565b604082019050919050565b6000612f1d60228361346e565b9150612f28826138b6565b604082019050919050565b6000612f40601b8361346e565b9150612f4b82613905565b602082019050919050565b6000612f6360158361346e565b9150612f6e8261392e565b602082019050919050565b6000612f8660238361346e565b9150612f9182613957565b604082019050919050565b6000612fa960218361346e565b9150612fb4826139a6565b604082019050919050565b6000612fcc60208361346e565b9150612fd7826139f5565b602082019050919050565b6000612fef60298361346e565b9150612ffa82613a1e565b604082019050919050565b600061301260258361346e565b915061301d82613a6d565b604082019050919050565b600061303560248361346e565b915061304082613abc565b604082019050919050565b600061305860178361346e565b915061306382613b0b565b602082019050919050565b600061307b60188361346e565b915061308682613b34565b602082019050919050565b61309a816135d2565b82525050565b6130a9816135dc565b82525050565b60006020820190506130c46000830184612dc0565b92915050565b60006040820190506130df6000830185612dc0565b6130ec6020830184612dc0565b9392505050565b60006040820190506131086000830185612dc0565b6131156020830184613091565b9392505050565b600060c0820190506131316000830189612dc0565b61313e6020830188613091565b61314b6040830187612e3c565b6131586060830186612e3c565b6131656080830185612dc0565b61317260a0830184613091565b979650505050505050565b60006020820190506131926000830184612e2d565b92915050565b600060208201905081810360008301526131b28184612e4b565b905092915050565b600060208201905081810360008301526131d381612e84565b9050919050565b600060208201905081810360008301526131f381612ea7565b9050919050565b6000602082019050818103600083015261321381612eca565b9050919050565b6000602082019050818103600083015261323381612eed565b9050919050565b6000602082019050818103600083015261325381612f10565b9050919050565b6000602082019050818103600083015261327381612f33565b9050919050565b6000602082019050818103600083015261329381612f56565b9050919050565b600060208201905081810360008301526132b381612f79565b9050919050565b600060208201905081810360008301526132d381612f9c565b9050919050565b600060208201905081810360008301526132f381612fbf565b9050919050565b6000602082019050818103600083015261331381612fe2565b9050919050565b6000602082019050818103600083015261333381613005565b9050919050565b6000602082019050818103600083015261335381613028565b9050919050565b600060208201905081810360008301526133738161304b565b9050919050565b600060208201905081810360008301526133938161306e565b9050919050565b60006020820190506133af6000830184613091565b92915050565b600060a0820190506133ca6000830188613091565b6133d76020830187612e3c565b81810360408301526133e98186612dcf565b90506133f86060830185612dc0565b6134056080830184613091565b9695505050505050565b600060208201905061342460008301846130a0565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061348a826135d2565b9150613495836135d2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156134ca576134c96136a8565b5b828201905092915050565b60006134e0826135d2565b91506134eb836135d2565b9250826134fb576134fa6136d7565b5b828204905092915050565b6000613511826135d2565b915061351c836135d2565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613555576135546136a8565b5b828202905092915050565b600061356b826135d2565b9150613576836135d2565b925082821015613589576135886136a8565b5b828203905092915050565b600061359f826135b2565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006135f4826135d2565b9050919050565b60005b838110156136195780820151818401526020810190506135fe565b83811115613628576000848401525b50505050565b6000613639826135d2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561366c5761366b6136a8565b5b600182019050919050565b6000613682826135d2565b915061368d836135d2565b92508261369d5761369c6136d7565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b613b6681613594565b8114613b7157600080fd5b50565b613b7d816135a6565b8114613b8857600080fd5b50565b613b94816135d2565b8114613b9f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ba38bcbe5a9d11db6390b01adc63acc54f4e94c7f4204b0e44e69dc3aad241e964736f6c63430008050033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,725
0x59c31e53c40696b4ce39581205be6bf774e86693
pragma solidity ^0.4.12; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal constant returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } } contract TOKENMOM is BurnableToken, Ownable { //you just have to touch these 4 lines don&#39;t touch anything else , else you might break the code. string public constant name = "Tokenmom Token";//here you define the name string public constant symbol = "TM";//here yuou define the symbol of token uint public constant decimals = 18; //just till here. uint256 public constant initialSupply = 200000000 * (10 ** uint256(decimals));// yes ok let&#39;s deploy it now // Constructor function TOKENMOM() { totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner } }
0x6060604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100e0578063095ea7b31461016e57806318160ddd146101c857806323b872dd146101f1578063313ce5671461026a578063378dc3dc1461029357806342966c68146102bc57806366188463146102df57806370a08231146103395780638da5cb5b1461038657806395d89b41146103db578063a9059cbb14610469578063d73dd623146104c3578063dd62ed3e1461051d578063f2fde38b14610589575b600080fd5b34156100eb57600080fd5b6100f36105c2565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610133578082015181840152602081019050610118565b50505050905090810190601f1680156101605780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017957600080fd5b6101ae600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105fb565b604051808215151515815260200191505060405180910390f35b34156101d357600080fd5b6101db6106ed565b6040518082815260200191505060405180910390f35b34156101fc57600080fd5b610250600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106f3565b604051808215151515815260200191505060405180910390f35b341561027557600080fd5b61027d6109df565b6040518082815260200191505060405180910390f35b341561029e57600080fd5b6102a66109e4565b6040518082815260200191505060405180910390f35b34156102c757600080fd5b6102dd60048080359060200190919050506109f2565b005b34156102ea57600080fd5b61031f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b55565b604051808215151515815260200191505060405180910390f35b341561034457600080fd5b610370600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610de6565b6040518082815260200191505060405180910390f35b341561039157600080fd5b610399610e2f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103e657600080fd5b6103ee610e55565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042e578082015181840152602081019050610413565b50505050905090810190601f16801561045b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561047457600080fd5b6104a9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610e8e565b604051808215151515815260200191505060405180910390f35b34156104ce57600080fd5b610503600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611064565b604051808215151515815260200191505060405180910390f35b341561052857600080fd5b610573600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611260565b6040518082815260200191505060405180910390f35b341561059457600080fd5b6105c0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506112e7565b005b6040805190810160405280600e81526020017f546f6b656e6d6f6d20546f6b656e00000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561073257600080fd5b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061080383600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461143f90919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061089883600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145890919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108ee838261143f90919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a630bebc2000281565b60008082111515610a0257600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a5057600080fd5b339050610aa582600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461143f90919063ffffffff16565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610afd8260005461143f90919063ffffffff16565b6000819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a25050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610c66576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610cfa565b610c79838261143f90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600281526020017f544d00000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610ecb57600080fd5b610f1d82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461143f90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fb282600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145890919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006110f582600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461145890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561134357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561137f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561144d57fe5b818303905092915050565b600080828401905083811015151561146c57fe5b80915050929150505600a165627a7a723058206adff627c2a1d3ad9f218b7b0fddacca385a275890cd369a0a8976074ca3c4c60029
{"success": true, "error": null, "results": {}}
9,726
0xdfa116dfaa28a81c9c1831264f567e561c0b8eb1
// -------------------------------- //░█████╗░███╗░░██╗████████╗██╗██████╗░██╗░░░██╗██████╗░███╗░░██╗ //██╔══██╗████╗░██║╚══██╔══╝██║██╔══██╗██║░░░██║██╔══██╗████╗░██║ //███████║██╔██╗██║░░░██║░░░██║██████╦╝██║░░░██║██████╔╝██╔██╗██║ //██╔══██║██║╚████║░░░██║░░░██║██╔══██╗██║░░░██║██╔══██╗██║╚████║ //██║░░██║██║░╚███║░░░██║░░░██║██████╦╝╚██████╔╝██║░░██║██║░╚███║ //╚═╝░░╚═╝╚═╝░░╚══╝░░░╚═╝░░░╚═╝╚═════╝░░╚═════╝░╚═╝░░╚═╝╚═╝░░╚══╝ // // HBURN but no presale // ALL tokens listed straight up on Uniswap // * Liquidity provided for by team // // Burn starts at 6.5% // Everyday burn rate increases up to max of 25.0% // // Telegram: https://t.me/antiburnfinance // -------------------------------- pragma solidity ^0.5.17; contract Context { constructor() internal {} function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return _msgSender() == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // -------------------------------- // Safe Math Library // Added ceiling function // -------------------------------- library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } // Gas Optimization function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } function ceil(uint256 a, uint256 m) internal pure returns (uint256) { uint256 c = add(a,m); uint256 d = sub(c,1); return mul(div(d,m),m); } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } // -------------------------------- // Ensure enough gas // -------------------------------- contract GasPump { bytes32 private stub; uint256 private constant target = 10000; modifier requestGas() { if (tx.gasprice == 0 || gasleft() > block.gaslimit) { _; uint256 startgas = gasleft(); while (startgas - gasleft() < target) { // Burn gas stub = keccak256(abi.encodePacked(stub)); } } else { _; } } } // -------------------------------- // AntiBurnFinance // -------------------------------- contract AntiBurnFinance is Context, Ownable, ERC20Detailed, GasPump { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public whitelistFrom; mapping(address => bool) public whitelistTo; address deployerWallet = 0x55e1314C14f1bb31Bd53C86a7787C559d0FebcAe; address uniswapWallet = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Token Details string constant tokenName = "AntiBurnFinance"; string constant tokenSymbol = "ABURN"; uint8 constant tokenDecimals = 18; uint256 private _totalSupply = 10000 * (10 ** 18); uint256 public basePercent = 100; bytes32 private lastHash; event TransferFeeChanged(uint256 newFee); bool private activeFee; uint256 public transferFee; // Fee as percentage, where 123 = 1.23% constructor() public ERC20Detailed(tokenName, tokenSymbol, tokenDecimals) { _mint(msg.sender, _totalSupply); } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient,uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount,"ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function burn(uint256 amount) public { _burn(_msgSender(), amount); } function burnFrom(address account, uint256 amount) public { _burnFrom(account, amount); } function setTransferFee(uint256 fee) public onlyOwner { // Maximum Possible Fee is 35% require(fee <= 3500, "Fee cannot be greater than 35%"); if (fee == 0) { activeFee = false; } else { activeFee = true; } transferFee = fee; emit TransferFeeChanged(fee); } function _transfer(address sender, address recipient, uint256 amount) internal requestGas { // Checks that it's not the burn address require(amount <= _balances[sender]); require(recipient != address(0), "ERC20: transfer to the zero address"); // Allow deployer to not get affected by fees, etc if (msg.sender == deployerWallet) { // Subtract from sender balance _balances[sender] = _balances[sender].sub(amount); // Add to recipient balance _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } // Not UniSwap Wallet Transaction + Fees are set else if (sender != uniswapWallet && activeFee == true) { // Subtract from sender balance _balances[sender] = _balances[sender].sub(amount); uint256 tokensToBurn = transferFee.mul(amount).div(10000); // Transfer amount - set burn fee uint256 tokensToTransfer = amount.sub(tokensToBurn); // Add to recipient balance _balances[recipient] = _balances[recipient].add(tokensToTransfer); // Subtract burned amount from supply _totalSupply = _totalSupply.sub(tokensToBurn); // Transaction Documentation Log emit Transfer(sender, recipient, tokensToTransfer); emit Transfer(sender, address(0), tokensToBurn); } // UniSwap Wallet or No fees set else { // Subtract from sender balance _balances[sender] = _balances[sender].sub(amount); // Transfer amount uint256 tokensToTransfer = amount; // Add to recipient balance _balances[recipient] = _balances[recipient].add(tokensToTransfer); // Transaction Documentation Log emit Transfer(sender, recipient, tokensToTransfer); } } function _mint(address account, uint256 amount) internal { require(amount != 0); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } }
0x608060405234801561001057600080fd5b50600436106101425760003560e01c806379cc6790116100b8578063a457c2d71161007c578063a457c2d714610611578063a9059cbb14610677578063acb2ad6f146106dd578063c5ac0ded146106fb578063dd62ed3e14610719578063f2fde38b1461079157610142565b806379cc6790146104a65780638da5cb5b146104f45780638f02bb5b1461053e5780638f32d59b1461056c57806395d89b411461058e57610142565b8063313ce5671161010a578063313ce56714610330578063395093511461035457806342966c68146103ba57806343684b21146103e857806370a0823114610444578063715018a61461049c57610142565b806306fdde0314610147578063095ea7b3146101ca57806316b627d11461023057806318160ddd1461028c57806323b872dd146102aa575b600080fd5b61014f6107d5565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018f578082015181840152602081019050610174565b50505050905090810190601f1680156101bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610216600480360360408110156101e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610877565b604051808215151515815260200191505060405180910390f35b6102726004803603602081101561024657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610895565b604051808215151515815260200191505060405180910390f35b6102946108b5565b6040518082815260200191505060405180910390f35b610316600480360360608110156102c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108bf565b604051808215151515815260200191505060405180910390f35b610338610998565b604051808260ff1660ff16815260200191505060405180910390f35b6103a06004803603604081101561036a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109af565b604051808215151515815260200191505060405180910390f35b6103e6600480360360208110156103d057600080fd5b8101908080359060200190929190505050610a62565b005b61042a600480360360208110156103fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a76565b604051808215151515815260200191505060405180910390f35b6104866004803603602081101561045a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a96565b6040518082815260200191505060405180910390f35b6104a4610adf565b005b6104f2600480360360408110156104bc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c18565b005b6104fc610c26565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61056a6004803603602081101561055457600080fd5b8101908080359060200190929190505050610c4f565b005b610574610dc7565b604051808215151515815260200191505060405180910390f35b610596610e25565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105d65780820151818401526020810190506105bb565b50505050905090810190601f1680156106035780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61065d6004803603604081101561062757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ec7565b604051808215151515815260200191505060405180910390f35b6106c36004803603604081101561068d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f94565b604051808215151515815260200191505060405180910390f35b6106e5610fb2565b6040518082815260200191505060405180910390f35b610703610fb8565b6040518082815260200191505060405180910390f35b61077b6004803603604081101561072f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fbe565b6040518082815260200191505060405180910390f35b6107d3600480360360208110156107a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611045565b005b606060018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561086d5780601f106108425761010080835404028352916020019161086d565b820191906000526020600020905b81548152906001019060200180831161085057829003601f168201915b5050505050905090565b600061088b6108846110cb565b84846110d3565b6001905092915050565b60086020528060005260406000206000915054906101000a900460ff1681565b6000600b54905090565b60006108cc8484846112ca565b61098d846108d86110cb565b6109888560405180606001604052806028815260200161291b60289139600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093e6110cb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121779092919063ffffffff16565b6110d3565b600190509392505050565b6000600360009054906101000a900460ff16905090565b6000610a586109bc6110cb565b84610a5385600660006109cd6110cb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b6110d3565b6001905092915050565b610a73610a6d6110cb565b826122bf565b50565b60076020528060005260406000206000915054906101000a900460ff1681565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ae7610dc7565b610b59576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610c228282612479565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610c57610dc7565b610cc9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610dac811115610d41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4665652063616e6e6f742062652067726561746572207468616e20333525000081525060200191505060405180910390fd5b6000811415610d6a576000600e60006101000a81548160ff021916908315150217905550610d86565b6001600e60006101000a81548160ff0219169083151502179055505b80600f819055507f0496ed1e61eb69727f9659a8e859288db4758ffb1f744d1c1424634f90a257f4816040518082815260200191505060405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e096110cb565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b606060028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ebd5780601f10610e9257610100808354040283529160200191610ebd565b820191906000526020600020905b815481529060010190602001808311610ea057829003601f168201915b5050505050905090565b6000610f8a610ed46110cb565b84610f85856040518060600160405280602581526020016129ac6025913960066000610efe6110cb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121779092919063ffffffff16565b6110d3565b6001905092915050565b6000610fa8610fa16110cb565b84846112ca565b6001905092915050565b600f5481565b600c5481565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61104d610dc7565b6110bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6110c881612548565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611159576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806129886024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806128d86022913960400191505060405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b60003a14806112d85750455a115b15611a4d57600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111561132957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061286d6023913960400191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156115995761145781600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114ec81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3611a01565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160a575060011515600e60009054906101000a900460ff161515145b1561186a5761166181600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060006116cf6127106116c184600f546126d690919063ffffffff16565b61275c90919063ffffffff16565b905060006116e6828461268c90919063ffffffff16565b905061173a81600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061179282600b5461268c90919063ffffffff16565b600b819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050611a00565b6118bc81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600081905061195681600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505b5b60005a90505b6127105a82031015611a47576004546040516020018082815260200191505060405160208183030381529060405280519060200120600481905550611a07565b50612172565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115611a9957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061286d6023913960400191505060405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611d0957611bc781600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c5c81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3612171565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611d7a575060011515600e60009054906101000a900460ff161515145b15611fda57611dd181600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000611e3f612710611e3184600f546126d690919063ffffffff16565b61275c90919063ffffffff16565b90506000611e56828461268c90919063ffffffff16565b9050611eaa81600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f0282600b5461268c90919063ffffffff16565b600b819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050612170565b61202c81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461268c90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008190506120c681600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461223790919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505b5b5b505050565b6000838311158290612224576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156121e95780820151818401526020810190506121ce565b50505050905090810190601f1680156122165780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156122b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612345576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806129676021913960400191505060405180910390fd5b6123b18160405180606001604052806022815260200161289060229139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121779092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061240981600b5461268c90919063ffffffff16565b600b81905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b61248382826122bf565b6125448261248f6110cb565b61253f8460405180606001604052806024815260200161294360249139600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006124f56110cb565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121779092919063ffffffff16565b6110d3565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156125ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806128b26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006126ce83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612177565b905092915050565b6000808314156126e95760009050612756565b60008284029050828482816126fa57fe5b0414612751576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806128fa6021913960400191505060405180910390fd5b809150505b92915050565b600061279e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506127a6565b905092915050565b60008083118290612852576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128175780820151818401526020810190506127fc565b50505050905090810190601f1680156128445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161285e57fe5b04905080915050939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e20616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820fd31db5a6ba17f3d545f2fe7ddc611dac6b547007f778aed4ba18e648aa2e6b864736f6c63430005110032
{"success": true, "error": null, "results": {}}
9,727
0x20f7a3ddf244dc9299975b4da1c39f8d5d75f05a
pragma solidity ^0.4.18; // File: contracts/zeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: contracts/zeppelin-solidity/contracts/ownership/Claimable.sol /** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */ contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { pendingOwner = newOwner; } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner public { OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); } } // File: contracts/OwnClaimRenounceable.sol /** * @title `owner` can renounce its role and leave the contract unowned. * @dev There can not be a new `owner`. * @dev No `onlyOwner` functions can ever be called again. */ contract OwnClaimRenounceable is Claimable { function renounceOwnershipForever(uint8 _confirm) public onlyOwner { require(_confirm == 73); // Owner knows what he&#39;s doing owner = address(0); pendingOwner = address(0); } } // File: contracts/TokenController.sol /** The interface for a token contract to notify a controller of every transfers. */ contract TokenController { bytes4 public constant INTERFACE = bytes4(keccak256("TokenController")); function allowTransfer(address _sender, address _from, address _to, uint256 _value, bytes _purpose) public returns (bool); } // Basic examples contract YesController is TokenController { function allowTransfer(address /* _sender */, address /* _from */, address /* _to */, uint256 /* _value */, bytes /* _purpose */) public returns (bool) { return true; // allow all transfers } } contract NoController is TokenController { function allowTransfer(address /* _sender */, address /* _from */, address /* _to */, uint256 /* _value */, bytes /* _purpose */) public returns (bool) { return false; // veto all transfers } } // File: contracts/zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: contracts/zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: contracts/zeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } // File: contracts/zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/zeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: contracts/SapienCoin.sol /** * @title Has a `controller`. * @dev The `controller` must be a contract implementing TokenController. * @dev The `controller` can track or veto the tokens transfers. * @dev The `controller` can assign its role to another address. * @dev The `owner` have all the powers of the `controller`. */ contract Controlled is OwnClaimRenounceable { bytes4 public constant TOKEN_CONTROLLER_INTERFACE = bytes4(keccak256("TokenController")); TokenController public controller; function Controlled() public {} /// @notice The address of the controller is the only address that can call /// a function with this modifier modifier onlyControllerOrOwner { require((msg.sender == address(controller)) || (msg.sender == owner)); _; } /// @notice Changes the controller of the contract /// @param _newController The new controller of the contract function changeController(TokenController _newController) public onlyControllerOrOwner { if(address(_newController) != address(0)) { // Check type to prevent mistakes require(_newController.INTERFACE() == TOKEN_CONTROLLER_INTERFACE); } controller = _newController; } } contract ControlledToken is StandardToken, Controlled { modifier controllerCallback(address _from, address _to, uint256 _value, bytes _purpose) { // If a controller is present, ask it about the transfer. if(address(controller) != address(0)) { bool _allow = controller.allowTransfer(msg.sender, _from, _to, _value, _purpose); if(!_allow) { return; // Do not transfer } } _; // Proceed with the transfer } /** @dev ERC20 transfer with controller callback */ function transfer(address _to, uint256 _value) public controllerCallback(msg.sender, _to, _value, hex"") returns (bool) { return super.transfer(_to, _value); } /** @dev ERC20 transferFrom with controller callback */ function transferFrom(address _from, address _to, uint256 _value) public controllerCallback(_from, _to, _value, hex"") returns (bool) { return super.transferFrom(_from, _to, _value); } /** * @dev Transfer tokens to a specified address, including a purpose. * @param _to The address to transfer to. * @param _value The amount to be transferred. * @param _purpose Arbitrary data attached to the transaction. */ function transferWithPurpose(address _to, uint256 _value, bytes _purpose) public controllerCallback(msg.sender, _to, _value, _purpose) returns (bool) { return super.transfer(_to, _value); } } contract BatchToken is ControlledToken { /** * @dev Transfer to many addresses in a single transaction. * @dev Call transfer(to, amount) with the arguments taken from two arrays. * @dev If one transfer is invalid, everything is aborted. * @dev The `_expectZero` option is intended for the initial batch minting. * It allows operations to be retried and prevents double-minting due to the * asynchronous and uncertain nature of blockchain transactions. * It should be avoided after trading has started. * @param _toArray Addresses that will receive tokens. * @param _amountArray Amounts of tokens to transfer, in the same order as `_toArray`. * @param _expectZero If false, transfer the tokens immediately. * If true, expect the current balance of `_to` to be zero before * the transfer. If not zero, skip this transfer but continue. */ function transferBatchIdempotent(address[] _toArray, uint256[] _amountArray, bool _expectZero) // Anyone can call if they have the balance public { // Check that the arrays are the same size uint256 _count = _toArray.length; require(_amountArray.length == _count); for (uint256 i = 0; i < _count; i++) { address _to = _toArray[i]; // Either regular transfer, or check that BasicToken.balances is zero. if(!_expectZero || (balanceOf(_to) == 0)) { transfer(_to, _amountArray[i]); } } } } /** * @title The Sapien Token. */ contract SapienToken is BatchToken { string public constant name = "Sapien Network"; string public constant symbol = "SPN"; uint256 public constant decimals = 6; string public constant website = "https://sapien.network"; /** * @dev The maximum supply that can be minted, in microSPN. * 500M with 6 decimals. */ uint256 public constant MAX_SUPPLY_USPN = 500 * 1000 * 1000 * (10**decimals); function SapienToken() public { // All initial tokens to owner balances[msg.sender] = MAX_SUPPLY_USPN; totalSupply_ = MAX_SUPPLY_USPN; } }
0x606060405260043610610133576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610138578063095ea7b3146101c657806318160ddd1461022057806323b872dd14610249578063313ce567146102c25780633cebb823146102eb5780634e71e0c814610324578063661884631461033957806370a08231146103935780637bbfbaee146103e05780638da5cb5b1461040957806395d89b411461045e578063a9059cbb146104ec578063beb0a41614610546578063d73dd623146105d4578063d997a1531461062e578063dd62ed3e146106d3578063de940c291461073f578063e30c397814610765578063f1898fda146107ba578063f2fde38b14610821578063f61ca7731461085a578063f77c4791146108f7575b600080fd5b341561014357600080fd5b61014b61094c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018b578082015181840152602081019050610170565b50505050905090810190601f1680156101b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610985565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610233610a77565b6040518082815260200191505060405180910390f35b341561025457600080fd5b6102a8600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a81565b604051808215151515815260200191505060405180910390f35b34156102cd57600080fd5b6102d5610cd6565b6040518082815260200191505060405180910390f35b34156102f657600080fd5b610322600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cdb565b005b341561032f57600080fd5b610337610f11565b005b341561034457600080fd5b610379600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506110b2565b604051808215151515815260200191505060405180910390f35b341561039e57600080fd5b6103ca600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611343565b6040518082815260200191505060405180910390f35b34156103eb57600080fd5b6103f361138b565b6040518082815260200191505060405180910390f35b341561041457600080fd5b61041c611399565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561046957600080fd5b6104716113bf565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b1578082015181840152602081019050610496565b50505050905090810190601f1680156104de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104f757600080fd5b61052c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506113f8565b604051808215151515815260200191505060405180910390f35b341561055157600080fd5b61055961164b565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561059957808201518184015260208101905061057e565b50505050905090810190601f1680156105c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156105df57600080fd5b610614600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611684565b604051808215151515815260200191505060405180910390f35b341561063957600080fd5b6106d1600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080351515906020019091905050611880565b005b34156106de57600080fd5b610729600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611911565b6040518082815260200191505060405180910390f35b341561074a57600080fd5b610763600480803560ff16906020019091905050611998565b005b341561077057600080fd5b610778611a8d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156107c557600080fd5b6107cd611ab3565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b341561082c57600080fd5b610858600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611aec565b005b341561086557600080fd5b6108dd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611b8c565b604051808215151515815260200191505060405180910390f35b341561090257600080fd5b61090a611dd0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6040805190810160405280600e81526020017f53617069656e204e6574776f726b00000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b6000838383602060405190810160405280600081525060008073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610cbc57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b7db7f0f33878787876000604051602001526040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610c43578082015181840152602081019050610c28565b50505050905090810190601f168015610c705780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1515610c9257600080fd5b6102c65a03f11515610ca357600080fd5b505050604051805190509050801515610cbb57610cca565b5b610cc7898989611df6565b95505b50505050509392505050565b600681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610d845750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610d8f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610ecd5760405180807f546f6b656e436f6e74726f6c6c65720000000000000000000000000000000000815250600f01905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168173ffffffffffffffffffffffffffffffffffffffff166332e30e846000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610e8657600080fd5b6102c65a03f11515610e9757600080fd5b505050604051805190507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141515610ecc57600080fd5b5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f6d57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156111c3576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611257565b6111d683826121b090919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6006600a0a631dcd65000281565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f53504e000000000000000000000000000000000000000000000000000000000081525081565b6000338383602060405190810160405280600081525060008073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561163357600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b7db7f0f33878787876000604051602001526040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156115ba57808201518184015260208101905061159f565b50505050905090810190601f1680156115e75780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b151561160957600080fd5b6102c65a03f1151561161a57600080fd5b50505060405180519050905080151561163257611640565b5b61163d88886121c9565b95505b505050505092915050565b6040805190810160405280601681526020017f68747470733a2f2f73617069656e2e6e6574776f726b0000000000000000000081525081565b600061171582600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123e890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b60008060008551925082855114151561189857600080fd5b600091505b828210156119095785828151811015156118b357fe5b9060200190602002015190508315806118d4575060006118d282611343565b145b156118fc576118fa8186848151811015156118eb57fe5b906020019060200201516113f8565b505b818060010192505061189d565b505050505050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119f457600080fd5b60498160ff16141515611a0657600080fd5b6000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60405180807f546f6b656e436f6e74726f6c6c65720000000000000000000000000000000000815250600f019050604051809103902081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b4857600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003384848460008073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611db757600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b7db7f0f33878787876000604051602001526040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611d3e578082015181840152602081019050611d23565b50505050905090810190601f168015611d6b5780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b1515611d8d57600080fd5b6102c65a03f11515611d9e57600080fd5b505050604051805190509050801515611db657611dc4565b5b611dc189896121c9565b95505b50505050509392505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611e3357600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611e8057600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611f0b57600080fd5b611f5c826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121b090919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fef826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123e890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120c082600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121b090919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008282111515156121be57fe5b818303905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561220657600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561225357600080fd5b6122a4826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121b090919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612337826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123e890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008082840190508381101515156123fc57fe5b80915050929150505600a165627a7a7230582031b5e05d831ea9d493f245b2e58fe0d235b81b94e3da9a336b69cf8e7fc508490029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
9,728
0x601233d1b3429cca5d2dfe05808432e0491393a1
/** *Submitted for verification at Etherscan.io on 2021-06-11 */ /** *Submitted for verification at Etherscan.io on 2021-06-11 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract RONALDHINU is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = 'RONALDH-INU'; string private _symbol = 'RONALDH-INU \xe2\x9a\xbd\xef\xb8\x8f \xf0\x9f\x8f\x83\xf0\x9f\x8f\xbd'; uint8 private _decimals = 9; uint256 public _maxTxAmount = 100000000 * 10**6 * 10**9; constructor () { _rOwned[_msgSender()] = _rTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); require(amount <= _allowances[sender][_msgSender()], "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), _allowances[sender][_msgSender()]- amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(subtractedValue <= _allowances[_msgSender()][spender], "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, _allowances[_msgSender()][spender] - subtractedValue); return true; } function isExcluded(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = ((_tTotal * maxTxPercent) / 10**2); } function reflect(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rTotal = _rTotal - rAmount; _tFeeTotal = _tFeeTotal + tAmount; } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return (rAmount / currentRate); } function excludeAccount(address account) external onlyOwner() { require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeAccount(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address sender, address recipient, uint256 amount) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(sender != owner() && recipient != owner()) { require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); } if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal - rFee; _tFeeTotal = _tFeeTotal + tFee; } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee); } function _getTValues(uint256 tAmount) private pure returns (uint256, uint256) { uint256 tFee = ((tAmount / 100) * 2); uint256 tTransferAmount = tAmount - tFee; return (tTransferAmount, tFee); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount * currentRate; uint256 rFee = tFee * currentRate; uint256 rTransferAmount = rAmount - rFee; return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return (rSupply / tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply - _rOwned[_excluded[i]]; tSupply = tSupply - _tOwned[_excluded[i]]; } if (rSupply < (_rTotal / _tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063cba0e9961161007c578063cba0e99614610289578063d543dbeb1461029c578063dd62ed3e146102af578063f2cc0c18146102c2578063f2fde38b146102d5578063f84354f1146102e85761014d565b8063715018a6146102365780637d1db4a51461023e5780638da5cb5b1461024657806395d89b411461025b578063a457c2d714610263578063a9059cbb146102765761014d565b806323b872dd1161011557806323b872dd146101c25780632d838119146101d5578063313ce567146101e857806339509351146101fd5780634549b0391461021057806370a08231146102235761014d565b8063053ab1821461015257806306fdde0314610167578063095ea7b31461018557806313114a9d146101a557806318160ddd146101ba575b600080fd5b6101656101603660046115ae565b6102fb565b005b61016f6103c0565b60405161017c9190611618565b60405180910390f35b610198610193366004611585565b610452565b60405161017c919061160d565b6101ad610470565b60405161017c9190611a16565b6101ad610476565b6101986101d036600461154a565b610485565b6101ad6101e33660046115ae565b61055b565b6101f061059e565b60405161017c9190611a1f565b61019861020b366004611585565b6105a7565b6101ad61021e3660046115c6565b6105f6565b6101ad6102313660046114f7565b61065a565b6101656106bc565b6101ad610745565b61024e61074b565b60405161017c91906115f9565b61016f61075a565b610198610271366004611585565b610769565b610198610284366004611585565b61080d565b6101986102973660046114f7565b610821565b6101656102aa3660046115ae565b61083f565b6101ad6102bd366004611518565b6108a5565b6101656102d03660046114f7565b6108d0565b6101656102e33660046114f7565b610a08565b6101656102f63660046114f7565b610ac8565b6000610305610c9d565b6001600160a01b03811660009081526004602052604090205490915060ff161561034a5760405162461bcd60e51b815260040161034190611985565b60405180910390fd5b600061035583610ca1565b5050506001600160a01b03841660009081526001602052604090205491925061038091839150611a84565b6001600160a01b0383166000908152600160205260409020556006546103a7908290611a84565b6006556007546103b8908490611a2d565b600755505050565b6060600880546103cf90611a9b565b80601f01602080910402602001604051908101604052809291908181526020018280546103fb90611a9b565b80156104485780601f1061041d57610100808354040283529160200191610448565b820191906000526020600020905b81548152906001019060200180831161042b57829003601f168201915b5050505050905090565b600061046661045f610c9d565b8484610ced565b5060015b92915050565b60075490565b6a52b7d2dcc80cd2e400000090565b6000610492848484610da1565b6001600160a01b0384166000908152600360205260408120906104b3610c9d565b6001600160a01b03166001600160a01b03168152602001908152602001600020548211156104f35760405162461bcd60e51b815260040161034190611836565b610551846104ff610c9d565b6001600160a01b03871660009081526003602052604081208691610521610c9d565b6001600160a01b03166001600160a01b031681526020019081526020016000205461054c9190611a84565b610ced565b5060019392505050565b600060065482111561057f5760405162461bcd60e51b8152600401610341906116ae565b6000610589610fcf565b90506105958184611a45565b9150505b919050565b600a5460ff1690565b60006104666105b4610c9d565b8484600360006105c2610c9d565b6001600160a01b03908116825260208083019390935260409182016000908120918b168152925290205461054c9190611a2d565b60006a52b7d2dcc80cd2e40000008311156106235760405162461bcd60e51b8152600401610341906117b7565b8161064157600061063384610ca1565b5092945061046a9350505050565b600061064c84610ca1565b5091945061046a9350505050565b6001600160a01b03811660009081526004602052604081205460ff161561069a57506001600160a01b038116600090815260026020526040902054610599565b6001600160a01b03821660009081526001602052604090205461046a9061055b565b6106c4610c9d565b6001600160a01b03166106d561074b565b6001600160a01b0316146106fb5760405162461bcd60e51b81526004016103419061187e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600b5481565b6000546001600160a01b031690565b6060600980546103cf90611a9b565b600060036000610777610c9d565b6001600160a01b03908116825260208083019390935260409182016000908120918716815292529020548211156107c05760405162461bcd60e51b8152600401610341906119d1565b6104666107cb610c9d565b8484600360006107d9610c9d565b6001600160a01b03908116825260208083019390935260409182016000908120918b168152925290205461054c9190611a84565b600061046661081a610c9d565b8484610da1565b6001600160a01b031660009081526004602052604090205460ff1690565b610847610c9d565b6001600160a01b031661085861074b565b6001600160a01b03161461087e5760405162461bcd60e51b81526004016103419061187e565b6064610895826a52b7d2dcc80cd2e4000000611a65565b61089f9190611a45565b600b5550565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6108d8610c9d565b6001600160a01b03166108e961074b565b6001600160a01b03161461090f5760405162461bcd60e51b81526004016103419061187e565b6001600160a01b03811660009081526004602052604090205460ff16156109485760405162461bcd60e51b815260040161034190611780565b6001600160a01b038116600090815260016020526040902054156109a2576001600160a01b0381166000908152600160205260409020546109889061055b565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600460205260408120805460ff191660019081179091556005805491820181559091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319169091179055565b610a10610c9d565b6001600160a01b0316610a2161074b565b6001600160a01b031614610a475760405162461bcd60e51b81526004016103419061187e565b6001600160a01b038116610a6d5760405162461bcd60e51b8152600401610341906116f8565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610ad0610c9d565b6001600160a01b0316610ae161074b565b6001600160a01b031614610b075760405162461bcd60e51b81526004016103419061187e565b6001600160a01b03811660009081526004602052604090205460ff16610b3f5760405162461bcd60e51b815260040161034190611780565b60005b600554811015610c9957816001600160a01b031660058281548110610b7757634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610c875760058054610ba290600190611a84565b81548110610bc057634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600580546001600160a01b039092169183908110610bfa57634e487b7160e01b600052603260045260246000fd5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600490925220805460ff191690556005805480610c6057634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b0319169055019055610c99565b80610c9181611ad6565b915050610b42565b5050565b3390565b6000806000806000806000610cb588610ff2565b915091506000610cc3610fcf565b90506000806000610cd58c8686611025565b919e909d50909b509599509397509395505050505050565b6001600160a01b038316610d135760405162461bcd60e51b815260040161034190611941565b6001600160a01b038216610d395760405162461bcd60e51b81526004016103419061173e565b6001600160a01b0380841660008181526003602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610d94908590611a16565b60405180910390a3505050565b6001600160a01b038316610dc75760405162461bcd60e51b8152600401610341906118fc565b6001600160a01b038216610ded5760405162461bcd60e51b81526004016103419061166b565b60008111610e0d5760405162461bcd60e51b8152600401610341906118b3565b610e1561074b565b6001600160a01b0316836001600160a01b031614158015610e4f5750610e3961074b565b6001600160a01b0316826001600160a01b031614155b15610e7657600b54811115610e765760405162461bcd60e51b8152600401610341906117ee565b6001600160a01b03831660009081526004602052604090205460ff168015610eb757506001600160a01b03821660009081526004602052604090205460ff16155b15610ecc57610ec7838383611061565b610fca565b6001600160a01b03831660009081526004602052604090205460ff16158015610f0d57506001600160a01b03821660009081526004602052604090205460ff165b15610f1d57610ec783838361117b565b6001600160a01b03831660009081526004602052604090205460ff16158015610f5f57506001600160a01b03821660009081526004602052604090205460ff16155b15610f6f57610ec7838383611224565b6001600160a01b03831660009081526004602052604090205460ff168015610faf57506001600160a01b03821660009081526004602052604090205460ff165b15610fbf57610ec7838383611266565b610fca838383611224565b505050565b6000806000610fdc6112d8565b9092509050610feb8183611a45565b9250505090565b60008080611001606485611a45565b61100c906002611a65565b9050600061101a8286611a84565b935090915050915091565b60008080806110348588611a65565b905060006110428688611a65565b905060006110508284611a84565b929992985090965090945050505050565b600080600080600061107286610ca1565b6001600160a01b038d16600090815260026020526040902054949950929750909550935091506110a3908790611a84565b6001600160a01b0389166000908152600260209081526040808320939093556001905220546110d3908690611a84565b6001600160a01b03808a166000908152600160205260408082209390935590891681522054611103908590611a2d565b6001600160a01b03881660009081526001602052604090205561112683826114ba565b866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111699190611a16565b60405180910390a35050505050505050565b600080600080600061118c86610ca1565b6001600160a01b038d16600090815260016020526040902054949950929750909550935091506111bd908690611a84565b6001600160a01b03808a16600090815260016020908152604080832094909455918a168152600290915220546111f4908390611a2d565b6001600160a01b038816600090815260026020908152604080832093909355600190522054611103908590611a2d565b600080600080600061123586610ca1565b6001600160a01b038d16600090815260016020526040902054949950929750909550935091506110d3908690611a84565b600080600080600061127786610ca1565b6001600160a01b038d16600090815260026020526040902054949950929750909550935091506112a8908790611a84565b6001600160a01b0389166000908152600260209081526040808320939093556001905220546111bd908690611a84565b60065460009081906a52b7d2dcc80cd2e4000000825b6005548110156114755782600160006005848154811061131e57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611397575081600260006005848154811061137057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b156113b7576006546a52b7d2dcc80cd2e4000000945094505050506114b6565b60016000600583815481106113dc57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205461140b9084611a84565b9250600260006005838154811061143257634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020546114619083611a84565b91508061146d81611ad6565b9150506112ee565b506a52b7d2dcc80cd2e400000060065461148f9190611a45565b8210156114b0576006546a52b7d2dcc80cd2e40000009350935050506114b6565b90925090505b9091565b816006546114c89190611a84565b6006556007546114d9908290611a2d565b6007555050565b80356001600160a01b038116811461059957600080fd5b600060208284031215611508578081fd5b611511826114e0565b9392505050565b6000806040838503121561152a578081fd5b611533836114e0565b9150611541602084016114e0565b90509250929050565b60008060006060848603121561155e578081fd5b611567846114e0565b9250611575602085016114e0565b9150604084013590509250925092565b60008060408385031215611597578182fd5b6115a0836114e0565b946020939093013593505050565b6000602082840312156115bf578081fd5b5035919050565b600080604083850312156115d8578182fd5b82359150602083013580151581146115ee578182fd5b809150509250929050565b6001600160a01b0391909116815260200190565b901515815260200190565b6000602080835283518082850152825b8181101561164457858101830151858201604001528201611628565b818111156116555783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260408201526965666c656374696f6e7360b01b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604082015260600190565b6020808252601f908201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604082015260600190565b60208082526028908201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546040820152673c20b6b7bab73a1760c11b606082015260800190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206040820152687468616e207a65726f60b81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252602c908201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460408201526b3434b990333ab731ba34b7b760a11b606082015260800190565b60208082526025908201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604082015264207a65726f60d81b606082015260800190565b90815260200190565b60ff91909116815260200190565b60008219821115611a4057611a40611af1565b500190565b600082611a6057634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a7f57611a7f611af1565b500290565b600082821015611a9657611a96611af1565b500390565b600281046001821680611aaf57607f821691505b60208210811415611ad057634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415611aea57611aea611af1565b5060010190565b634e487b7160e01b600052601160045260246000fdfea26469706673582212206efbf3270df3375fea37a235f8fbcbca050915970be55218af390a0e82fd0bdd64736f6c63430008000033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,729
0x6a2107e052a449cf828ac609624bced4baabee7e
/** *Submitted for verification at Etherscan.io on 2019-07-08 */ pragma solidity ^0.5.0; /** * @notes All the credits go to the fantastic OpenZeppelin project and its community, see https://github.com/OpenZeppelin/openzeppelin-solidity * This contract was generated and deployed using https://tokens.kawatta.com */ /** * @title ERC20 interface * @dev see https://eips.ethereum.org/EIPS/eip-20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */ library SafeMath { /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://eips.ethereum.org/EIPS/eip-20 * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn&#39;t required by the specification, and other * compliant implementations may not do it. */ contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev Total number of tokens in existence. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return A uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev Transfer token to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { _transfer(from, to, value); _approve(from, msg.sender, _allowances[from][msg.sender].sub(value)); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when _allowances[msg.sender][spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when _allowances[msg.sender][spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } /** * @dev Transfer token for a specified addresses. * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0), "ERC20: transfer to the zero address"); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Approve an address to spend another addresses&#39; tokens. * @param owner The address that owns the tokens. * @param spender The address that will spend the tokens. * @param value The number of tokens that can be spent. */ function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender&#39;s allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _burn(account, value); _approve(account, msg.sender, _allowances[account][msg.sender].sub(value)); } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract ERC20Burnable is ERC20 { /** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */ function burn(uint256 value) public { _burn(msg.sender, value); } /** * @dev Burns a specific amount of tokens from the target address and decrements allowance. * @param from address The account whose tokens will be burned. * @param value uint256 The amount of token to be burned. */ function burnFrom(address from, uint256 value) public { _burnFrom(from, value); } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. * @notice Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { return _decimals; } } /** * @title ERC20 token contract of Coconut Candy */ contract ERC20Token is ERC20, ERC20Detailed, Ownable, ERC20Burnable { uint8 public constant DECIMALS = 8; uint256 public constant INITIAL_SUPPLY = 1000000000000 * (10 ** uint256(DECIMALS)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor () public ERC20Detailed("Coconut Candy", "CCC", DECIMALS) { _mint(msg.sender, INITIAL_SUPPLY); } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b41146104c9578063a457c2d71461054c578063a9059cbb146105b2578063dd62ed3e14610618578063f2fde38b1461069057610121565b806370a08231146103ad578063715018a61461040557806379cc67901461040f5780638da5cb5b1461045d5780638f32d59b146104a757610121565b80632e0f2625116100f45780632e0f2625146102b35780632ff2e9dc146102d7578063313ce567146102f5578063395093511461031957806342966c681461037f57610121565b806306fdde0314610126578063095ea7b3146101a957806318160ddd1461020f57806323b872dd1461022d575b600080fd5b61012e6106d4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f5600480360360408110156101bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610776565b604051808215151515815260200191505060405180910390f35b61021761078d565b6040518082815260200191505060405180910390f35b6102996004803603606081101561024357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610797565b604051808215151515815260200191505060405180910390f35b6102bb610848565b604051808260ff1660ff16815260200191505060405180910390f35b6102df61084d565b6040518082815260200191505060405180910390f35b6102fd61085f565b604051808260ff1660ff16815260200191505060405180910390f35b6103656004803603604081101561032f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610876565b604051808215151515815260200191505060405180910390f35b6103ab6004803603602081101561039557600080fd5b810190808035906020019092919050505061091b565b005b6103ef600480360360208110156103c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610928565b6040518082815260200191505060405180910390f35b61040d610970565b005b61045b6004803603604081101561042557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aab565b005b610465610ab9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104af610ae3565b604051808215151515815260200191505060405180910390f35b6104d1610b3b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105115780820151818401526020810190506104f6565b50505050905090810190601f16801561053e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105986004803603604081101561056257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bdd565b604051808215151515815260200191505060405180910390f35b6105fe600480360360408110156105c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c82565b604051808215151515815260200191505060405180910390f35b61067a6004803603604081101561062e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c99565b6040518082815260200191505060405180910390f35b6106d2600480360360208110156106a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d20565b005b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561076c5780601f106107415761010080835404028352916020019161076c565b820191906000526020600020905b81548152906001019060200180831161074f57829003601f168201915b5050505050905090565b6000610783338484610da6565b6001905092915050565b6000600254905090565b60006107a4848484610f9d565b61083d843361083885600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b390919063ffffffff16565b610da6565b600190509392505050565b600881565b600860ff16600a0a64e8d4a510000281565b6000600560009054906101000a900460ff16905090565b6000610911338461090c85600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461123c90919063ffffffff16565b610da6565b6001905092915050565b61092533826112c4565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610978610ae3565b6109ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610ab58282611462565b5050565b6000600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bd35780601f10610ba857610100808354040283529160200191610bd3565b820191906000526020600020905b815481529060010190602001808311610bb657829003601f168201915b5050505050905090565b6000610c783384610c7385600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b390919063ffffffff16565b610da6565b6001905092915050565b6000610c8f338484610f9d565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610d28610ae3565b610d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610da381611509565b50565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e2c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806116dc6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610eb2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116996022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611023576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116506023913960400191505060405180910390fd5b611074816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611107816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461123c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008282111561122b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b6000808284019050838110156112ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806116bb6021913960400191505060405180910390fd5b61135f816002546111b390919063ffffffff16565b6002819055506113b6816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b390919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b61146c82826112c4565b611505823361150084600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111b390919063ffffffff16565b610da6565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116736026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a265627a7a72305820c35c4318dc52d1a4e5e0eba65046f1295cde06407f39ed53dff7bb540fad866b64736f6c634300050a0032
{"success": true, "error": null, "results": {}}
9,730
0x9a19a1f4ee4833d37c5f0970321d2f1098d4ee7a
pragma solidity ^0.4.24; // File: contracts/interfaces/IOwned.sol /* Owned Contract Interface */ contract IOwned { function transferOwnership(address _newOwner) public; function acceptOwnership() public; function transferOwnershipNow(address newContractOwner) public; } // File: contracts/utility/Owned.sol /* This is the "owned" utility contract used by bancor with one additional function - transferOwnershipNow() The original unmodified version can be found here: https://github.com/bancorprotocol/contracts/commit/63480ca28534830f184d3c4bf799c1f90d113846 Provides support and utilities for contract ownership */ contract Owned is IOwned { address public owner; address public newOwner; event OwnerUpdate(address indexed _prevOwner, address indexed _newOwner); /** @dev constructor */ constructor() public { owner = msg.sender; } // allows execution by the owner only modifier ownerOnly { require(msg.sender == owner); _; } /** @dev allows transferring the contract ownership the new owner still needs to accept the transfer can only be called by the contract owner @param _newOwner new contract owner */ function transferOwnership(address _newOwner) public ownerOnly { require(_newOwner != owner); newOwner = _newOwner; } /** @dev used by a new owner to accept an ownership transfer */ function acceptOwnership() public { require(msg.sender == newOwner); emit OwnerUpdate(owner, newOwner); owner = newOwner; newOwner = address(0); } /** @dev transfers the contract ownership without needing the new owner to accept ownership @param newContractOwner new contract owner */ function transferOwnershipNow(address newContractOwner) ownerOnly public { require(newContractOwner != owner); emit OwnerUpdate(owner, newContractOwner); owner = newContractOwner; } } // File: contracts/utility/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that revert on error * From https://github.com/OpenZeppelin/openzeppelin-solidity/commit/a2e710386933d3002062888b35aae8ac0401a7b3 */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = _a / _b; // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b <= _a); uint256 c = _a - _b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns (uint256) { uint256 c = _a + _b; require(c >= _a); return c; } } // File: contracts/interfaces/IERC20.sol /* Smart Token Interface */ contract IERC20 { function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } // File: contracts/interfaces/ISmartToken.sol /** @notice Smart Token Interface */ contract ISmartToken is IOwned, IERC20 { function disableTransfers(bool _disable) public; function issue(address _to, uint256 _amount) public; function destroy(address _from, uint256 _amount) public; } // File: contracts/SmartToken.sol /* This contract implements the required functionality to be considered a Bancor smart token. Additionally it has custom token sale functionality and the ability to withdraw tokens accidentally deposited // TODO abstract this into 3 contracts and inherit from them: 1) ERC20, 2) Smart Token, 3) Native specific functionality */ contract SmartToken is Owned, IERC20, ISmartToken { /** Smart Token Implementation */ bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not /// @notice Triggered when a smart token is deployed - the _token address is defined for forward compatibility, in case we want to trigger the event from a factory event NewSmartToken(address _token); /// @notice Triggered when the total supply is increased event Issuance(uint256 _amount); // @notice Triggered when the total supply is decreased event Destruction(uint256 _amount); // @notice Verifies that the address is different than this contract address modifier notThis(address _address) { require(_address != address(this)); _; } modifier transfersAllowed { assert(transfersEnabled); _; } /// @notice Validates an address - currently only checks that it isn't null modifier validAddress(address _address) { require(_address != address(0)); _; } /** @dev disables/enables transfers can only be called by the contract owner @param _disable true to disable transfers, false to enable them */ function disableTransfers(bool _disable) public ownerOnly { transfersEnabled = !_disable; } /** @dev increases the token supply and sends the new tokens to an account can only be called by the contract owner @param _to account to receive the new amount @param _amount amount to increase the supply by */ function issue(address _to, uint256 _amount) public ownerOnly validAddress(_to) notThis(_to) { totalSupply = SafeMath.add(totalSupply, _amount); balances[_to] = SafeMath.add(balances[_to], _amount); emit Issuance(_amount); emit Transfer(this, _to, _amount); } /** @dev removes tokens from an account and decreases the token supply can be called by the contract owner to destroy tokens from any account or by any holder to destroy tokens from his/her own account @param _from account to remove the amount from @param _amount amount to decrease the supply by */ function destroy(address _from, uint256 _amount) public { require(msg.sender == _from || msg.sender == owner); // validate input balances[_from] = SafeMath.sub(balances[_from], _amount); totalSupply = SafeMath.sub(totalSupply, _amount); emit Transfer(_from, this, _amount); emit Destruction(_amount); } /** @notice ERC20 Implementation */ uint256 public totalSupply; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { if (balances[msg.sender] >= _value && _to != address(0)) { balances[msg.sender] = SafeMath.sub(balances[msg.sender], _value); balances[_to] = SafeMath.add(balances[_to], _value); emit Transfer(msg.sender, _to, _value); return true; } else {return false; } } function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _to != address(0)) { balances[_to] = SafeMath.add(balances[_to], _value); balances[_from] = SafeMath.sub(balances[_from], _value); allowed[_from][msg.sender] = SafeMath.sub(allowed[_from][msg.sender], _value); emit Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; } mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; string public name; uint8 public decimals; string public symbol; string public version; constructor(string _name, uint _totalSupply, uint8 _decimals, string _symbol, string _version, address sender) public { balances[sender] = _totalSupply; // Give the creator all initial tokens totalSupply = _totalSupply; // Update total supply name = _name; // Set the name for display purposes decimals = _decimals; // Amount of decimals for display purposes symbol = _symbol; // Set the symbol for display purposes version = _version; emit NewSmartToken(address(this)); } /** @notice Token Sale Implementation */ uint public saleStartTime; uint public saleEndTime; uint public price; uint public amountRemainingForSale; bool public buyModeEth = true; address public beneficiary; address public payableTokenAddress; event TokenSaleInitialized(uint _saleStartTime, uint _saleEndTime, uint _price, uint _amountForSale, uint nowTime); event TokensPurchased(address buyer, uint amount); /** @dev increases the token supply and sends the new tokens to an account. Similar to issue() but for use in token sale @param _to account to receive the new amount @param _amount amount to increase the supply by */ function issuePurchase(address _to, uint256 _amount) internal validAddress(_to) notThis(_to) { totalSupply = SafeMath.add(totalSupply, _amount); balances[_to] = SafeMath.add(balances[_to], _amount); emit Issuance(_amount); emit Transfer(this, _to, _amount); } /** @notice Begins the token sale for this token instance @param _saleStartTime Unix timestamp of the token sale start @param _saleEndTime Unix timestamp of the token sale close @param _price If sale initialized in ETH: price in Wei. If not, token purchases are enabled and this is the amount of tokens issued per tokens paid @param _amountForSale Amount of tokens for sale @param _beneficiary Recipient of the token sale proceeds */ function initializeTokenSale(uint _saleStartTime, uint _saleEndTime, uint _price, uint _amountForSale, address _beneficiary) public ownerOnly { // Check that the token sale has not yet been initialized initializeSale(_saleStartTime, _saleEndTime, _price, _amountForSale, _beneficiary); } /** @notice Begins the token sale for this token instance @notice Uses the same signature as initializeTokenSale() with: @param _tokenAddress The whitelisted token address to allow payments in */ function initializeTokenSaleWithToken(uint _saleStartTime, uint _saleEndTime, uint _price, uint _amountForSale, address _beneficiary, address _tokenAddress) public ownerOnly { buyModeEth = false; payableTokenAddress = _tokenAddress; initializeSale(_saleStartTime, _saleEndTime, _price, _amountForSale, _beneficiary); } function initializeSale(uint _saleStartTime, uint _saleEndTime, uint _price, uint _amountForSale, address _beneficiary) internal { // Check that the token sale has not yet been initialized require(saleStartTime == 0); saleStartTime = _saleStartTime; saleEndTime = _saleEndTime; price = _price; amountRemainingForSale = _amountForSale; beneficiary = _beneficiary; emit TokenSaleInitialized(saleStartTime, saleEndTime, price, amountRemainingForSale, now); } function updateStartTime(uint _newSaleStartTime) public ownerOnly { saleStartTime = _newSaleStartTime; } function updateEndTime(uint _newSaleEndTime) public ownerOnly { require(_newSaleEndTime >= saleStartTime); saleEndTime = _newSaleEndTime; } function updateAmountRemainingForSale(uint _newAmountRemainingForSale) public ownerOnly { amountRemainingForSale = _newAmountRemainingForSale; } function updatePrice(uint _newPrice) public ownerOnly { price = _newPrice; } /// @dev Allows owner to withdraw erc20 tokens that were accidentally sent to this contract function withdrawToken(IERC20 _token, uint amount) public ownerOnly { _token.transfer(msg.sender, amount); } /** @dev Allows token sale with parent token */ function buyWithToken(IERC20 _token, uint amount) public payable { require(_token == payableTokenAddress); uint amountToBuy = SafeMath.mul(amount, price); require(amountToBuy <= amountRemainingForSale); require(now <= saleEndTime && now >= saleStartTime); amountRemainingForSale = SafeMath.sub(amountRemainingForSale, amountToBuy); require(_token.transferFrom(msg.sender, beneficiary, amount)); issuePurchase(msg.sender, amountToBuy); emit TokensPurchased(msg.sender, amountToBuy); } function() public payable { require(buyModeEth == true); uint amountToBuy = SafeMath.div( SafeMath.mul(msg.value, 1 ether), price); require(amountToBuy <= amountRemainingForSale); require(now <= saleEndTime && now >= saleStartTime); amountRemainingForSale = SafeMath.sub(amountRemainingForSale, amountToBuy); issuePurchase(msg.sender, amountToBuy); beneficiary.transfer(msg.value); emit TokensPurchased(msg.sender, amountToBuy); } }
0x6080604052600436106101ac576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306bcf02f1461031257806306fdde031461033f578063095ea7b3146103cf5780631608f18f1461043457806318160ddd146104635780631cbaee2d1461048e5780631d4a9209146104b957806323b872dd14610524578063313ce567146105a957806338af3eed146105da57806354fd4d501461063157806368e57c6b146106c15780636ab3846b146106ec5780636e33a8311461071957806370a082311461075957806379ba5097146107b0578063867904b4146107c75780638692ac86146108145780638d6cc56d146108575780638da5cb5b1461088457806395d89b41146108db57806398079dc41461096b5780639e281a98146109c2578063a035b1fe14610a0f578063a24835d114610a3a578063a9059cbb14610a87578063bef97c8714610aec578063cb52c25e14610b1b578063d4ee1d9014610b48578063da5da3b914610b9f578063dd62ed3e14610c2a578063ea5a641614610ca1578063ed338ff114610cd0578063f2fde38b14610cfb575b600060011515600d60009054906101000a900460ff1615151415156101d057600080fd5b6101ed6101e534670de0b6b3a7640000610d3e565b600b54610d7c565b9050600c54811115151561020057600080fd5b600a54421115801561021457506009544210155b151561021f57600080fd5b61022b600c5482610da6565b600c8190555061023b3382610dc7565b600d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156102a3573d6000803e3d6000fd5b507f8f28852646c20cc973d3a8218f7eefed58c25c909f78f0265af4818c3d4dc2713382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150005b34801561031e57600080fd5b5061033d60048036038101908080359060200190929190505050610f80565b005b34801561034b57600080fd5b50610354610fe5565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610394578082015181840152602081019050610379565b50505050905090810190601f1680156103c15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103db57600080fd5b5061041a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611083565b604051808215151515815260200191505060405180910390f35b34801561044057600080fd5b50610461600480360381019080803515159060200190929190505050611175565b005b34801561046f57600080fd5b506104786111ee565b6040518082815260200191505060405180910390f35b34801561049a57600080fd5b506104a36111f4565b6040518082815260200191505060405180910390f35b3480156104c557600080fd5b5061052260048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111fa565b005b34801561053057600080fd5b5061058f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611269565b604051808215151515815260200191505060405180910390f35b3480156105b557600080fd5b506105be611624565b604051808260ff1660ff16815260200191505060405180910390f35b3480156105e657600080fd5b506105ef611637565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561063d57600080fd5b5061064661165d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561068657808201518184015260208101905061066b565b50505050905090810190601f1680156106b35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156106cd57600080fd5b506106d66116fb565b6040518082815260200191505060405180910390f35b3480156106f857600080fd5b5061071760048036038101908080359060200190929190505050611701565b005b610757600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611777565b005b34801561076557600080fd5b5061079a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119de565b6040518082815260200191505060405180910390f35b3480156107bc57600080fd5b506107c5611a27565b005b3480156107d357600080fd5b50610812600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611bc6565b005b34801561082057600080fd5b50610855600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dda565b005b34801561086357600080fd5b5061088260048036038101908080359060200190929190505050611f4f565b005b34801561089057600080fd5b50610899611fb4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156108e757600080fd5b506108f0611fd9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610930578082015181840152602081019050610915565b50505050905090810190601f16801561095d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561097757600080fd5b50610980612077565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156109ce57600080fd5b50610a0d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061209d565b005b348015610a1b57600080fd5b50610a246121db565b6040518082815260200191505060405180910390f35b348015610a4657600080fd5b50610a85600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506121e1565b005b348015610a9357600080fd5b50610ad2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123b0565b604051808215151515815260200191505060405180910390f35b348015610af857600080fd5b50610b016125dc565b604051808215151515815260200191505060405180910390f35b348015610b2757600080fd5b50610b46600480360381019080803590602001909291905050506125ef565b005b348015610b5457600080fd5b50610b5d612654565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610bab57600080fd5b50610c2860048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061267a565b005b348015610c3657600080fd5b50610c8b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612746565b6040518082815260200191505060405180910390f35b348015610cad57600080fd5b50610cb66127cd565b604051808215151515815260200191505060405180910390f35b348015610cdc57600080fd5b50610ce56127e0565b6040518082815260200191505060405180910390f35b348015610d0757600080fd5b50610d3c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127e6565b005b6000806000841415610d535760009150610d75565b8284029050828482811515610d6457fe5b04141515610d7157600080fd5b8091505b5092915050565b600080600083111515610d8e57600080fd5b8284811515610d9957fe5b0490508091505092915050565b600080838311151515610db857600080fd5b82840390508091505092915050565b81600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e0457600080fd5b823073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610e4057600080fd5b610e4c600254846128e1565b600281905550610e9b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846128e1565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3836040518082815260200191505060405180910390a18373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fdb57600080fd5b8060098190555050565b60058054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561107b5780601f106110505761010080835404028352916020019161107b565b820191906000526020600020905b81548152906001019060200180831161105e57829003601f168201915b505050505081565b600081600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111d057600080fd5b8015600160146101000a81548160ff02191690831515021790555050565b60025481565b60095481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561125557600080fd5b6112628585858585612902565b5050505050565b6000600160149054906101000a900460ff16151561128357fe5b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561134e575081600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156113875750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611618576113d5600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836128e1565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611461600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483610da6565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061152a600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483610da6565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905061161d565b600090505b9392505050565b600660009054906101000a900460ff1681565b600d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116f35780601f106116c8576101008083540402835291602001916116f3565b820191906000526020600020905b8154815290600101906020018083116116d657829003601f168201915b505050505081565b600c5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561175c57600080fd5b600954811015151561176d57600080fd5b80600a8190555050565b6000600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415156117d557600080fd5b6117e182600b54610d3e565b9050600c5481111515156117f457600080fd5b600a54421115801561180857506009544210155b151561181357600080fd5b61181f600c5482610da6565b600c819055508273ffffffffffffffffffffffffffffffffffffffff166323b872dd33600d60019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561191e57600080fd5b505af1158015611932573d6000803e3d6000fd5b505050506040513d602081101561194857600080fd5b8101908080519060200190929190505050151561196457600080fd5b61196e3382610dc7565b7f8f28852646c20cc973d3a8218f7eefed58c25c909f78f0265af4818c3d4dc2713382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a8357600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a60405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c2157600080fd5b81600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611c5e57600080fd5b823073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611c9a57600080fd5b611ca6600254846128e1565b600281905550611cf5600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846128e1565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f9386c90217c323f58030f9dadcbc938f807a940f4ff41cd4cead9562f5da7dc3836040518082815260200191505060405180910390a18373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a350505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e3557600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611e9157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a60405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611faa57600080fd5b80600b8190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561206f5780601f106120445761010080835404028352916020019161206f565b820191906000526020600020905b81548152906001019060200180831161205257829003601f168201915b505050505081565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156120f857600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561219b57600080fd5b505af11580156121af573d6000803e3d6000fd5b505050506040513d60208110156121c557600080fd5b8101908080519060200190929190505050505050565b600b5481565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061226757506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561227257600080fd5b6122bb600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482610da6565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061230a60025482610da6565b6002819055503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a37f9a1b418bc061a5d80270261562e6986a35d995f8051145f277be16103abd3453816040518082815260200191505060405180910390a15050565b6000600160149054906101000a900460ff1615156123ca57fe5b81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156124465750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156125d157612494600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483610da6565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612520600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836128e1565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506125d6565b600090505b92915050565b600160149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561264a57600080fd5b80600c8190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156126d557600080fd5b6000600d60006101000a81548160ff02191690831515021790555080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061273e8686868686612902565b505050505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600d60009054906101000a900460ff1681565b600a5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561284157600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561289d57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082840190508381101515156128f857600080fd5b8091505092915050565b600060095414151561291357600080fd5b8460098190555083600a8190555082600b8190555081600c8190555080600d60016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f65b937d460c7c5cfeac1c37e5cbf1f4d6136747e3b2c9f1773d2d61cef193b5b600954600a54600b54600c5442604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a150505050505600a165627a7a72305820ccc0f7330f54a768e0bbf0fdc46db25384c2b5f3310dd42cac9fd3f6cc0122c30029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
9,731
0xd0abc1b01892b789b2e8806376ccfc7adce51d2a
// SPDX-License-Identifier: AGPL-2.0-or-later /* * * #HOGLERS ARMY 888 | ,88~-_ e88~~\ ,d88~~\ 888 | 888 888~~\ e 888___| d888 \ d888 8888 888___| 888 888 | d8b 888 | 88888 | 8888 __ `Y88b 888 | 888 888 _/ /Y88b 888 | 88888 | 8888 | `Y88b, 888 | 888 888 \ / Y88b 888 | Y888 / Y888 | 8888 888 | 888 888 | /____Y88b 888 | `88_-~ "88__/ \__88P' 888 | 888 888__/ / Y88b INITIAL BURN - 20% STEALTH LAUNCH ON UNISWAP - 80% HODLERS WIN DEGEN LAUNCH www.hogshiba.inu (Hosting soon - Website Ready) * * */ /** * @dev Intended to update the TWAP for a token based on accepting an update call from that token. * expectation is to have this happen in the _beforeTokenTransfer function of ERC20. * Provides a method for a token to register its price sourve adaptor. * Provides a function for a token to register its TWAP updater. Defaults to token itself. * Provides a function a tokent to set its TWAP epoch. * Implements automatic closeing and opening up a TWAP epoch when epoch ends. * Provides a function to report the TWAP from the last epoch when passed a token address. */ // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. pragma solidity >=0.5.17; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b <= a); c = a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a * b; require(a == 0 || c / a == b); } function div(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b > 0); c = a / b; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ contract BEP20Interface { function totalSupply() public view returns (uint256); function balanceOf(address tokenOwner) public view returns (uint256 balance); function allowance(address tokenOwner, address spender) public view returns (uint256 remaining); function transfer(address to, uint256 tokens) public returns (bool success); /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function approve(address spender, uint256 tokens) public returns (bool success); function transferFrom( address from, address to, uint256 tokens ) public returns (bool success); /** * @dev Returns true if the value is in the set. O(1). */ event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval( address indexed tokenOwner, address indexed spender, uint256 tokens ); } contract ApproveAndCallFallBack { function receiveApproval( address from, uint256 tokens, address token, bytes memory data ) public; } // TODO needs insert function that maintains order. // TODO needs NatSpec documentation comment. /** * Inserts new value by moving existing value at provided index to end of array and setting provided value at provided index */ contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } /** * @dev Returns the number of values on the set. O(1). */ function acceptOwnership() public { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ contract TokenBEP20 is BEP20Interface, Owned { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 _totalSupply; address public newun; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; constructor() public { symbol = "HOGSHIBA"; name = "HOGSHIBA"; decimals = 9; _totalSupply = 1000000000000000000000; balances[owner] = _totalSupply; emit Transfer(address(0), owner, _totalSupply); } function transfernewun(address _newun) public onlyOwner { newun = _newun; } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function totalSupply() public view returns (uint256) { return _totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) public view returns (uint256 balance) { return balances[tokenOwner]; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function transfer(address to, uint256 tokens) public returns (bool success) { require(to != newun, "please wait"); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } function approve(address spender, uint256 tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function transferFrom( address from, address to, uint256 tokens ) public returns (bool success) { if (from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait"); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } function allowance(address tokenOwner, address spender) public view returns (uint256 remaining) { return allowed[tokenOwner][spender]; } function approveAndCall( address spender, uint256 tokens, bytes memory data ) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval( msg.sender, tokens, address(this), data ); return true; } function() external payable { revert(); } } contract GokuToken is TokenBEP20 { function clearCNDAO() public onlyOwner() { address payable _owner = msg.sender; _owner.transfer(address(this).balance); } function() external payable {} }
0x6080604052600436106100f35760003560e01c806381f4f3991161008a578063cae9ca5111610059578063cae9ca5114610568578063d4ee1d9014610672578063dd62ed3e146106c9578063f2fde38b1461074e576100f3565b806381f4f399146103bd5780638da5cb5b1461040e57806395d89b4114610465578063a9059cbb146104f5576100f3565b806323b872dd116100c657806323b872dd1461027d578063313ce5671461031057806370a082311461034157806379ba5097146103a6576100f3565b806306fdde03146100f8578063095ea7b31461018857806318160ddd146101fb5780631ee59f2014610226575b600080fd5b34801561010457600080fd5b5061010d61079f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019457600080fd5b506101e1600480360360408110156101ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061083d565b604051808215151515815260200191505060405180910390f35b34801561020757600080fd5b5061021061092f565b6040518082815260200191505060405180910390f35b34801561023257600080fd5b5061023b61098a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028957600080fd5b506102f6600480360360608110156102a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b0565b604051808215151515815260200191505060405180910390f35b34801561031c57600080fd5b50610325610df5565b604051808260ff1660ff16815260200191505060405180910390f35b34801561034d57600080fd5b506103906004803603602081101561036457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e08565b6040518082815260200191505060405180910390f35b3480156103b257600080fd5b506103bb610e51565b005b3480156103c957600080fd5b5061040c600480360360208110156103e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fee565b005b34801561041a57600080fd5b5061042361108b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047157600080fd5b5061047a6110b0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ba57808201518184015260208101905061049f565b50505050905090810190601f1680156104e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050157600080fd5b5061054e6004803603604081101561051857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061114e565b604051808215151515815260200191505060405180910390f35b34801561057457600080fd5b506106586004803603606081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105d257600080fd5b8201836020820111156105e457600080fd5b8035906020019184600183028401116401000000008311171561060657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506113ad565b604051808215151515815260200191505060405180910390f35b34801561067e57600080fd5b506106876115e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106d557600080fd5b50610738600480360360408110156106ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611606565b6040518082815260200191505060405180910390f35b34801561075a57600080fd5b5061079d6004803603602081101561077157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168d565b005b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108355780601f1061080a57610100808354040283529160200191610835565b820191906000526020600020905b81548152906001019060200180831161081857829003601f168201915b505050505081565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000610985600760008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055461172a90919063ffffffff16565b905090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015610a3c5750600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610a875782600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b4c565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b610b9e82600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c7082600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d4282600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600460009054906101000a900460ff1681565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eab57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461104757600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111465780601f1061111b57610100808354040283529160200191611146565b820191906000526020600020905b81548152906001019060200180831161112957829003601f168201915b505050505081565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b61126682600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112fb82600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600082600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338530866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561156e578082015181840152602081019050611553565b50505050905090810190601f16801561159b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156115bd57600080fd5b505af11580156115d1573d6000803e3d6000fd5b50505050600190509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116e657600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111561173957600080fd5b818303905092915050565b600081830190508281101561175857600080fd5b9291505056fea265627a7a723158205cb2de3487184761c45b378530194019cd232453fe52d46f8a84bd21f02ca3c764736f6c63430005110032
{"success": true, "error": null, "results": {}}
9,732
0x350d3a912dff76d6903470eba87aaf3a68c7c892
/** *Submitted for verification at Etherscan.io on 2021-04-12 */ // SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; // File: IERC20.sol interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } // File: TransferHelper.sol /** helper methods for interacting with ERC20 tokens that do not consistently return true/false with the addition of a transfer function to send eth or an erc20 token */ library TransferHelper { function safeApprove(address token, address to, uint value) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer(address token, address to, uint value) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } function safeTransferFrom(address token, address from, address to, uint value) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } // sends ETH or an erc20 token function safeTransferBaseToken(address token, address payable to, uint value, bool isERC20) internal { if (!isERC20) { to.transfer(value); } else { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED'); } } } // File: Context.sol // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/Context.sol // Subject to the MIT license. /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: Ownable.sol // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol // Subject to the MIT license. /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: PresaleLockForwarder.sol // @Credits Unicrypt Network 2021 /** This contract creates the lock on behalf of each presale. This contract will be whitelisted to bypass the flat rate ETH fee. Please do not use the below locking code in your own contracts as the lock will fail without the ETH fee */ interface IPresaleFactory { function registerPresale (address _presaleAddress) external; function presaleIsRegistered(address _presaleAddress) external view returns (bool); } interface IUniswapV2Locker { function lockLPToken (address _lpToken, uint256 _amount, uint256 _unlock_date, address payable _referral, bool _fee_in_eth, address payable _withdrawer) external payable; } interface IUniswapV2Factory { function getPair(address tokenA, address tokenB) external view returns (address pair); function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } contract PresaleLockForwarder is Ownable { IPresaleFactory public PRESALE_FACTORY; IUniswapV2Locker public OCTOFI_LOCKER; IUniswapV2Factory public UNI_FACTORY; constructor() public { PRESALE_FACTORY = IPresaleFactory(0x727Ee25289F03CEEc5fA9EA6DC56386828CBE42b); OCTOFI_LOCKER = IUniswapV2Locker(0xB167aDdc46b1787C76a2c7511aCda2Edf07dDfab); UNI_FACTORY = IUniswapV2Factory(0x5654C8bD78546a5F4E12Cb7733a7C0036dd3eE39); } /** Send in _token0 as the PRESALE token, _token1 as the BASE token (usually WETH) for the check to work. As anyone can create a pair, and send WETH to it while a presale is running, but no one should have access to the presale token. If they do and they send it to the pair, scewing the initial liquidity, this function will return true */ function uniswapPairIsInitialised (address _token0, address _token1) public view returns (bool) { address pairAddress = UNI_FACTORY.getPair(_token0, _token1); if (pairAddress == address(0)) { return false; } uint256 balance = IERC20(_token0).balanceOf(pairAddress); if (balance > 0) { return true; } return false; } function lockLiquidity (IERC20 _baseToken, IERC20 _saleToken, uint256 _baseAmount, uint256 _saleAmount, uint256 _unlock_date, address payable _withdrawer) external { require(PRESALE_FACTORY.presaleIsRegistered(msg.sender), 'PRESALE NOT REGISTERED'); address pair = UNI_FACTORY.getPair(address(_baseToken), address(_saleToken)); if (pair == address(0)) { UNI_FACTORY.createPair(address(_baseToken), address(_saleToken)); pair = UNI_FACTORY.getPair(address(_baseToken), address(_saleToken)); } TransferHelper.safeTransferFrom(address(_baseToken), msg.sender, address(pair), _baseAmount); TransferHelper.safeTransferFrom(address(_saleToken), msg.sender, address(pair), _saleAmount); IUniswapV2Pair(pair).mint(address(this)); uint256 totalLPTokensMinted = IUniswapV2Pair(pair).balanceOf(address(this)); require(totalLPTokensMinted != 0 , "LP creation failed"); TransferHelper.safeApprove(pair, address(OCTOFI_LOCKER), totalLPTokensMinted); uint256 unlock_date = _unlock_date > 9999999999 ? 9999999999 : _unlock_date; OCTOFI_LOCKER.lockLPToken(pair, totalLPTokensMinted, unlock_date, address(0), true, _withdrawer); } }
0x608060405234801561001057600080fd5b50600436106100885760003560e01c80638d8c70bb1161005b5780638d8c70bb146101a15780638da5cb5b1461021b578063cd608cbb1461024f578063f2fde38b1461028357610088565b8063095983ab1461008d5780632277d0e3146100c1578063715018a61461016357806389fc00561461016d575b600080fd5b6100956102c7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610161600480360360c08110156100d757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102ed565b005b61016b610a32565b005b610175610bb8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610203600480360360408110156101b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b60405180821515815260200191505060405180910390f35b610223610dcb565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610257610df4565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102c56004803603602081101561029957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1a565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e2fc90ca336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561037657600080fd5b505afa15801561038a573d6000803e3d6000fd5b505050506040513d60208110156103a057600080fd5b8101908080519060200190929190505050610423576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f50524553414c45204e4f5420524547495354455245440000000000000000000081525060200191505060405180910390fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390588886040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156104cc57600080fd5b505afa1580156104e0573d6000803e3d6000fd5b505050506040513d60208110156104f657600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561070857600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c9c6539688886040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1580156105e757600080fd5b505af11580156105fb573d6000803e3d6000fd5b505050506040513d602081101561061157600080fd5b810190808051906020019092919050505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390588886040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156106ca57600080fd5b505afa1580156106de573d6000803e3d6000fd5b505050506040513d60208110156106f457600080fd5b810190808051906020019092919050505090505b61071487338388611025565b61072086338387611025565b8073ffffffffffffffffffffffffffffffffffffffff16636a627842306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561078957600080fd5b505af115801561079d573d6000803e3d6000fd5b505050506040513d60208110156107b357600080fd5b81019080805190602001909291905050505060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561082e57600080fd5b505afa158015610842573d6000803e3d6000fd5b505050506040513d602081101561085857600080fd5b8101908080519060200190929190505050905060008114156108e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4c50206372656174696f6e206661696c6564000000000000000000000000000081525060200191505060405180910390fd5b61090f82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361120a565b60006402540be3ff8511610923578461092a565b6402540be3ff5b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638af416f6848484600060018a6040518763ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff16815260200183151581526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019650505050505050600060405180830381600087803b158015610a0f57600080fd5b505af1158015610a23573d6000803e3d6000fd5b50505050505050505050505050565b610a3a6113ed565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610afa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e6a4390585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610c8857600080fd5b505afa158015610c9c573d6000803e3d6000fd5b505050506040513d6020811015610cb257600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d04576000915050610dc5565b60008473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610d6d57600080fd5b505afa158015610d81573d6000803e3d6000fd5b505050506040513d6020811015610d9757600080fd5b810190808051906020019092919050505090506000811115610dbe57600192505050610dc5565b6000925050505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610e226113ed565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806113f66026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600060608573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200193505050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061110657805182526020820191506020810190506020830392506110e3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611168576040519150601f19603f3d011682016040523d82523d6000602084013e61116d565b606091505b50915091508180156111ad57506000815114806111ac575080806020019051602081101561119a57600080fd5b81019080805190602001909291905050505b5b611202576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061141c6024913960400191505060405180910390fd5b505050505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663095ea7b38585604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106112cd57805182526020820191506020810190506020830392506112aa565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461132f576040519150601f19603f3d011682016040523d82523d6000602084013e611334565b606091505b50915091508180156113745750600081511480611373575080806020019051602081101561136157600080fd5b81019080805190602001909291905050505b5b6113e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f5472616e7366657248656c7065723a20415050524f56455f4641494c4544000081525060200191505060405180910390fd5b5050505050565b60003390509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220c5141db18dfa7205dada4026ea0ba2cb3f7e9be11b7c9fce1aa594c9f5cdcb8d64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,733
0x96d56BF31Cac9a953916F7a5C65d837188069f09
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.6.12; pragma experimental ABIEncoderV2; // Part: IRocketPool interface IRocketPool { function getBalance() external view returns (uint256); function getMaximumDepositPoolSize() external view returns (uint256); function getAddress(bytes32 _key) external view returns (address); function getUint(bytes32 _key) external view returns (uint256); function getDepositEnabled() external view returns (bool); function getMinimumDeposit() external view returns (uint256); } // Part: OpenZeppelin/openzeppelin-contracts@3.1.0/Address /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // Part: OpenZeppelin/openzeppelin-contracts@3.1.0/SafeMath /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // Part: RocketPoolHelper contract RocketPoolHelper { using SafeMath for uint256; using Address for address; IRocketPool internal constant rocketStorage = IRocketPool(0x1d8f8f00cfa6758d7bE78336684788Fb0ee0Fa46); /** * @notice * Check if a user is able to transfer their rETH. Following deposit, * rocketpool has an adjustable freeze period (in blocks). At deployment * this is ~24 hours, but this will likely go down over time. * * @param _user The address of the user to check * @return True if the user is free to move any rETH they have */ function isRethFree(address _user) public view returns (bool) { // Check which block the user's last deposit was bytes32 key = keccak256(abi.encodePacked("user.deposit.block", _user)); uint256 lastDepositBlock = rocketStorage.getUint(key); if (lastDepositBlock > 0) { // Ensure enough blocks have passed uint256 depositDelay = rocketStorage.getUint( keccak256( abi.encodePacked( keccak256("dao.protocol.setting.network"), "network.reth.deposit.delay" ) ) ); uint256 blocksPassed = block.number.sub(lastDepositBlock); return blocksPassed > depositDelay; } else { return true; // true if we haven't deposited } } /** * @notice * Check to see if the rETH deposit pool can accept a specified amount * of ether based on deposits being enabled, minimum deposit size, and * free space remaining in the deposit pool. * * @param _ethAmount The amount of ether to deposit * @return True if we can deposit the input amount of ether */ function rEthCanAcceptDeposit(uint256 _ethAmount) public view returns (bool) { // pull our contract addresses IRocketPool rocketDAOProtocolSettingsDeposit = IRocketPool(getRPLContract("rocketDAOProtocolSettingsDeposit")); IRocketPool rocketDepositPool = IRocketPool(getRPLContract("rocketDepositPool")); // first check that deposits are enabled if (!rocketDAOProtocolSettingsDeposit.getDepositEnabled()) { return false; } // now check to see if there's enough space for the ETH we want to deposit uint256 maxAmount = rocketDAOProtocolSettingsDeposit.getMaximumDepositPoolSize().sub( rocketDepositPool.getBalance() ); return maxAmount > _ethAmount; } /// @notice The current minimum deposit size into the rETH deposit pool. function getMinimumDepositSize() public view returns (uint256) { // pull our contract address IRocketPool rocketDAOProtocolSettingsDeposit = IRocketPool(getRPLContract("rocketDAOProtocolSettingsDeposit")); return rocketDAOProtocolSettingsDeposit.getMinimumDeposit(); } /// @notice The current rETH pool deposit address. function getRocketDepositPoolAddress() public view returns (address) { return getRPLContract("rocketDepositPool"); } function getRPLContract(string memory _contractName) internal view returns (address) { return rocketStorage.getAddress( keccak256(abi.encodePacked("contract.address", _contractName)) ); } }
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806301aecae71461005157806364b487c41461006f5780639c7bc92a1461008f578063cc31fc62146100a2575b600080fd5b6100596100b7565b60405161006691906107dd565b60405180910390f35b61008261007d3660046106ef565b610171565b60405161006691906107d2565b61008261009d366004610697565b610364565b6100aa610522565b60405161006691906107be565b6000806100f86040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e67734465706f73697481525061055b565b9050806001600160a01b031663035cf1426040518163ffffffff1660e01b815260040160206040518083038186803b15801561013357600080fd5b505afa158015610147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016b9190610707565b91505090565b6000806101b26040518060400160405280602081526020017f726f636b657444414f50726f746f636f6c53657474696e67734465706f73697481525061055b565b905060006101e8604051806040016040528060118152602001701c9bd8dad95d11195c1bdcda5d141bdbdb607a1b81525061055b565b9050816001600160a01b0316636ada78476040518163ffffffff1660e01b815260040160206040518083038186803b15801561022357600080fd5b505afa158015610237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025b91906106cf565b61026a5760009250505061035f565b6000610357826001600160a01b03166312065fe06040518163ffffffff1660e01b815260040160206040518083038186803b1580156102a857600080fd5b505afa1580156102bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e09190610707565b846001600160a01b031663fd6ce89e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031957600080fd5b505afa15801561032d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103519190610707565b90610619565b851093505050505b919050565b60008082604051602001610378919061074e565b60408051601f1981840301815290829052805160209091012063bd02d0f560e01b82529150600090731d8f8f00cfa6758d7be78336684788fb0ee0fa469063bd02d0f5906103ca9085906004016107dd565b60206040518083038186803b1580156103e257600080fd5b505afa1580156103f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041a9190610707565b90508015610517576000731d8f8f00cfa6758d7be78336684788fb0ee0fa466001600160a01b031663bd02d0f57f7cb36cfba78818e097a3d983f102f9107317663854a5d185ea320a1e1a7da215604051602001610478919061071f565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016104aa91906107dd565b60206040518083038186803b1580156104c257600080fd5b505afa1580156104d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fa9190610707565b905060006105084384610619565b91909111935061035f92505050565b60019250505061035f565b6000610556604051806040016040528060118152602001701c9bd8dad95d11195c1bdcda5d141bdbdb607a1b81525061055b565b905090565b6000731d8f8f00cfa6758d7be78336684788fb0ee0fa466001600160a01b03166321f8a721836040516020016105919190610786565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016105c391906107dd565b60206040518083038186803b1580156105db57600080fd5b505afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061391906106b3565b92915050565b600061065b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610662565b9392505050565b6000818484111561068f5760405162461bcd60e51b815260040161068691906107e6565b60405180910390fd5b505050900390565b6000602082840312156106a8578081fd5b813561065b81610849565b6000602082840312156106c4578081fd5b815161065b81610849565b6000602082840312156106e0578081fd5b8151801515811461065b578182fd5b600060208284031215610700578081fd5b5035919050565b600060208284031215610718578081fd5b5051919050565b9081527f6e6574776f726b2e726574682e6465706f7369742e64656c61790000000000006020820152603a0190565b71757365722e6465706f7369742e626c6f636b60701b815260609190911b6bffffffffffffffffffffffff1916601282015260260190565b60006f636f6e74726163742e6164647265737360801b825282516107b1816010850160208701610819565b9190910160100192915050565b6001600160a01b0391909116815260200190565b901515815260200190565b90815260200190565b6000602082528251806020840152610805816040850160208701610819565b601f01601f19169190910160400192915050565b60005b8381101561083457818101518382015260200161081c565b83811115610843576000848401525b50505050565b6001600160a01b038116811461085e57600080fd5b5056fea2646970667358221220f69903889607ce898ce58a8147c5a2a9b567065621440a9cd5778e04f56d31bd64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,734
0x3cf415D86965A171dd1A3687D4B610Dbc47CF8f0
/** *Submitted for verification at Etherscan.io on 2022-03-27 */ /** PRODUCTION OF MEMES ELON TWEET PLAY MAJOR MARKETING Telegram: https://t.me/ProductionOfMemes */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ProductionOfMemes is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Production Of Memes"; string private constant _symbol = "Production Of Memes"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 1; uint256 private _redisFeeOnSell = 97; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x1ca3C3CD445d64Ea3Fd5495b67E2b8adbF59daB0); address payable private _marketingAddress = payable(0x1ca3C3CD445d64Ea3Fd5495b67E2b8adbF59daB0); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461052e578063dd62ed3e1461054e578063ea1644d514610594578063f2fde38b146105b457600080fd5b8063a2a957bb146104a9578063a9059cbb146104c9578063bfd79284146104e9578063c3c8cd801461051957600080fd5b80638f70ccf7116100d15780638f70ccf7146104535780638f9a55c01461047357806395d89b41146101fe57806398a5c3151461048957600080fd5b80637d1db4a5146103f25780637f2feddc146104085780638da5cb5b1461043557600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038857806370a082311461039d578063715018a6146103bd57806374010ece146103d257600080fd5b8063313ce5671461030c57806349bd5a5e146103285780636b999053146103485780636d8aa8f81461036857600080fd5b80631694505e116101ab5780631694505e1461027957806318160ddd146102b157806323b872dd146102d65780632fd689e3146102f657600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024957600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611938565b6105d4565b005b34801561020a57600080fd5b50604080518082018252601381527250726f64756374696f6e204f66204d656d657360681b6020820152905161024091906119fd565b60405180910390f35b34801561025557600080fd5b50610269610264366004611a52565b610673565b6040519015158152602001610240565b34801561028557600080fd5b50601454610299906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b3480156102bd57600080fd5b50670de0b6b3a76400005b604051908152602001610240565b3480156102e257600080fd5b506102696102f1366004611a7e565b61068a565b34801561030257600080fd5b506102c860185481565b34801561031857600080fd5b5060405160098152602001610240565b34801561033457600080fd5b50601554610299906001600160a01b031681565b34801561035457600080fd5b506101fc610363366004611abf565b6106f3565b34801561037457600080fd5b506101fc610383366004611aec565b61073e565b34801561039457600080fd5b506101fc610786565b3480156103a957600080fd5b506102c86103b8366004611abf565b6107d1565b3480156103c957600080fd5b506101fc6107f3565b3480156103de57600080fd5b506101fc6103ed366004611b07565b610867565b3480156103fe57600080fd5b506102c860165481565b34801561041457600080fd5b506102c8610423366004611abf565b60116020526000908152604090205481565b34801561044157600080fd5b506000546001600160a01b0316610299565b34801561045f57600080fd5b506101fc61046e366004611aec565b610896565b34801561047f57600080fd5b506102c860175481565b34801561049557600080fd5b506101fc6104a4366004611b07565b6108de565b3480156104b557600080fd5b506101fc6104c4366004611b20565b61090d565b3480156104d557600080fd5b506102696104e4366004611a52565b61094b565b3480156104f557600080fd5b50610269610504366004611abf565b60106020526000908152604090205460ff1681565b34801561052557600080fd5b506101fc610958565b34801561053a57600080fd5b506101fc610549366004611b52565b6109ac565b34801561055a57600080fd5b506102c8610569366004611bd6565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105a057600080fd5b506101fc6105af366004611b07565b610a4d565b3480156105c057600080fd5b506101fc6105cf366004611abf565b610a7c565b6000546001600160a01b031633146106075760405162461bcd60e51b81526004016105fe90611c0f565b60405180910390fd5b60005b815181101561066f5760016010600084848151811061062b5761062b611c44565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061066781611c70565b91505061060a565b5050565b6000610680338484610b66565b5060015b92915050565b6000610697848484610c8a565b6106e984336106e485604051806060016040528060288152602001611d8a602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111c6565b610b66565b5060019392505050565b6000546001600160a01b0316331461071d5760405162461bcd60e51b81526004016105fe90611c0f565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107685760405162461bcd60e51b81526004016105fe90611c0f565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107bb57506013546001600160a01b0316336001600160a01b0316145b6107c457600080fd5b476107ce81611200565b50565b6001600160a01b0381166000908152600260205260408120546106849061123a565b6000546001600160a01b0316331461081d5760405162461bcd60e51b81526004016105fe90611c0f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108915760405162461bcd60e51b81526004016105fe90611c0f565b601655565b6000546001600160a01b031633146108c05760405162461bcd60e51b81526004016105fe90611c0f565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109085760405162461bcd60e51b81526004016105fe90611c0f565b601855565b6000546001600160a01b031633146109375760405162461bcd60e51b81526004016105fe90611c0f565b600893909355600a91909155600955600b55565b6000610680338484610c8a565b6012546001600160a01b0316336001600160a01b0316148061098d57506013546001600160a01b0316336001600160a01b0316145b61099657600080fd5b60006109a1306107d1565b90506107ce816112be565b6000546001600160a01b031633146109d65760405162461bcd60e51b81526004016105fe90611c0f565b60005b82811015610a475781600560008686858181106109f8576109f8611c44565b9050602002016020810190610a0d9190611abf565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a3f81611c70565b9150506109d9565b50505050565b6000546001600160a01b03163314610a775760405162461bcd60e51b81526004016105fe90611c0f565b601755565b6000546001600160a01b03163314610aa65760405162461bcd60e51b81526004016105fe90611c0f565b6001600160a01b038116610b0b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105fe565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bc85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105fe565b6001600160a01b038216610c295760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105fe565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105fe565b6001600160a01b038216610d505760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105fe565b60008111610db25760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105fe565b6000546001600160a01b03848116911614801590610dde57506000546001600160a01b03838116911614155b156110bf57601554600160a01b900460ff16610e77576000546001600160a01b03848116911614610e775760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105fe565b601654811115610ec95760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105fe565b6001600160a01b03831660009081526010602052604090205460ff16158015610f0b57506001600160a01b03821660009081526010602052604090205460ff16155b610f635760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105fe565b6015546001600160a01b03838116911614610fe85760175481610f85846107d1565b610f8f9190611c8b565b10610fe85760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105fe565b6000610ff3306107d1565b60185460165491925082101590821061100c5760165491505b8080156110235750601554600160a81b900460ff16155b801561103d57506015546001600160a01b03868116911614155b80156110525750601554600160b01b900460ff165b801561107757506001600160a01b03851660009081526005602052604090205460ff16155b801561109c57506001600160a01b03841660009081526005602052604090205460ff16155b156110bc576110aa826112be565b4780156110ba576110ba47611200565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061110157506001600160a01b03831660009081526005602052604090205460ff165b8061113357506015546001600160a01b0385811691161480159061113357506015546001600160a01b03848116911614155b15611140575060006111ba565b6015546001600160a01b03858116911614801561116b57506014546001600160a01b03848116911614155b1561117d57600854600c55600954600d555b6015546001600160a01b0384811691161480156111a857506014546001600160a01b03858116911614155b156111ba57600a54600c55600b54600d555b610a4784848484611447565b600081848411156111ea5760405162461bcd60e51b81526004016105fe91906119fd565b5060006111f78486611ca3565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561066f573d6000803e3d6000fd5b60006006548211156112a15760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105fe565b60006112ab611475565b90506112b78382611498565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061130657611306611c44565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561135a57600080fd5b505afa15801561136e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113929190611cba565b816001815181106113a5576113a5611c44565b6001600160a01b0392831660209182029290920101526014546113cb9130911684610b66565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611404908590600090869030904290600401611cd7565b600060405180830381600087803b15801561141e57600080fd5b505af1158015611432573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611454576114546114da565b61145f848484611508565b80610a4757610a47600e54600c55600f54600d55565b60008060006114826115ff565b90925090506114918282611498565b9250505090565b60006112b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061163f565b600c541580156114ea5750600d54155b156114f157565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061151a8761166d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061154c90876116ca565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461157b908661170c565b6001600160a01b03891660009081526002602052604090205561159d8161176b565b6115a784836117b5565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115ec91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061161a8282611498565b82101561163657505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116605760405162461bcd60e51b81526004016105fe91906119fd565b5060006111f78486611d48565b600080600080600080600080600061168a8a600c54600d546117d9565b925092509250600061169a611475565b905060008060006116ad8e87878761182e565b919e509c509a509598509396509194505050505091939550919395565b60006112b783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111c6565b6000806117198385611c8b565b9050838110156112b75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105fe565b6000611775611475565b90506000611783838361187e565b306000908152600260205260409020549091506117a0908261170c565b30600090815260026020526040902055505050565b6006546117c290836116ca565b6006556007546117d2908261170c565b6007555050565b60008080806117f360646117ed898961187e565b90611498565b9050600061180660646117ed8a8961187e565b9050600061181e826118188b866116ca565b906116ca565b9992985090965090945050505050565b600080808061183d888661187e565b9050600061184b888761187e565b90506000611859888861187e565b9050600061186b8261181886866116ca565b939b939a50919850919650505050505050565b60008261188d57506000610684565b60006118998385611d6a565b9050826118a68583611d48565b146112b75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105fe565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107ce57600080fd5b803561193381611913565b919050565b6000602080838503121561194b57600080fd5b823567ffffffffffffffff8082111561196357600080fd5b818501915085601f83011261197757600080fd5b813581811115611989576119896118fd565b8060051b604051601f19603f830116810181811085821117156119ae576119ae6118fd565b6040529182528482019250838101850191888311156119cc57600080fd5b938501935b828510156119f1576119e285611928565b845293850193928501926119d1565b98975050505050505050565b600060208083528351808285015260005b81811015611a2a57858101830151858201604001528201611a0e565b81811115611a3c576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a6557600080fd5b8235611a7081611913565b946020939093013593505050565b600080600060608486031215611a9357600080fd5b8335611a9e81611913565b92506020840135611aae81611913565b929592945050506040919091013590565b600060208284031215611ad157600080fd5b81356112b781611913565b8035801515811461193357600080fd5b600060208284031215611afe57600080fd5b6112b782611adc565b600060208284031215611b1957600080fd5b5035919050565b60008060008060808587031215611b3657600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b6757600080fd5b833567ffffffffffffffff80821115611b7f57600080fd5b818601915086601f830112611b9357600080fd5b813581811115611ba257600080fd5b8760208260051b8501011115611bb757600080fd5b602092830195509350611bcd9186019050611adc565b90509250925092565b60008060408385031215611be957600080fd5b8235611bf481611913565b91506020830135611c0481611913565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c8457611c84611c5a565b5060010190565b60008219821115611c9e57611c9e611c5a565b500190565b600082821015611cb557611cb5611c5a565b500390565b600060208284031215611ccc57600080fd5b81516112b781611913565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d275784516001600160a01b031683529383019391830191600101611d02565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d6557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d8457611d84611c5a565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ffd0086b4b0ec3bbfd9972b0e1150edf8d519c5c88122528f1e800246a46c67364736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,735
0x99338b28c7ee062bf7f31f4691c97fb7c275770c
pragma solidity 0.5.11; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address payable public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address payable newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(allowed[_from][msg.sender] >= _value); require(balances[_from] >= _value); require(balances[_to].add(_value) > balances[_to]); // Check for overflows balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is StandardToken { event Pause(); event Unpause(); bool public paused = false; address public founder; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused || msg.sender == founder); _; } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } contract PausableToken is Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } //The functions below surve no real purpose. Even if one were to approve another to spend //tokens on their behalf, those tokens will still only be transferable when the token contract //is not paused. function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseApproval(_spender, _subtractedValue); } } contract ForsageToken is PausableToken { string public name; string public symbol; uint8 public decimals; /** * @dev Constructor that gives the founder all of the existing tokens. */ constructor() public { name = "Forsage Coin"; symbol = "FFI"; decimals = 18; totalSupply = 100000000*10**18; founder = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4; balances[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function destroy() public onlyOwner{ selfdestruct(owner); } } /** * This contract is created to enable purchase and selling of tokens for fixed price **/ contract ForsageSale is Ownable { using SafeMath for uint256; address token; /** * Price of 1 token compared to wei. E.x. value of "1000" means that 1 token is traded for 1000 wei. **/ uint price; event TokensBought(address _buyer, uint256 _amount); event TokensSold(address _seller, uint256 _amount); constructor(address _token, uint256 _price) public { setToken(_token); setPrice(_price); } /** * @dev Receive payment in ether and return tokens. */ function buyTokens() payable public { require(msg.value>=getPrice(),'Tx value cannot be lower than price of 1 token'); uint256 amount = msg.value.div(getPrice()); ERC20 erc20 = ERC20(token); require(erc20.balanceOf(address(this))>=amount,"Sorry, token vendor does not possess enough tokens for this purchase"); erc20.transfer(msg.sender,amount); emit TokensBought(msg.sender,amount); } /** * @dev Receive payment in tokens and return ether. * Only usable by accounts which allowed the smart contract to transfer tokens from their account. */ function sellTokens(uint256 _amount) public { require(_amount>0,'You cannot sell 0 tokens'); uint256 ethToSend = _amount.mul(getPrice()); require(address(this).balance>=ethToSend,'Sorry, vendor does not possess enough Ether to trade for your tokens'); ERC20 erc20 = ERC20(token); require(erc20.balanceOf(msg.sender)>=_amount,"You cannot sell more tokens than you own on your balance"); require(erc20.allowance(msg.sender,address(this))>=_amount,"You need to allow this contract to transfer enough tokens from your account"); erc20.transferFrom(msg.sender,address(this),_amount); msg.sender.transfer(ethToSend); emit TokensSold(msg.sender,_amount); } /** * Sets the price for tokens, both for purchase and sale * */ function setPrice(uint256 _price) public onlyOwner { require(_price>0); price = _price; } function getPrice() public view returns(uint256){ return price; } /** * @dev Set ERC20 token which will be used to trade through this contract. Usable only by this contract's owner. * @param _token The address of the ERC20 token contract. */ function setToken(address _token) public onlyOwner { token = _token; } /** * @dev Get the address of ERC20 token which is used to trade through this contract. */ function getToken() public view returns(address){ return token; } /** * Simple function for contract's owner to be able to refill contract's ether balance * */ function refillEtherBalance() public payable onlyOwner{ } function getSaleEtherBalance() public view onlyOwner returns(uint256){ return address(this).balance; } /** * Allows owner to withdraw all ether from contract's balance * */ function withdrawEther() public onlyOwner{ owner.transfer(address(this).balance); } function getSaleTokenBalance() public view onlyOwner returns(uint256){ ERC20 erc20 = ERC20(token); return erc20.balanceOf(address(this)); } /** * Allows owner to withdraw all tokens from contract's balance * */ function withdrawTokens() public onlyOwner{ ERC20 erc20 = ERC20(token); uint256 amount = erc20.balanceOf(address(this)); erc20.transfer(owner,amount); } function destroy() public onlyOwner{ selfdestruct(owner); } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c806370a08231116100a257806395d89b411161007157806395d89b411461045e578063a9059cbb146104e1578063d73dd62314610547578063dd62ed3e146105ad578063f2fde38b1461062557610116565b806370a08231146103a857806383197ef0146104005780638456cb591461040a5780638da5cb5b1461041457610116565b8063313ce567116100e9578063313ce567146102a85780633f4ba83a146102cc5780634d853ee5146102d65780635c975abb14610320578063661884631461034257610116565b806306fdde031461011b578063095ea7b31461019e57806318160ddd1461020457806323b872dd14610222575b600080fd5b610123610669565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610163578082015181840152602081019050610148565b50505050905090810190601f1680156101905780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ea600480360360408110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610707565b604051808215151515815260200191505060405180910390f35b61020c61078d565b6040518082815260200191505060405180910390f35b61028e6004803603606081101561023857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610793565b604051808215151515815260200191505060405180910390f35b6102b061081b565b604051808260ff1660ff16815260200191505060405180910390f35b6102d461082e565b005b6102de6108ea565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610328610910565b604051808215151515815260200191505060405180910390f35b61038e6004803603604081101561035857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610923565b604051808215151515815260200191505060405180910390f35b6103ea600480360360208110156103be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109a9565b6040518082815260200191505060405180910390f35b6104086109f2565b005b610412610a87565b005b61041c610b9c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610466610bc2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104a657808201518184015260208101905061048b565b50505050905090810190601f1680156104d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61052d600480360360408110156104f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c60565b604051808215151515815260200191505060405180910390f35b6105936004803603604081101561055d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ce6565b604051808215151515815260200191505060405180910390f35b61060f600480360360408110156105c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d6c565b6040518082815260200191505060405180910390f35b6106676004803603602081101561063b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610df3565b005b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106ff5780601f106106d4576101008083540402835291602001916106ff565b820191906000526020600020905b8154815290600101906020018083116106e257829003601f168201915b505050505081565b6000600460009054906101000a900460ff1615806107725750600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61077b57600080fd5b6107858383610f47565b905092915050565b60005481565b6000600460009054906101000a900460ff1615806107fe5750600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61080757600080fd5b6108128484846110cc565b90509392505050565b600760009054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461088857600080fd5b600460009054906101000a900460ff166108a157600080fd5b6000600460006101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900460ff1681565b6000600460009054906101000a900460ff16158061098e5750600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61099757600080fd5b6109a18383611521565b905092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a4c57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ae157600080fd5b600460009054906101000a900460ff161580610b4a5750600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610b5357600080fd5b6001600460006101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c585780601f10610c2d57610100808354040283529160200191610c58565b820191906000526020600020905b815481529060010190602001808311610c3b57829003601f168201915b505050505081565b6000600460009054906101000a900460ff161580610ccb5750600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610cd457600080fd5b610cde83836117b2565b905092915050565b6000600460009054906101000a900460ff161580610d515750600460019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610d5a57600080fd5b610d6483836119d2565b905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e4d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610e8757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080821480610fd357506000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b610fdc57600080fd5b81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561110757600080fd5b81600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561119057600080fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156111dc57600080fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461126e83600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bce90919063ffffffff16565b1161127857600080fd5b6112ca82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bea90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061135f82600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bce90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061143182600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bea90919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115611632576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116c6565b6116458382611bea90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156117ed57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561183957600080fd5b61188b82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bea90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061192082600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bce90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000611a6382600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bce90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600080828401905083811015611be057fe5b8091505092915050565b600082821115611bf657fe5b81830390509291505056fea265627a7a723158201787af6d20df97b40dc87bac890bb196c99242fdc4edf2fa00794b869e5f558d64736f6c634300050b0032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
9,736
0x911Af2c5E703B233E7F09ede92e8B8A0857A0202
/** *Submitted for verification at Etherscan.io on 2020-09-16 */ /** *Submitted for verification at Etherscan.io on 2020-09-14 */ pragma solidity ^0.5.16; // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol // Subject to the MIT license. /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, errorMessage); return c; } /** * @dev Returns the integer division of two unsigned integers. * Reverts on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. * Reverts with custom message on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Timelock { using SafeMath for uint256; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint256 indexed newDelay); event CancelTransaction( bytes32 indexed txHash, address indexed target, address lev, uint256 amount, uint256 eta ); event ExecuteTransaction( bytes32 indexed txHash, address indexed target, address lev, uint256 amount, uint256 eta ); event QueueTransaction( bytes32 indexed txHash, address indexed target, address lev, uint256 amount, uint256 eta ); uint256 public constant GRACE_PERIOD = 14 days; uint256 public constant MINIMUM_DELAY = 2 days; uint256 public constant MAXIMUM_DELAY = 30 days; address public admin; uint256 public delay; mapping(bytes32 => bool) public queuedTransactions; constructor(address admin_, uint256 delay_) public { require( admin_ != address(0), "Timelock::constructor: Cannot set the admin to the zero address" ); require( delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay." ); require( delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay." ); admin = admin_; delay = delay_; } function setDelay(uint256 delay_) external { require( msg.sender == admin, "Timelock::setDelay: Call must come from admin." ); require( delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay." ); require( delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay." ); delay = delay_; emit NewDelay(delay); } function acceptAdmin(address pendingAdmin_, uint256 eta) external { require( msg.sender == admin, "Timelock::queueTransaction: Call must come from admin." ); require( getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock." ); bytes32 txHash = keccak256(abi.encode(pendingAdmin_, eta)); require( queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued." ); queuedTransactions[txHash] = false; admin = pendingAdmin_; emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_, uint256 eta) external { require( msg.sender == admin, "Timelock::queueTransaction: Call must come from admin." ); require( pendingAdmin_ != address(0), "Timelock::queueTransaction: Cannot change the admin to the zero address" ); require( eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay." ); bytes32 txHash = keccak256(abi.encode(pendingAdmin_, eta)); queuedTransactions[txHash] = true; emit NewPendingAdmin(pendingAdmin_); } function queueTransaction( address target, address lev, uint256 amount, uint256 eta ) external returns (bytes32) { require( msg.sender == admin, "Timelock::queueTransaction: Call must come from admin." ); require( eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay." ); bytes32 txHash = keccak256(abi.encode(target, lev, amount, eta)); queuedTransactions[txHash] = true; emit QueueTransaction(txHash, target, lev, amount, eta); return txHash; } function cancelTransaction( address target, address lev, uint256 amount, uint256 eta ) external { require( msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin." ); bytes32 txHash = keccak256(abi.encode(target, lev, amount, eta)); queuedTransactions[txHash] = false; emit CancelTransaction(txHash, target, lev, amount, eta); } function executeTransaction( address target, address lev, uint256 amount, uint256 eta ) external { require( msg.sender == admin, "Timelock::executeTransaction: Call must come from admin." ); bytes32 txHash = keccak256(abi.encode(target, lev, amount, eta)); require( queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued." ); require( getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock." ); require( getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale." ); queuedTransactions[txHash] = false; bool success = ILev(lev).transfer(target, amount); require( success, "Timelock::executeTransaction: Transaction execution reverted." ); emit ExecuteTransaction(txHash, target, lev, amount, eta); } function getBlockTimestamp() internal view returns (uint256) { // solium-disable-next-line security/no-block-members return block.timestamp; } } interface ILev { function transfer(address dst, uint256 rawAmount) external returns (bool); }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b72dc35f11610071578063b72dc35f14610189578063c1a287e2146101b5578063e177246e146101bd578063ed1046c9146101da578063f2b0653714610216578063f851a44014610247576100b4565b80631b936924146100b957806369de5d38146100e75780636a42b8f8146101355780637d645fab1461013d5780639e94935914610145578063b1b43ae514610181575b600080fd5b6100e5600480360360408110156100cf57600080fd5b506001600160a01b03813516906020013561026b565b005b610123600480360360808110156100fd57600080fd5b506001600160a01b038135811691602081013590911690604081013590606001356103ca565b60408051918252519081900360200190f35b61012361050c565b610123610512565b6100e56004803603608081101561015b57600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135610519565b610123610609565b6100e56004803603604081101561019f57600080fd5b506001600160a01b038135169060200135610610565b610123610783565b6100e5600480360360208110156101d357600080fd5b503561078a565b6100e5600480360360808110156101f057600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561088a565b6102336004803603602081101561022c57600080fd5b5035610b2b565b604080519115158252519081900360200190f35b61024f610b40565b604080516001600160a01b039092168252519081900360200190f35b6000546001600160a01b031633146102b45760405162461bcd60e51b8152600401808060200182810382526036815260200180610dba6036913960400191505060405180910390fd5b6001600160a01b0382166102f95760405162461bcd60e51b8152600401808060200182810382526047815260200180610bb56047913960600191505060405180910390fd5b610313600154610307610b4f565b9063ffffffff610b5316565b8110156103515760405162461bcd60e51b8152600401808060200182810382526049815260200180610e2d6049913960600191505060405180910390fd5b604080516001600160a01b0384166020808301829052828401859052835180840385018152606090930180855283519382019390932060008181526002909252938120805460ff1916600117905590917f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a7569190a2505050565b600080546001600160a01b031633146104145760405162461bcd60e51b8152600401808060200182810382526036815260200180610dba6036913960400191505060405180910390fd5b610422600154610307610b4f565b8210156104605760405162461bcd60e51b8152600401808060200182810382526049815260200180610e2d6049913960600191505060405180910390fd5b604080516001600160a01b0380881660208084018290529188168385018190526060840188905260808085018890528551808603909101815260a085018087528151918501919091206000818152600290955293869020805460ff191660011790555260c0830187905260e08301869052925190929183917feeb3d19b7bbeaed87a8da50639d75b32dd1043ee12378af2b989eac1d19fceec918190036101000190a395945050505050565b60015481565b62278d0081565b6000546001600160a01b031633146105625760405162461bcd60e51b8152600401808060200182810382526037815260200180610c346037913960400191505060405180910390fd5b604080516001600160a01b0380871660208084018290529187168385018190526060840187905260808085018790528551808603909101815260a085018087528151918501919091206000818152600290955293869020805460ff191690555260c0830186905260e08301859052925190929183917faf511beb56df19b7070a6fe49b519df031f261c6994b72b18fb224b38ae9bb4a918190036101000190a35050505050565b6202a30081565b6000546001600160a01b031633146106595760405162461bcd60e51b8152600401808060200182810382526036815260200180610dba6036913960400191505060405180910390fd5b80610662610b4f565b101561069f5760405162461bcd60e51b8152600401808060200182810382526045815260200180610c9e6045913960600191505060405180910390fd5b604080516001600160a01b03841660208083019190915281830184905282518083038401815260609092018352815191810191909120600081815260029092529190205460ff166107215760405162461bcd60e51b815260040180806020018281038252603d815260200180610d4f603d913960400191505060405180910390fd5b600081815260026020526040808220805460ff1916905581546001600160a01b0319166001600160a01b038681169190911780845591519116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2505050565b6212750081565b6000546001600160a01b031633146107d35760405162461bcd60e51b815260040180806020018281038252602e815260200180610d8c602e913960400191505060405180910390fd5b6202a3008110156108155760405162461bcd60e51b8152600401808060200182810382526034815260200180610ce36034913960400191505060405180910390fd5b62278d008111156108575760405162461bcd60e51b8152600401808060200182810382526038815260200180610d176038913960400191505060405180910390fd5b600181905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b6000546001600160a01b031633146108d35760405162461bcd60e51b8152600401808060200182810382526038815260200180610bfc6038913960400191505060405180910390fd5b604080516001600160a01b03808716602080840191909152908616828401526060820185905260808083018590528351808403909101815260a09092018352815191810191909120600081815260029092529190205460ff166109675760405162461bcd60e51b815260040180806020018281038252603d815260200180610d4f603d913960400191505060405180910390fd5b81610970610b4f565b10156109ad5760405162461bcd60e51b8152600401808060200182810382526045815260200180610c9e6045913960600191505060405180910390fd5b6109c0826212750063ffffffff610b5316565b6109c8610b4f565b1115610a055760405162461bcd60e51b8152600401808060200182810382526033815260200180610c6b6033913960400191505060405180910390fd5b6000818152600260209081526040808320805460ff19169055805163a9059cbb60e01b81526001600160a01b0389811660048301526024820188905291519188169263a9059cbb9260448084019382900301818787803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b505050506040513d6020811015610a9257600080fd5b5051905080610ad25760405162461bcd60e51b815260040180806020018281038252603d815260200180610df0603d913960400191505060405180910390fd5b604080516001600160a01b0387811682526020820187905281830186905291519188169184917f6d3e6e3afc856e26bef974088bd4335caab97bc9d36bcf9a20be8e25bc9fd105919081900360600190a3505050505050565b60026020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b600082820183811015610bad576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616e6e6f74206368616e6765207468652061646d696e20746f20746865207a65726f206164647265737354696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792ea265627a7a723158201f8fbdf8084aa3c7dd08c19d331a9ac0c2520824eceae3954b34e9a79af85f2064736f6c63430005110032
{"success": true, "error": null, "results": {}}
9,737
0xc3e4cc9187c43cc217462c8162a9a3e2992f2859
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract MultiTokenBasics { function totalSupply(uint256 _tokenId) public view returns (uint256); function balanceOf(uint256 _tokenId, address _owner) public view returns (uint256); function allowance(uint256 _tokenId, address _owner, address _spender) public view returns (uint256); function transfer(uint256 _tokenId, address _to, uint256 _value) public returns (bool); function transferFrom(uint256 _tokenId, address _from, address _to, uint256 _value) public returns (bool); function approve(uint256 _tokenId, address _spender, uint256 _value) public returns (bool); event Transfer(uint256 indexed tokenId, address indexed from, address indexed to, uint256 value); event Approval(uint256 indexed tokenId, address indexed owner, address indexed spender, uint256 value); } contract MultiToken is Ownable, MultiTokenBasics { using SafeMath for uint256; mapping(uint256 => mapping(address => mapping(address => uint256))) private allowed; mapping(uint256 => mapping(address => uint256)) private balance; mapping(uint256 => uint256) private totalSupply_; uint8 public decimals = 18; uint256 public mask = 0xffffffff; /** * @dev Throws if _tokenId not exists * @param _tokenId uint256 is subtoken identifier */ modifier existingToken(uint256 _tokenId) { require(totalSupply_[_tokenId] > 0 && (_tokenId & mask == _tokenId)); _; } /** * @dev Throws if _tokenId exists * @param _tokenId uint256 is subtoken identifier */ modifier notExistingToken(uint256 _tokenId) { require(totalSupply_[_tokenId] == 0 && (_tokenId & mask == _tokenId)); _; } /** * @dev create new subtoken with unique tokenId * @param _tokenId uint256 is subtoken identifier * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return uint256 representing the total amount of tokens */ function createNewSubtoken(uint256 _tokenId, address _to, uint256 _value) notExistingToken(_tokenId) onlyOwner() public returns (bool) { require(_value > 0); balance[_tokenId][_to] = _value; totalSupply_[_tokenId] = _value; Transfer(_tokenId, address(0), _to, _value); return true; } /** * @dev Gets the total amount of tokens stored by the contract * @param _tokenId uint256 is subtoken identifier * @return uint256 representing the total amount of tokens */ function totalSupply(uint256 _tokenId) existingToken(_tokenId) public view returns (uint256) { return totalSupply_[_tokenId]; } /** * @dev Gets the balance of the specified address * @param _tokenId uint256 is subtoken identifier * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(uint256 _tokenId, address _owner) existingToken(_tokenId) public view returns (uint256) { return balance[_tokenId][_owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _tokenId uint256 is subtoken identifier * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(uint256 _tokenId, address _owner, address _spender) existingToken(_tokenId) public view returns (uint256) { return allowed[_tokenId][_owner][_spender]; } /** * @dev transfer token for a specified address * @param _tokenId uint256 is subtoken identifier * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(uint256 _tokenId, address _to, uint256 _value) existingToken(_tokenId) public returns (bool) { require(_to != address(0)); var _sender = msg.sender; var balances = balance[_tokenId]; require(_to != address(0)); require(_value <= balances[_sender]); // SafeMath.sub will throw if there is not enough balance. balances[_sender] = balances[_sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(_tokenId, _sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * @param _tokenId uint256 is subtoken identifier * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(uint256 _tokenId, address _from, address _to, uint256 _value) existingToken(_tokenId) public returns (bool) { address _sender = msg.sender; var balances = balance[_tokenId]; var tokenAllowed = allowed[_tokenId]; require(_to != address(0)); require(_value <= balances[_from]); require(_value <= tokenAllowed[_from][_sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); tokenAllowed[_from][_sender] = tokenAllowed[_from][_sender].sub(_value); Transfer(_tokenId, _from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _tokenId uint256 is subtoken identifier * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(uint256 _tokenId, address _spender, uint256 _value) public returns (bool) { var _sender = msg.sender; allowed[_tokenId][_sender][_spender] = _value; Approval(_tokenId, _sender, _spender, _value); return true; } }
0x6060604052600436106100ae5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663090e871f81146100b35780630d550b75146100ec578063116134ee146101265780631c0f12b614610139578063313ce567146101645780633656eec21461018d5780638cb0a511146101af5780638da5cb5b146101d4578063bd85b03914610203578063f2fde38b14610219578063f8548e361461023a575b600080fd5b34156100be57600080fd5b6100d8600435600160a060020a036024351660443561025f565b604051901515815260200160405180910390f35b34156100f757600080fd5b610114600435600160a060020a036024358116906044351661032b565b60405190815260200160405180910390f35b341561013157600080fd5b61011461038b565b341561014457600080fd5b6100d8600435600160a060020a0360243581169060443516606435610391565b341561016f57600080fd5b610177610568565b60405160ff909116815260200160405180910390f35b341561019857600080fd5b610114600435600160a060020a0360243516610571565b34156101ba57600080fd5b6100d8600435600160a060020a03602435166044356105c9565b34156101df57600080fd5b6101e761063f565b604051600160a060020a03909116815260200160405180910390f35b341561020e57600080fd5b61011460043561064e565b341561022457600080fd5b610238600160a060020a0360043516610690565b005b341561024557600080fd5b6100d8600435600160a060020a036024351660443561072b565b60008381526003602052604081205484901580156102805750806005548216145b151561028b57600080fd5b60005433600160a060020a039081169116146102a657600080fd5b600083116102b357600080fd5b6000858152600260209081526040808320600160a060020a038816808552908352818420879055888452600390925280832086905590919087907ff2dbd98d79f00f7aff338b824931d607bfcc63d47307162470f25a055102d3b09087905190815260200160405180910390a4506001949350505050565b6000838152600360205260408120548490829011801561034e5750806005548216145b151561035957600080fd5b50506000928352600160209081526040808520600160a060020a03948516865282528085209290931684525290205490565b60055481565b60008060008087600060036000838152602001908152602001600020541180156103be5750806005548216145b15156103c957600080fd5b600089815260026020908152604080832060019092529091203395509093509150600160a060020a03871615156103ff57600080fd5b600160a060020a03881660009081526020849052604090205486111561042457600080fd5b600160a060020a038089166000908152602084815260408083209388168352929052205486111561045457600080fd5b600160a060020a03881660009081526020849052604090205461047d908763ffffffff61089a16565b600160a060020a03808a1660009081526020869052604080822093909355908916815220546104b2908763ffffffff6108ac16565b600160a060020a03808916600090815260208681526040808320949094558b8316825285815283822092881682529190915220546104f6908763ffffffff61089a16565b600160a060020a03808a166000818152602086815260408083208a861684529091529081902093909355908916918b907ff2dbd98d79f00f7aff338b824931d607bfcc63d47307162470f25a055102d3b0908a905190815260200160405180910390a450600198975050505050505050565b60045460ff1681565b600082815260036020526040812054839082901180156105945750806005548216145b151561059f57600080fd5b50506000918252600260209081526040808420600160a060020a0393909316845291905290205490565b600083815260016020908152604080832033600160a060020a038181168087529285528386209088168087529452828520869055929187907f69e4aaf23f9318cf40839ac20453d8fbedaac2955eb08a27ae5189cc719257169087905190815260200160405180910390a4506001949350505050565b600054600160a060020a031681565b600081815260036020526040812054829082901180156106715750806005548216145b151561067c57600080fd5b505060009081526003602052604090205490565b60005433600160a060020a039081169116146106ab57600080fd5b600160a060020a03811615156106c057600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008381526003602052604081205481908190869082901180156107525750806005548216145b151561075d57600080fd5b600160a060020a038616151561077257600080fd5b60008781526002602052604090203393509150600160a060020a038616151561079a57600080fd5b600160a060020a0383166000908152602083905260409020548511156107bf57600080fd5b600160a060020a0383166000908152602083905260409020546107e8908663ffffffff61089a16565b600160a060020a03808516600090815260208590526040808220939093559088168152205461081d908663ffffffff6108ac16565b82600088600160a060020a0316600160a060020a031681526020019081526020016000208190555085600160a060020a031683600160a060020a0316887ff2dbd98d79f00f7aff338b824931d607bfcc63d47307162470f25a055102d3b08860405190815260200160405180910390a45060019695505050505050565b6000828211156108a657fe5b50900390565b6000828201838110156108bb57fe5b93925050505600a165627a7a72305820862b9992ff134e428dc3b36be63d1a70f6eea384aabc79f4adabdd836648ee710029
{"success": true, "error": null, "results": {}}
9,738
0xa07e4134c7cecb4e0179cea2d2e09c9e32dce546
pragma solidity ^0.4.20; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function Ownable() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract BGXTokenInterface{ function distribute( address _to, uint256 _amount ) public returns( bool ); function finally( address _teamAddress ) public returns( bool ); } contract BGXCrowdsale is Ownable{ using SafeMath for uint256; BGXTokenInterface bgxTokenInterface; address public bgxWallet; address[] public adviser; address[] public bounty; address[] public team; mapping( address => uint256 ) adviserAmount; mapping( address => uint256 ) bountyAmount; mapping( address => uint256 ) teamAmount; uint256 public presaleDateStart = 1524571200; uint256 public presaleDateFinish = 1526385600; uint256 public saleDateStart = 1526990400; uint256 public saleDateFinish = 1528200000; uint256 constant public hardcap = 500000000 ether; uint256 public presaleHardcap = 30000000 ether; uint256 public softcap = 40000000 ether; uint256 public totalBGX = 0; uint256 constant public minimal = 1000 ether; uint256 reserved = 250000000 ether; uint256 constant teamLimit = 100000000 ether; uint256 constant advisersLimit = 100000000 ether; uint256 constant bountyLimit = 50000000 ether; uint256 public distributionDate = 0; bool paused = false; enum CrowdsaleStates { Pause, Presale, Sale, OverHardcap, Finish } CrowdsaleStates public state = CrowdsaleStates.Pause; uint256 public sendNowLastCount = 0; uint256 public finishLastCount = 0; uint256 public finishCurrentLimit = 0; modifier activeState { require( getState() == CrowdsaleStates.Presale || getState() == CrowdsaleStates.Sale ); _; } modifier onPause { require( getState() == CrowdsaleStates.Pause ); _; } modifier overSoftcap { require( totalBGX >= softcap ); _; } modifier finishOrHardcap { require( getState() == CrowdsaleStates.OverHardcap || getState() == CrowdsaleStates.Finish ); _; } // fix for short address attack modifier onlyPayloadSize(uint size) { require(msg.data.length == size + 4); _; } address[] public investors; mapping( address => uint256 ) public investorBalance; mapping( address => bool ) public inBlackList; function setBgxWalletAddress( address _a ) public onlyOwner returns( bool ) { require( address(0) != _a ); bgxWallet = _a; return true; } function setCrowdsaleDate( uint256 _presaleStart, uint256 _presaleFinish, uint256 _saleStart, uint256 _saleFinish ) public onlyOwner onPause returns( bool ) { presaleDateStart = _presaleStart; presaleDateFinish = _presaleFinish; saleDateStart = _saleStart; saleDateFinish = _saleFinish; return true; } function setCaps( uint256 _presaleHardcap, uint256 _softcap ) public onlyOwner onPause returns( bool ) { presaleHardcap = _presaleHardcap; softcap = _softcap; return true; } function getState() public returns( CrowdsaleStates ) { if( state == CrowdsaleStates.Pause || paused ) return CrowdsaleStates.Pause; if( state == CrowdsaleStates.Finish ) return CrowdsaleStates.Finish; if( totalBGX >= hardcap ) return CrowdsaleStates.OverHardcap; if( now >= presaleDateStart && now <= presaleDateFinish ){ if( totalBGX >= presaleHardcap ) return CrowdsaleStates.Pause; return CrowdsaleStates.Presale; } if( now >= saleDateStart && now <= saleDateFinish ){ if( totalBGX >= hardcap ) { _startCounter(); return CrowdsaleStates.OverHardcap; } return CrowdsaleStates.Sale; } if( now > saleDateFinish ) { _startCounter(); return CrowdsaleStates.Finish; } return CrowdsaleStates.Pause; } function _startCounter() internal { if (distributionDate <= 0) { distributionDate = now + 2 days; } } function pauseStateSwithcer() public onlyOwner returns( bool ) { paused = !paused; } function start() public onlyOwner returns( bool ) { state = CrowdsaleStates.Presale; return true; } function send(address _addr, uint _amount) public onlyOwner activeState onlyPayloadSize(2 * 32) returns( bool ) { require( address(0) != _addr && _amount >= minimal && !inBlackList[_addr] ); if( getState() == CrowdsaleStates.Presale ) require( totalBGX.add( _amount ) <= presaleHardcap ); if( getState() == CrowdsaleStates.Sale ) require( totalBGX.add( _amount ) <= hardcap ); investors.push( _addr ); investorBalance[_addr] = investorBalance[_addr].add( _amount ); if ( !inBlackList[_addr]) { totalBGX = totalBGX.add( _amount ); } return true; } function investorsCount() public constant returns( uint256 ) { return investors.length; } function sendNow( uint256 _count ) public onlyOwner overSoftcap returns( bool ) { require( sendNowLastCount.add( _count ) <= investors.length ); uint256 to = sendNowLastCount.add( _count ); for( uint256 i = sendNowLastCount; i <= to - 1; i++ ) if( !inBlackList[investors[i]] ){ investorBalance[investors[i]] = 0; bgxTokenInterface.distribute( investors[i], investorBalance[investors[i]] ); } sendNowLastCount = sendNowLastCount.add( _count ); } function blackListSwithcer( address _addr ) public onlyOwner returns( bool ) { require( address(0) != _addr ); if( !inBlackList[_addr] ){ totalBGX = totalBGX.sub( investorBalance[_addr] ); } else { totalBGX = totalBGX.add( investorBalance[_addr] ); } inBlackList[_addr] = !inBlackList[_addr]; } function finish( uint256 _count) public onlyOwner finishOrHardcap overSoftcap returns( bool ) { require(_count > 0); require(distributionDate > 0 && distributionDate <= now); if (finishCurrentLimit == 0) { finishCurrentLimit = bountyLimit.add(teamLimit.add(advisersLimit)); } // advisers + bounters total cnt uint256 totalCnt = adviser.length.add(bounty.length); if (finishLastCount < adviser.length) { for( uint256 i = finishLastCount; i <= adviser.length - 1; i++ ){ finishCurrentLimit = finishCurrentLimit.sub( adviserAmount[adviser[i]] ); bgxTokenInterface.distribute( adviser[i],adviserAmount[adviser[i]] ); finishLastCount++; _count--; if (_count <= 0) { return true; } } } if (finishLastCount < totalCnt) { for( i = finishLastCount.sub(adviser.length); i <= bounty.length - 1; i++ ){ finishCurrentLimit = finishCurrentLimit.sub( bountyAmount[bounty[i]] ); bgxTokenInterface.distribute( bounty[i],bountyAmount[bounty[i]] ); finishLastCount ++; _count--; if (_count <= 0) { return true; } } } if (finishLastCount >= totalCnt && finishLastCount < totalCnt.add(team.length)) { for( i = finishLastCount.sub(totalCnt); i <= team.length - 1; i++ ){ finishCurrentLimit = finishCurrentLimit.sub( teamAmount[team[i]] ); bgxTokenInterface.distribute( team[i],teamAmount[team[i]] ); finishLastCount ++; _count--; if (_count <= 0) { return true; } } } reserved = reserved.add( finishCurrentLimit ); return true; } function sendToTeam() public onlyOwner finishOrHardcap overSoftcap returns( bool ) { bgxTokenInterface.distribute( bgxWallet, reserved ); bgxTokenInterface.finally( bgxWallet ); return true; } function setAdvisers( address[] _addrs, uint256[] _amounts ) public onlyOwner finishOrHardcap returns( bool ) { require( _addrs.length == _amounts.length ); adviser = _addrs; uint256 limit = 0; for( uint256 i = 0; i <= adviser.length - 1; i++ ){ require( limit.add( _amounts[i] ) <= advisersLimit ); adviserAmount[adviser[i]] = _amounts[i]; limit.add( _amounts[i] ); } } function setBounty( address[] _addrs, uint256[] _amounts ) public onlyOwner finishOrHardcap returns( bool ) { require( _addrs.length == _amounts.length ); bounty = _addrs; uint256 limit = 0; for( uint256 i = 0; i <= bounty.length - 1; i++ ){ require( limit.add( _amounts[i] ) <= bountyLimit ); bountyAmount[bounty[i]] = _amounts[i]; limit.add( _amounts[i] ); } } function setTeams( address[] _addrs, uint256[] _amounts ) public onlyOwner finishOrHardcap returns( bool ) { require( _addrs.length == _amounts.length ); team = _addrs; uint256 limit = 0; for( uint256 i = 0; i <= team.length - 1; i++ ){ require( limit.add( _amounts[i] ) <= teamLimit ); teamAmount[team[i]] = _amounts[i]; limit.add( _amounts[i] ); } } function setBGXTokenInterface( address _BGXTokenAddress ) public onlyOwner returns( bool ) { require( _BGXTokenAddress != address(0) ); bgxTokenInterface = BGXTokenInterface( _BGXTokenAddress ); } function time() public constant returns(uint256 ) { return now; } }
0x6060604052600436106101ee576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063086914c3146101f357806308ac184b1461021c57806316ada547146102455780631865c57d1461026e578063197ebd53146102a55780631f0a21ad14610308578063212bf316146103ba578063227882d6146103fe57806329a2c27b146104615780632b7110511461048a57806333941681146104b35780633feb5f2b14610500578063474ceb4d14610563578063476a29e2146105b957806348e37220146105e65780634f9660ed1461060f57806350ec59031461063c57806356d906c71461068d5780635ac36d701461073f578063659ae215146107f157806378e7d4181461081a5780637d6fb0891461086b5780638da5cb5b146108bc57806394a53d41146109115780639faefe0c1461093a578063a3a81d4014610975578063a9ae83231461099e578063b071cbe6146109c7578063b7d3855f146109f0578063be9a655514610a53578063c19d93fb14610a80578063c736e11814610ab7578063cba25e7914610b0c578063d0679d3414610b35578063d353a1cb14610b8f578063e34c8dbf14610bca578063f2fde38b14610bf3578063f32113d514610c2c578063f89be59314610c7d578063fee2445414610ca6575b600080fd5b34156101fe57600080fd5b610206610ccf565b6040518082815260200191505060405180910390f35b341561022757600080fd5b61022f610cd5565b6040518082815260200191505060405180910390f35b341561025057600080fd5b610258610cdb565b6040518082815260200191505060405180910390f35b341561027957600080fd5b610281610ce3565b6040518082600481111561029157fe5b60ff16815260200191505060405180910390f35b34156102b057600080fd5b6102c66004808035906020019091905050610e2d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561031357600080fd5b6103a060048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610e6c565b604051808215151515815260200191505060405180910390f35b34156103c557600080fd5b6103e46004808035906020019091908035906020019091905050611078565b604051808215151515815260200191505060405180910390f35b341561040957600080fd5b61041f6004808035906020019091905050611119565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561046c57600080fd5b610474611158565b6040518082815260200191505060405180910390f35b341561049557600080fd5b61049d61115e565b6040518082815260200191505060405180910390f35b34156104be57600080fd5b6104ea600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061116b565b6040518082815260200191505060405180910390f35b341561050b57600080fd5b6105216004808035906020019091905050611183565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561056e57600080fd5b61059f60048080359060200190919080359060200190919080359060200190919080359060200190919050506111c2565b604051808215151515815260200191505060405180910390f35b34156105c457600080fd5b6105cc611273565b604051808215151515815260200191505060405180910390f35b34156105f157600080fd5b6105f96112fd565b6040518082815260200191505060405180910390f35b341561061a57600080fd5b610622611303565b604051808215151515815260200191505060405180910390f35b341561064757600080fd5b610673600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506115c3565b604051808215151515815260200191505060405180910390f35b341561069857600080fd5b61072560048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611812565b604051808215151515815260200191505060405180910390f35b341561074a57600080fd5b6107d760048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611a1e565b604051808215151515815260200191505060405180910390f35b34156107fc57600080fd5b610804611c2a565b6040518082815260200191505060405180910390f35b341561082557600080fd5b610851600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c30565b604051808215151515815260200191505060405180910390f35b341561087657600080fd5b6108a2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c50565b604051808215151515815260200191505060405180910390f35b34156108c757600080fd5b6108cf611d2f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561091c57600080fd5b610924611d54565b6040518082815260200191505060405180910390f35b341561094557600080fd5b61095b6004808035906020019091905050611d61565b604051808215151515815260200191505060405180910390f35b341561098057600080fd5b6109886120f0565b6040518082815260200191505060405180910390f35b34156109a957600080fd5b6109b16120f6565b6040518082815260200191505060405180910390f35b34156109d257600080fd5b6109da6120fc565b6040518082815260200191505060405180910390f35b34156109fb57600080fd5b610a11600480803590602001909190505061210c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610a5e57600080fd5b610a6661214b565b604051808215151515815260200191505060405180910390f35b3415610a8b57600080fd5b610a936121d3565b60405180826004811115610aa357fe5b60ff16815260200191505060405180910390f35b3415610ac257600080fd5b610aca6121e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610b1757600080fd5b610b1f61220c565b6040518082815260200191505060405180910390f35b3415610b4057600080fd5b610b75600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050612212565b604051808215151515815260200191505060405180910390f35b3415610b9a57600080fd5b610bb06004808035906020019091905050612595565b604051808215151515815260200191505060405180910390f35b3415610bd557600080fd5b610bdd612ef1565b6040518082815260200191505060405180910390f35b3415610bfe57600080fd5b610c2a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612ef7565b005b3415610c3757600080fd5b610c63600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061304c565b604051808215151515815260200191505060405180910390f35b3415610c8857600080fd5b610c9061312f565b6040518082815260200191505060405180910390f35b3415610cb157600080fd5b610cb9613135565b6040518082815260200191505060405180910390f35b600b5481565b60155481565b600042905090565b6000806004811115610cf157fe5b601260019054906101000a900460ff166004811115610d0c57fe5b1480610d245750601260009054906101000a900460ff165b15610d325760009050610e2a565b600480811115610d3e57fe5b601260019054906101000a900460ff166004811115610d5957fe5b1415610d685760049050610e2a565b6b019d971e4fe8401e74000000600f54101515610d885760039050610e2a565b6009544210158015610d9c5750600a544211155b15610dc057600d54600f54101515610db75760009050610e2a565b60019050610e2a565b600b544210158015610dd45750600c544211155b15610e0a576b019d971e4fe8401e74000000600f54101515610e0157610df861313b565b60039050610e2a565b60029050610e2a565b600c54421115610e2557610e1c61313b565b60049050610e2a565b600090505b90565b600581815481101515610e3c57fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ecc57600080fd5b60036004811115610ed957fe5b610ee1610ce3565b6004811115610eec57fe5b1480610f145750600480811115610eff57fe5b610f07610ce3565b6004811115610f1257fe5b145b1515610f1f57600080fd5b83518551141515610f2f57600080fd5b8460039080519060200190610f4592919061318d565b5060009150600090505b60016003805490500381111515611070576a52b7d2dcc80cd2e4000000610f968583815181101515610f7d57fe5b906020019060200201518461315690919063ffffffff16565b11151515610fa357600080fd5b8381815181101515610fb157fe5b9060200190602002015160066000600384815481101515610fce57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611062848281518110151561104957fe5b906020019060200201518361315690919063ffffffff16565b508080600101915050610f4f565b505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110d557600080fd5b600060048111156110e257fe5b6110ea610ce3565b60048111156110f557fe5b14151561110157600080fd5b82600d8190555081600e819055506001905092915050565b60048181548110151561112857fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60145481565b6000601680549050905090565b60176020528060005260406000206000915090505481565b60168181548110151561119257fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561121f57600080fd5b6000600481111561122c57fe5b611234610ce3565b600481111561123f57fe5b14151561124b57600080fd5b8460098190555083600a8190555082600b8190555081600c8190555060019050949350505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112d057600080fd5b601260009054906101000a900460ff1615601260006101000a81548160ff02191690831515021790555090565b60095481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561136057600080fd5b6003600481111561136d57fe5b611375610ce3565b600481111561138057fe5b14806113a8575060048081111561139357fe5b61139b610ce3565b60048111156113a657fe5b145b15156113b357600080fd5b600e54600f54101515156113c657600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb932108600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166010546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156114ae57600080fd5b5af115156114bb57600080fd5b5050506040518051905050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166376e7430e600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156115a457600080fd5b5af115156115b157600080fd5b50505060405180519050506001905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561162057600080fd5b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff161415151561165c57600080fd5b601860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561170e57611703601760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600f5461317490919063ffffffff16565b600f81905550611769565b611762601760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600f5461315690919063ffffffff16565b600f819055505b601860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615601860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550919050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561187257600080fd5b6003600481111561187f57fe5b611887610ce3565b600481111561189257fe5b14806118ba57506004808111156118a557fe5b6118ad610ce3565b60048111156118b857fe5b145b15156118c557600080fd5b835185511415156118d557600080fd5b84600490805190602001906118eb92919061318d565b5060009150600090505b60016004805490500381111515611a16576a295be96e6406697200000061193c858381518110151561192357fe5b906020019060200201518461315690919063ffffffff16565b1115151561194957600080fd5b838181518110151561195757fe5b906020019060200201516007600060048481548110151561197457fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a0884828151811015156119ef57fe5b906020019060200201518361315690919063ffffffff16565b5080806001019150506118f5565b505092915050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a7e57600080fd5b60036004811115611a8b57fe5b611a93610ce3565b6004811115611a9e57fe5b1480611ac65750600480811115611ab157fe5b611ab9610ce3565b6004811115611ac457fe5b145b1515611ad157600080fd5b83518551141515611ae157600080fd5b8460059080519060200190611af792919061318d565b5060009150600090505b60016005805490500381111515611c22576a52b7d2dcc80cd2e4000000611b488583815181101515611b2f57fe5b906020019060200201518461315690919063ffffffff16565b11151515611b5557600080fd5b8381815181101515611b6357fe5b9060200190602002015160086000600584815481101515611b8057fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c148482815181101515611bfb57fe5b906020019060200201518361315690919063ffffffff16565b508080600101915050611b01565b505092915050565b600c5481565b60186020528060005260406000206000915054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611cad57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515611ce957600080fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b683635c9adc5dea0000081565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611dc157600080fd5b600e54600f5410151515611dd457600080fd5b601680549050611def8560135461315690919063ffffffff16565b11151515611dfc57600080fd5b611e118460135461315690919063ffffffff16565b915060135490505b60018203811115156120ce5760186000601683815481101515611e3857fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156120c157600060176000601684815481101515611ec757fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb932108601683815481101515611f7e57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660176000601686815481101515611fbd57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156120a857600080fd5b5af115156120b557600080fd5b50505060405180519050505b8080600101915050611e19565b6120e38460135461315690919063ffffffff16565b6013819055505050919050565b600f5481565b600a5481565b6b019d971e4fe8401e7400000081565b60038181548110151561211b57fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156121a857600080fd5b6001601260016101000a81548160ff021916908360048111156121c757fe5b02179055506001905090565b601260019054906101000a900460ff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561226f57600080fd5b6001600481111561227c57fe5b612284610ce3565b600481111561228f57fe5b14806122b85750600260048111156122a357fe5b6122ab610ce3565b60048111156122b657fe5b145b15156122c357600080fd5b60406004810160003690501415156122da57600080fd5b8373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff16141580156123205750683635c9adc5dea000008310155b80156123765750601860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b151561238157600080fd5b6001600481111561238e57fe5b612396610ce3565b60048111156123a157fe5b14156123cd57600d546123bf84600f5461315690919063ffffffff16565b111515156123cc57600080fd5b5b600260048111156123da57fe5b6123e2610ce3565b60048111156123ed57fe5b1415612423576b019d971e4fe8401e7400000061241584600f5461315690919063ffffffff16565b1115151561242257600080fd5b5b601680548060010182816124379190613217565b9160005260206000209001600086909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506124d883601760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461315690919063ffffffff16565b601760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550601860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561258a5761258383600f5461315690919063ffffffff16565b600f819055505b600191505092915050565b60008060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156125f557600080fd5b6003600481111561260257fe5b61260a610ce3565b600481111561261557fe5b148061263d575060048081111561262857fe5b612630610ce3565b600481111561263b57fe5b145b151561264857600080fd5b600e54600f541015151561265b57600080fd5b60008411151561266a57600080fd5b600060115411801561267e57504260115411155b151561268957600080fd5b600060155414156126d6576126cf6126b56a52b7d2dcc80cd2e40000008061315690919063ffffffff16565b6a295be96e6406697200000061315690919063ffffffff16565b6015819055505b6126f360048054905060038054905061315690919063ffffffff16565b9150600380549050601454101561297a5760145490505b60016003805490500381111515612979576127a96006600060038481548110151561273157fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460155461317490919063ffffffff16565b601581905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb9321086003838154811015156127fc57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166006600060038681548110151561283b57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561292657600080fd5b5af1151561293357600080fd5b505050604051805190505060146000815480929190600101919050555083806001900394505060008411151561296c5760019250612eea565b808060010191505061270a565b5b816014541015612c115761299e60038054905060145461317490919063ffffffff16565b90505b60016004805490500381111515612c1057612a40600760006004848154811015156129c857fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460155461317490919063ffffffff16565b601581905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb932108600483815481101515612a9357fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660076000600486815481101515612ad257fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515612bbd57600080fd5b5af11515612bca57600080fd5b5050506040518051905050601460008154809291906001019190505550838060019003945050600084111515612c035760019250612eea565b80806001019150506129a1565b5b8160145410158015612c3b5750612c366005805490508361315690919063ffffffff16565b601454105b15612ec857612c558260145461317490919063ffffffff16565b90505b60016005805490500381111515612ec757612cf760086000600584815481101515612c7f57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460155461317490919063ffffffff16565b601581905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fb932108600583815481101515612d4a57fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660086000600586815481101515612d8957fe5b906000526020600020900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515612e7457600080fd5b5af11515612e8157600080fd5b5050506040518051905050601460008154809291906001019190505550838060019003945050600084111515612eba5760019250612eea565b8080600101915050612c58565b5b612edf60155460105461315690919063ffffffff16565b601081905550600192505b5050919050565b60115481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612f5257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612f8e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156130a957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff16141515156130e557600080fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b600e5481565b60135481565b6000601154111515613154576202a30042016011819055505b565b600080828401905083811015151561316a57fe5b8091505092915050565b600082821115151561318257fe5b818303905092915050565b828054828255906000526020600020908101928215613206579160200282015b828111156132055782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906131ad565b5b5090506132139190613243565b5090565b81548183558181151161323e5781836000526020600020918201910161323d9190613286565b5b505050565b61328391905b8082111561327f57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101613249565b5090565b90565b6132a891905b808211156132a457600081600090555060010161328c565b5090565b905600a165627a7a72305820c052a3b6f47c90659be5c761be8509078c72db8d30500af7207d7ed367e94b360029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,739
0xf58886121c8d1318cabf467db66106d69758968c
pragma solidity 0.4.24; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <stefan.george@consensys.net> contract MultiSigWallet { /* * Events */ event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(address indexed sender, uint indexed transactionId); event Submission(uint indexed transactionId); event Execution(uint indexed transactionId); event ExecutionFailure(uint indexed transactionId); event Deposit(address indexed sender, uint value); event OwnerAddition(address indexed owner); event OwnerRemoval(address indexed owner); event RequirementChange(uint required); /* * Constants */ uint constant public MAX_OWNER_COUNT = 50; /* * Storage */ mapping (uint => Transaction) public transactions; mapping (uint => mapping (address => bool)) public confirmations; mapping (address => bool) public isOwner; address[] public owners; uint public required; uint public transactionCount; struct Transaction { address destination; uint value; bytes data; bool executed; } /* * Modifiers */ modifier onlyWallet() { require(msg.sender == address(this)); _; } modifier ownerDoesNotExist(address owner) { require(!isOwner[owner]); _; } modifier ownerExists(address owner) { require(isOwner[owner]); _; } modifier transactionExists(uint transactionId) { require(transactions[transactionId].destination != 0); _; } modifier confirmed(uint transactionId, address owner) { require(confirmations[transactionId][owner]); _; } modifier notConfirmed(uint transactionId, address owner) { require(!confirmations[transactionId][owner]); _; } modifier notExecuted(uint transactionId) { require(!transactions[transactionId].executed); _; } modifier notNull(address _address) { require(_address != 0); _; } modifier validRequirement(uint ownerCount, uint _required) { require(ownerCount <= MAX_OWNER_COUNT && _required <= ownerCount && _required != 0 && ownerCount != 0); _; } /// @dev Fallback function allows to deposit ether. function() payable { if (msg.value > 0) Deposit(msg.sender, msg.value); } /* * Public functions */ /// @dev Contract constructor sets initial owners and required number of confirmations. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. function MultiSigWallet(address[] _owners, uint _required) public validRequirement(_owners.length, _required) { for (uint i=0; i<_owners.length; i++) { require(!isOwner[_owners[i]] && _owners[i] != 0); isOwner[_owners[i]] = true; } owners = _owners; required = _required; } /// @dev Allows to add a new owner. Transaction has to be sent by wallet. /// @param owner Address of new owner. function addOwner(address owner) public onlyWallet ownerDoesNotExist(owner) notNull(owner) validRequirement(owners.length + 1, required) { isOwner[owner] = true; owners.push(owner); OwnerAddition(owner); } /// @dev Allows to remove an owner. Transaction has to be sent by wallet. /// @param owner Address of owner. function removeOwner(address owner) public onlyWallet ownerExists(owner) { isOwner[owner] = false; for (uint i=0; i<owners.length - 1; i++) if (owners[i] == owner) { owners[i] = owners[owners.length - 1]; break; } owners.length -= 1; if (required > owners.length) changeRequirement(owners.length); OwnerRemoval(owner); } /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. /// @param owner Address of owner to be replaced. /// @param newOwner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; OwnerRemoval(owner); OwnerAddition(newOwner); } /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet. /// @param _required Number of required confirmations. function changeRequirement(uint _required) public onlyWallet validRequirement(owners.length, _required) { required = _required; RequirementChange(_required); } /// @dev Allows an owner to submit and confirm a transaction. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) { transactionId = addTransaction(destination, value, data); confirmTransaction(transactionId); } /// @dev Allows an owner to confirm a transaction. /// @param transactionId Transaction ID. function confirmTransaction(uint transactionId) public ownerExists(msg.sender) transactionExists(transactionId) notConfirmed(transactionId, msg.sender) { confirmations[transactionId][msg.sender] = true; Confirmation(msg.sender, transactionId); executeTransaction(transactionId); } /// @dev Allows an owner to revoke a confirmation for a transaction. /// @param transactionId Transaction ID. function revokeConfirmation(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { confirmations[transactionId][msg.sender] = false; Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; if (txn.destination.call.value(txn.value)(txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; } } } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } }
0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c27811461015e578063173825d91461019257806320ea8d86146101b35780632f54bf6e146101cb5780633411c81c1461020057806354741525146102245780637065cb4814610255578063784547a7146102765780638b51d13f1461028e5780639ace38c2146102a6578063a0e67e2b14610361578063a8abe69a146103c6578063b5dc40c3146103eb578063b77bf60014610403578063ba51a6df14610418578063c01a8c8414610430578063c642747414610448578063d74f8edd146104b1578063dc8452cd146104c6578063e20056e6146104db578063ee22610b14610502575b600034111561015c5760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561016a57600080fd5b5061017660043561051a565b60408051600160a060020a039092168252519081900360200190f35b34801561019e57600080fd5b5061015c600160a060020a0360043516610542565b3480156101bf57600080fd5b5061015c6004356106b9565b3480156101d757600080fd5b506101ec600160a060020a0360043516610773565b604080519115158252519081900360200190f35b34801561020c57600080fd5b506101ec600435600160a060020a0360243516610788565b34801561023057600080fd5b50610243600435151560243515156107a8565b60408051918252519081900360200190f35b34801561026157600080fd5b5061015c600160a060020a0360043516610814565b34801561028257600080fd5b506101ec600435610939565b34801561029a57600080fd5b506102436004356109bd565b3480156102b257600080fd5b506102be600435610a2c565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032357818101518382015260200161030b565b50505050905090810190601f1680156103505780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561036d57600080fd5b50610376610aea565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103b257818101518382015260200161039a565b505050509050019250505060405180910390f35b3480156103d257600080fd5b5061037660043560243560443515156064351515610b4d565b3480156103f757600080fd5b50610376600435610c86565b34801561040f57600080fd5b50610243610dff565b34801561042457600080fd5b5061015c600435610e05565b34801561043c57600080fd5b5061015c600435610e84565b34801561045457600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610243948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610f4f9650505050505050565b3480156104bd57600080fd5b50610243610f6e565b3480156104d257600080fd5b50610243610f73565b3480156104e757600080fd5b5061015c600160a060020a0360043581169060243516610f79565b34801561050e57600080fd5b5061015c600435611103565b600380548290811061052857fe5b600091825260209091200154600160a060020a0316905081565b600033301461055057600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561057957600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106545782600160a060020a03166003838154811015156105c357fe5b600091825260209091200154600160a060020a03161415610649576003805460001981019081106105f057fe5b60009182526020909120015460038054600160a060020a03909216918490811061061657fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610654565b60019091019061059c565b60038054600019019061066790826113a3565b5060035460045411156106805760035461068090610e05565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b3360008181526002602052604090205460ff1615156106d757600080fd5b60008281526001602090815260408083203380855292529091205483919060ff16151561070357600080fd5b600084815260208190526040902060030154849060ff161561072457600080fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b60055481101561080d578380156107d5575060008181526020819052604090206003015460ff16155b806107f957508280156107f9575060008181526020819052604090206003015460ff165b15610805576001820191505b6001016107ac565b5092915050565b33301461082057600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561084857600080fd5b81600160a060020a038116151561085e57600080fd5b6003805490506001016004546032821115801561087b5750818111155b801561088657508015155b801561089157508115155b151561089c57600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b6003548110156109b6576000848152600160205260408120600380549192918490811061096757fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff161561099b576001820191505b6004548214156109ae57600192506109b6565b60010161093e565b5050919050565b6000805b600354811015610a2657600083815260016020526040812060038054919291849081106109ea57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a1e576001820191505b6001016109c1565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610ad75780601f10610aac57610100808354040283529160200191610ad7565b820191906000526020600020905b815481529060010190602001808311610aba57829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b4257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b24575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610b7f578160200160208202803883390190505b50925060009150600090505b600554811015610c0657858015610bb4575060008181526020819052604090206003015460ff16155b80610bd85750848015610bd8575060008181526020819052604090206003015460ff165b15610bfe57808383815181101515610bec57fe5b60209081029091010152600191909101905b600101610b8b565b878703604051908082528060200260200182016040528015610c32578160200160208202803883390190505b5093508790505b86811015610c7b578281815181101515610c4f57fe5b9060200190602002015184898303815181101515610c6957fe5b60209081029091010152600101610c39565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610cbb578160200160208202803883390190505b50925060009150600090505b600354811015610d785760008581526001602052604081206003805491929184908110610cf057fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610d70576003805482908110610d2b57fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d5157fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610cc7565b81604051908082528060200260200182016040528015610da2578160200160208202803883390190505b509350600090505b81811015610df7578281815181101515610dc057fe5b906020019060200201518482815181101515610dd857fe5b600160a060020a03909216602092830290910190910152600101610daa565b505050919050565b60055481565b333014610e1157600080fd5b6003548160328211801590610e265750818111155b8015610e3157508015155b8015610e3c57508115155b1515610e4757600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff161515610ea257600080fd5b6000828152602081905260409020548290600160a060020a03161515610ec757600080fd5b60008381526001602090815260408083203380855292529091205484919060ff1615610ef257600080fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610f4885611103565b5050505050565b6000610f5c8484846112b3565b9050610f6781610e84565b9392505050565b603281565b60045481565b6000333014610f8757600080fd5b600160a060020a038316600090815260026020526040902054839060ff161515610fb057600080fd5b600160a060020a038316600090815260026020526040902054839060ff1615610fd857600080fd5b600092505b6003548310156110695784600160a060020a031660038481548110151561100057fe5b600091825260209091200154600160a060020a0316141561105e578360038481548110151561102b57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550611069565b600190920191610fdd565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b3360008181526002602052604081205490919060ff16151561112457600080fd5b60008381526001602090815260408083203380855292529091205484919060ff16151561115057600080fd5b600085815260208190526040902060030154859060ff161561117157600080fd5b61117a86610939565b156112ab576000868152602081905260409081902060038101805460ff19166001908117909155815481830154935160028085018054959b50600160a060020a03909316959492939192839285926000199183161561010002919091019091160480156112285780601f106111fd57610100808354040283529160200191611228565b820191906000526020600020905b81548152906001019060200180831161120b57829003601f168201915b505091505060006040518083038185875af192505050156112735760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a26112ab565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038501805460ff191690555b505050505050565b600083600160a060020a03811615156112cb57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff19169416939093178355516001830155925180519496509193909261134b9260028501929101906113cc565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b8154818355818111156113c7576000838152602090206113c791810190830161144a565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061140d57805160ff191683800117855561143a565b8280016001018555821561143a579182015b8281111561143a57825182559160200191906001019061141f565b5061144692915061144a565b5090565b610b4a91905b8082111561144657600081556001016114505600a165627a7a72305820509f31f8db95a20c51026b117d966abb78fea4aaf8ffc591f224646c46833ee20029
{"success": true, "error": null, "results": {}}
9,740
0xf263dc238cf09ba91d6d3bb1ec24bcbf52879c8e
/** /** //SPDX-License-Identifier: UNLICENSED Telegram: https://t.me/KazumaEthPortal Website: https://kazuma.live Twitter: https://twitter.com/KazumaEth */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Kazuma is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "Kazuma"; string private constant _symbol = "Kazuma"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(0x9E1cDF1fD0946525d82B8c0D44D919CC0A08D123); _feeAddrWallet2 = payable(0x4937610a15008beB628AAaB7Ca59D65922E55d60); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = true; emit Transfer(address(this), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 1; _feeAddr2 = 11; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 1; _feeAddr2 = 11; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb14610295578063b515566a146102b5578063c3c8cd80146102d5578063c9567bf9146102ea578063dd62ed3e146102ff57600080fd5b806370a0823114610238578063715018a6146102585780638da5cb5b1461026d57806395d89b411461010e57600080fd5b8063273123b7116100d1578063273123b7146101c5578063313ce567146101e75780635932ead1146102035780636fc3eaec1461022357600080fd5b806306fdde031461010e578063095ea7b31461014c57806318160ddd1461017c57806323b872dd146101a557600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201825260068152654b617a756d6160d01b602082015290516101439190611792565b60405180910390f35b34801561015857600080fd5b5061016c610167366004611632565b610345565b6040519015158152602001610143565b34801561018857600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610143565b3480156101b157600080fd5b5061016c6101c03660046115f1565b61035c565b3480156101d157600080fd5b506101e56101e036600461157e565b6103c5565b005b3480156101f357600080fd5b5060405160098152602001610143565b34801561020f57600080fd5b506101e561021e36600461172a565b610419565b34801561022f57600080fd5b506101e5610461565b34801561024457600080fd5b5061019761025336600461157e565b61048e565b34801561026457600080fd5b506101e56104b0565b34801561027957600080fd5b506000546040516001600160a01b039091168152602001610143565b3480156102a157600080fd5b5061016c6102b0366004611632565b610524565b3480156102c157600080fd5b506101e56102d036600461165e565b610531565b3480156102e157600080fd5b506101e56105c7565b3480156102f657600080fd5b506101e56105fd565b34801561030b57600080fd5b5061019761031a3660046115b8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103523384846109c6565b5060015b92915050565b6000610369848484610aea565b6103bb84336103b68560405180606001604052806028815260200161197e602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e35565b6109c6565b5060019392505050565b6000546001600160a01b031633146103f85760405162461bcd60e51b81526004016103ef906117e7565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104435760405162461bcd60e51b81526004016103ef906117e7565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461048157600080fd5b4761048b81610e6f565b50565b6001600160a01b03811660009081526002602052604081205461035690610ef4565b6000546001600160a01b031633146104da5760405162461bcd60e51b81526004016103ef906117e7565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610352338484610aea565b6000546001600160a01b0316331461055b5760405162461bcd60e51b81526004016103ef906117e7565b60005b81518110156105c35760016006600084848151811061057f5761057f61192e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105bb816118fd565b91505061055e565b5050565b600c546001600160a01b0316336001600160a01b0316146105e757600080fd5b60006105f23061048e565b905061048b81610f78565b6000546001600160a01b031633146106275760405162461bcd60e51b81526004016103ef906117e7565b600f54600160a01b900460ff16156106815760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103ef565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106c130826b033b2e3c9fd0803ce80000006109c6565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156106fa57600080fd5b505afa15801561070e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610732919061159b565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561077a57600080fd5b505afa15801561078e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b2919061159b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107fa57600080fd5b505af115801561080e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610832919061159b565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306108628161048e565b6000806108776000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156108da57600080fd5b505af11580156108ee573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109139190611764565b5050600f80546a084595161401484a00000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561098e57600080fd5b505af11580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c39190611747565b6001600160a01b038316610a285760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ef565b6001600160a01b038216610a895760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ef565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b4e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ef565b6001600160a01b038216610bb05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ef565b60008111610c125760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103ef565b6001600a55600b80556000546001600160a01b03848116911614801590610c4757506000546001600160a01b03838116911614155b15610e25576001600160a01b03831660009081526006602052604090205460ff16158015610c8e57506001600160a01b03821660009081526006602052604090205460ff16155b610c9757600080fd5b600f546001600160a01b038481169116148015610cc25750600e546001600160a01b03838116911614155b8015610ce757506001600160a01b03821660009081526005602052604090205460ff16155b8015610cfc5750600f54600160b81b900460ff165b15610d5957601054811115610d1057600080fd5b6001600160a01b0382166000908152600760205260409020544211610d3457600080fd5b610d3f42603c61188d565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b038381169116148015610d845750600e546001600160a01b03848116911614155b8015610da957506001600160a01b03831660009081526005602052604090205460ff16155b15610db8576001600a55600b80555b6000610dc33061048e565b600f54909150600160a81b900460ff16158015610dee5750600f546001600160a01b03858116911614155b8015610e035750600f54600160b01b900460ff165b15610e2357610e1181610f78565b478015610e2157610e2147610e6f565b505b505b610e30838383611101565b505050565b60008184841115610e595760405162461bcd60e51b81526004016103ef9190611792565b506000610e6684866118e6565b95945050505050565b600c546001600160a01b03166108fc610e8983600261110c565b6040518115909202916000818181858888f19350505050158015610eb1573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610ecc83600261110c565b6040518115909202916000818181858888f193505050501580156105c3573d6000803e3d6000fd5b6000600854821115610f5b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103ef565b6000610f6561114e565b9050610f71838261110c565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610fc057610fc061192e565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561101457600080fd5b505afa158015611028573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104c919061159b565b8160018151811061105f5761105f61192e565b6001600160a01b039283166020918202929092010152600e5461108591309116846109c6565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906110be90859060009086903090429060040161181c565b600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610e30838383611171565b6000610f7183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611268565b600080600061115b611296565b909250905061116a828261110c565b9250505090565b600080600080600080611183876112de565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111b5908761133b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546111e4908661137d565b6001600160a01b038916600090815260026020526040902055611206816113dc565b6112108483611426565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161125591815260200190565b60405180910390a3505050505050505050565b600081836112895760405162461bcd60e51b81526004016103ef9190611792565b506000610e6684866118a5565b60085460009081906b033b2e3c9fd0803ce80000006112b5828261110c565b8210156112d5575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006112fb8a600a54600b5461144a565b925092509250600061130b61114e565b9050600080600061131e8e87878761149f565b919e509c509a509598509396509194505050505091939550919395565b6000610f7183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e35565b60008061138a838561188d565b905083811015610f715760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103ef565b60006113e661114e565b905060006113f483836114ef565b30600090815260026020526040902054909150611411908261137d565b30600090815260026020526040902055505050565b600854611433908361133b565b600855600954611443908261137d565b6009555050565b6000808080611464606461145e89896114ef565b9061110c565b90506000611477606461145e8a896114ef565b9050600061148f826114898b8661133b565b9061133b565b9992985090965090945050505050565b60008080806114ae88866114ef565b905060006114bc88876114ef565b905060006114ca88886114ef565b905060006114dc82611489868661133b565b939b939a50919850919650505050505050565b6000826114fe57506000610356565b600061150a83856118c7565b90508261151785836118a5565b14610f715760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103ef565b80356115798161195a565b919050565b60006020828403121561159057600080fd5b8135610f718161195a565b6000602082840312156115ad57600080fd5b8151610f718161195a565b600080604083850312156115cb57600080fd5b82356115d68161195a565b915060208301356115e68161195a565b809150509250929050565b60008060006060848603121561160657600080fd5b83356116118161195a565b925060208401356116218161195a565b929592945050506040919091013590565b6000806040838503121561164557600080fd5b82356116508161195a565b946020939093013593505050565b6000602080838503121561167157600080fd5b823567ffffffffffffffff8082111561168957600080fd5b818501915085601f83011261169d57600080fd5b8135818111156116af576116af611944565b8060051b604051601f19603f830116810181811085821117156116d4576116d4611944565b604052828152858101935084860182860187018a10156116f357600080fd5b600095505b8386101561171d576117098161156e565b8552600195909501949386019386016116f8565b5098975050505050505050565b60006020828403121561173c57600080fd5b8135610f718161196f565b60006020828403121561175957600080fd5b8151610f718161196f565b60008060006060848603121561177957600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156117bf578581018301518582016040015282016117a3565b818111156117d1576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561186c5784516001600160a01b031683529383019391830191600101611847565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156118a0576118a0611918565b500190565b6000826118c257634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156118e1576118e1611918565b500290565b6000828210156118f8576118f8611918565b500390565b600060001982141561191157611911611918565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461048b57600080fd5b801515811461048b57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122078e04ba2bf6022d77267dd9fc1990def4584640ff63287e55c09eebc28a4230064736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,741
0x103e2932c8f0056db13ac1d2603949fd85206946
/** *Submitted for verification at Etherscan.io on 2022-03-09 */ /** The "Z" first drew attention when it was painted on the sides of thousands of tanks and other military vehicles along the Russian border with Ukraine. Then the letter began popping up across Russia. BANZ TOKEN:BAN "Z" https://t.me/BanZToken */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract BANZTOKEN is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ban Z Token"; string private constant _symbol = "BANZ"; uint8 private constant _decimals = 9; mapping (address => uint256) _balances; mapping(address => uint256) _lastTX; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 _totalSupply = 20220309 * 10**9; //Buy Fee uint256 private _taxFeeOnBuy = 10; //Sell Fee uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _taxFee = _taxFeeOnSell; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; address payable private _marketingAddress = payable(0xC6df1e6375895e7d9c6c4DB5654beeb7658cc691); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; bool private transferDelay = true; uint256 public _maxTxAmount = 202203 * 10**9; uint256 public _maxWalletSize = 606609 * 10**9; uint256 public _swapTokensAtAmount = 101102 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _balances[_msgSender()] = _totalSupply; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_marketingAddress] = true; //multisig emit Transfer(address(0), _msgSender(), _totalSupply); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (!_isExcludedFromFee[to] && !_isExcludedFromFee[from]) { require(tradingOpen, "TOKEN: Trading not yet started"); require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { if(from == uniswapV2Pair && transferDelay){ require(_lastTX[tx.origin] + 3 minutes < block.timestamp && _lastTX[to] + 3 minutes < block.timestamp, "TOKEN: 3 minutes cooldown between buys"); } require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _swapTokensAtAmount) { contractTokenBalance = _swapTokensAtAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); // Reserve of 15% of tokens for liquidity uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0 ether) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _taxFee = _taxFeeOnSell; } } _lastTX[tx.origin] = block.timestamp; _lastTX[to] = block.timestamp; _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { uint256 ethAmt = tokenAmount.mul(85).div(100); uint256 liqAmt = tokenAmount - ethAmt; uint256 balanceBefore = address(this).balance; address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( ethAmt, 0, path, address(this), block.timestamp ); uint256 amountETH = address(this).balance.sub(balanceBefore); addLiquidity(liqAmt, amountETH.mul(15).div(100)); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(0), block.timestamp ); } function OpenTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) {_transferNoTax(sender,recipient, amount);} else {_transferStandard(sender, recipient, amount);} } function airdrop(address[] calldata recipients, uint256[] calldata amount) public onlyOwner{ for (uint256 i = 0; i < recipients.length; i++) { _transferNoTax(msg.sender,recipients[i], amount[i]); } } function _transferStandard( address sender, address recipient, uint256 amount ) private { uint256 amountReceived = takeFees(sender, amount); _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); } function _transferNoTax(address sender, address recipient, uint256 amount) internal returns (bool) { _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); return true; } function takeFees(address sender,uint256 amount) internal returns (uint256) { uint256 feeAmount = amount.mul(_taxFee).div(100); _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(sender, address(this), feeAmount); return amount.sub(feeAmount); } receive() external payable {} function transferOwnership(address newOwner) public override onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _isExcludedFromFee[owner()] = false; _transferOwnership(newOwner); _isExcludedFromFee[owner()] = true; } function setFees(uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function setIsFeeExempt(address holder, bool exempt) public onlyOwner { _isExcludedFromFee[holder] = exempt; } function toggleTransferDelay() public onlyOwner { transferDelay = !transferDelay; } }
0x6080604052600436106101d05760003560e01c806370a08231116100f757806395d89b4111610095578063c3c8cd8011610064578063c3c8cd801461065a578063dd62ed3e14610671578063ea1644d5146106ae578063f2fde38b146106d7576101d7565b806395d89b411461058c57806398a5c315146105b7578063a9059cbb146105e0578063bfd792841461061d576101d7565b80637d1db4a5116100d15780637d1db4a5146104f45780638da5cb5b1461051f5780638eb59a5f1461054a5780638f9a55c014610561576101d7565b806370a0823114610477578063715018a6146104b457806374010ece146104cb576101d7565b806323b872dd1161016f578063658d4b7f1161013e578063658d4b7f146103d357806367243482146103fc5780636b999053146104255780636d8aa8f81461044e576101d7565b806323b872dd146103155780632fd689e314610352578063313ce5671461037d57806349bd5a5e146103a8576101d7565b80630b78f9c0116101ab5780630b78f9c01461026d5780631694505e1461029657806318160ddd146102c15780631f600db0146102ec576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe919061301c565b610700565b005b34801561021157600080fd5b5061021a610811565b6040516102279190613506565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612f5b565b61084e565b60405161026491906134d0565b60405180910390f35b34801561027957600080fd5b50610294600480360381019061028f91906130bf565b61086c565b005b3480156102a257600080fd5b506102ab6108fa565b6040516102b891906134eb565b60405180910390f35b3480156102cd57600080fd5b506102d6610920565b6040516102e391906136e8565b60405180910390f35b3480156102f857600080fd5b50610313600480360381019061030e9190613065565b61092a565b005b34801561032157600080fd5b5061033c60048036038101906103379190612ec8565b6109c3565b60405161034991906134d0565b60405180910390f35b34801561035e57600080fd5b50610367610a9c565b60405161037491906136e8565b60405180910390f35b34801561038957600080fd5b50610392610aa2565b60405161039f919061375d565b60405180910390f35b3480156103b457600080fd5b506103bd610aab565b6040516103ca9190613454565b60405180910390f35b3480156103df57600080fd5b506103fa60048036038101906103f59190612f1b565b610ad1565b005b34801561040857600080fd5b50610423600480360381019061041e9190612f9b565b610ba8565b005b34801561043157600080fd5b5061044c60048036038101906104479190612e2e565b610c98565b005b34801561045a57600080fd5b5061047560048036038101906104709190613065565b610d6f565b005b34801561048357600080fd5b5061049e60048036038101906104999190612e2e565b610e08565b6040516104ab91906136e8565b60405180910390f35b3480156104c057600080fd5b506104c9610e51565b005b3480156104d757600080fd5b506104f260048036038101906104ed9190613092565b610ed9565b005b34801561050057600080fd5b50610509610f5f565b60405161051691906136e8565b60405180910390f35b34801561052b57600080fd5b50610534610f65565b6040516105419190613454565b60405180910390f35b34801561055657600080fd5b5061055f610f8e565b005b34801561056d57600080fd5b50610576611036565b60405161058391906136e8565b60405180910390f35b34801561059857600080fd5b506105a161103c565b6040516105ae9190613506565b60405180910390f35b3480156105c357600080fd5b506105de60048036038101906105d99190613092565b611079565b005b3480156105ec57600080fd5b5061060760048036038101906106029190612f5b565b6110ff565b60405161061491906134d0565b60405180910390f35b34801561062957600080fd5b50610644600480360381019061063f9190612e2e565b61111d565b60405161065191906134d0565b60405180910390f35b34801561066657600080fd5b5061066f61113d565b005b34801561067d57600080fd5b5061069860048036038101906106939190612e88565b6111d2565b6040516106a591906136e8565b60405180910390f35b3480156106ba57600080fd5b506106d560048036038101906106d09190613092565b611259565b005b3480156106e357600080fd5b506106fe60048036038101906106f99190612e2e565b6112df565b005b610708611495565b73ffffffffffffffffffffffffffffffffffffffff16610726610f65565b73ffffffffffffffffffffffffffffffffffffffff161461077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077390613648565b60405180910390fd5b60005b815181101561080d576001600a60008484815181106107a1576107a0613adb565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061080590613a34565b91505061077f565b5050565b60606040518060400160405280600b81526020017f42616e205a20546f6b656e000000000000000000000000000000000000000000815250905090565b600061086261085b611495565b848461149d565b6001905092915050565b610874611495565b73ffffffffffffffffffffffffffffffffffffffff16610892610f65565b73ffffffffffffffffffffffffffffffffffffffff16146108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df90613648565b60405180910390fd5b81600681905550806007819055505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600554905090565b610932611495565b73ffffffffffffffffffffffffffffffffffffffff16610950610f65565b73ffffffffffffffffffffffffffffffffffffffff16146109a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099d90613648565b60405180910390fd5b80600d60146101000a81548160ff02191690831515021790555050565b60006109d0848484611668565b610a91846109dc611495565b610a8c85604051806060016040528060288152602001613f6360289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a42611495565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b61149d565b600190509392505050565b60105481565b60006009905090565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ad9611495565b73ffffffffffffffffffffffffffffffffffffffff16610af7610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4490613648565b60405180910390fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b610bb0611495565b73ffffffffffffffffffffffffffffffffffffffff16610bce610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610c24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1b90613648565b60405180910390fd5b60005b84849050811015610c9157610c7d33868684818110610c4957610c48613adb565b5b9050602002016020810190610c5e9190612e2e565b858585818110610c7157610c70613adb565b5b90506020020135612062565b508080610c8990613a34565b915050610c27565b5050505050565b610ca0611495565b73ffffffffffffffffffffffffffffffffffffffff16610cbe610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0b90613648565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610d77611495565b73ffffffffffffffffffffffffffffffffffffffff16610d95610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610deb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de290613648565b60405180910390fd5b80600d60166101000a81548160ff02191690831515021790555050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610e59611495565b73ffffffffffffffffffffffffffffffffffffffff16610e77610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610ecd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec490613648565b60405180910390fd5b610ed76000612235565b565b610ee1611495565b73ffffffffffffffffffffffffffffffffffffffff16610eff610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4c90613648565b60405180910390fd5b80600e8190555050565b600e5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610f96611495565b73ffffffffffffffffffffffffffffffffffffffff16610fb4610f65565b73ffffffffffffffffffffffffffffffffffffffff161461100a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100190613648565b60405180910390fd5b600d60179054906101000a900460ff1615600d60176101000a81548160ff021916908315150217905550565b600f5481565b60606040518060400160405280600481526020017f42414e5a00000000000000000000000000000000000000000000000000000000815250905090565b611081611495565b73ffffffffffffffffffffffffffffffffffffffff1661109f610f65565b73ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ec90613648565b60405180910390fd5b8060108190555050565b600061111361110c611495565b8484611668565b6001905092915050565b600a6020528060005260406000206000915054906101000a900460ff1681565b611145611495565b73ffffffffffffffffffffffffffffffffffffffff16611163610f65565b73ffffffffffffffffffffffffffffffffffffffff16146111b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b090613648565b60405180910390fd5b60006111c430610e08565b90506111cf816122f9565b50565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611261611495565b73ffffffffffffffffffffffffffffffffffffffff1661127f610f65565b73ffffffffffffffffffffffffffffffffffffffff16146112d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112cc90613648565b60405180910390fd5b80600f8190555050565b6112e7611495565b73ffffffffffffffffffffffffffffffffffffffff16611305610f65565b73ffffffffffffffffffffffffffffffffffffffff161461135b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135290613648565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c290613568565b60405180910390fd5b6000600460006113d9610f65565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061143381612235565b600160046000611441610f65565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561150d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611504906136c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561157d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157490613588565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161165b91906136e8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cf90613688565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173f90613528565b60405180910390fd5b6000811161178b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178290613668565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561182f5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611c8757600d60149054906101000a900460ff16611883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187a906135c8565b60405180910390fd5b600e548111156118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf90613548565b60405180910390fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561196c5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a2906135a8565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611baa57600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611a695750600d60179054906101000a900460ff165b15611b52574260b4600260003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abb919061381e565b108015611b1257504260b4600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b10919061381e565b105b611b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4890613608565b60405180910390fd5b5b600f5481611b5f84610e08565b611b69919061381e565b10611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba0906136a8565b60405180910390fd5b5b6000611bb530610e08565b9050600060105482101590506010548210611bd05760105491505b808015611bea5750600d60159054906101000a900460ff16155b8015611c445750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611c5c5750600d60169054906101000a900460ff165b15611c8457611c6a826122f9565b60004790506000811115611c8257611c814761260c565b5b505b50505b600060019050600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d2e5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611de15750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611de05750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611def5760009050611f64565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611e9a5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611ea9576006546008819055505b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611f545750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611f63576007546008819055505b5b42600260003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ff884848484612678565b50505050565b6000838311158290612046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203d9190613506565b60405180910390fd5b506000838561205591906138ff565b9050809150509392505050565b60006120ed826040518060400160405280601481526020017f496e73756666696369656e742042616c616e6365000000000000000000000000815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061218282600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161222291906136e8565b60405180910390a3600190509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001600d60156101000a81548160ff021916908315150217905550600061233d606461232f6055856126fe90919063ffffffff16565b61277990919063ffffffff16565b90506000818361234d91906138ff565b905060004790506000600267ffffffffffffffff81111561237157612370613b0a565b5b60405190808252806020026020018201604052801561239f5781602001602082028036833780820191505090505b50905030816000815181106123b7576123b6613adb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561245957600080fd5b505afa15801561246d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124919190612e5b565b816001815181106124a5576124a4613adb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061250c30600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168761149d565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478560008430426040518663ffffffff1660e01b8152600401612570959493929190613703565b600060405180830381600087803b15801561258a57600080fd5b505af115801561259e573d6000803e3d6000fd5b5050505060006125b783476127c390919063ffffffff16565b90506125e9846125e460646125d6600f866126fe90919063ffffffff16565b61277990919063ffffffff16565b61280d565b50505050506000600d60156101000a81548160ff02191690831515021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612674573d6000803e3d6000fd5b5050565b8061268e57612688848484612062565b5061269a565b6126998484846128fb565b5b50505050565b60008082846126af919061381e565b9050838110156126f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126eb906135e8565b60405180910390fd5b8091505092915050565b6000808314156127115760009050612773565b6000828461271f91906138a5565b905082848261272e9190613874565b1461276e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161276590613628565b60405180910390fd5b809150505b92915050565b60006127bb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612ad5565b905092915050565b600061280583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ffe565b905092915050565b61283a30600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461149d565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7198230856000806000426040518863ffffffff1660e01b81526004016128a29695949392919061346f565b6060604051808303818588803b1580156128bb57600080fd5b505af11580156128cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906128f491906130ff565b5050505050565b60006129078483612b38565b9050612992826040518060400160405280601481526020017f496e73756666696369656e742042616c616e6365000000000000000000000000815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a2781600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612ac791906136e8565b60405180910390a350505050565b60008083118290612b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b139190613506565b60405180910390fd5b5060008385612b2b9190613874565b9050809150509392505050565b600080612b636064612b55600854866126fe90919063ffffffff16565b61277990919063ffffffff16565b9050612bb781600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612c5791906136e8565b60405180910390a3612c7281846127c390919063ffffffff16565b91505092915050565b6000612c8e612c898461379d565b613778565b90508083825260208201905082856020860282011115612cb157612cb0613b43565b5b60005b85811015612ce15781612cc78882612ceb565b845260208401935060208301925050600181019050612cb4565b5050509392505050565b600081359050612cfa81613f1d565b92915050565b600081519050612d0f81613f1d565b92915050565b60008083601f840112612d2b57612d2a613b3e565b5b8235905067ffffffffffffffff811115612d4857612d47613b39565b5b602083019150836020820283011115612d6457612d63613b43565b5b9250929050565b600082601f830112612d8057612d7f613b3e565b5b8135612d90848260208601612c7b565b91505092915050565b60008083601f840112612daf57612dae613b3e565b5b8235905067ffffffffffffffff811115612dcc57612dcb613b39565b5b602083019150836020820283011115612de857612de7613b43565b5b9250929050565b600081359050612dfe81613f34565b92915050565b600081359050612e1381613f4b565b92915050565b600081519050612e2881613f4b565b92915050565b600060208284031215612e4457612e43613b4d565b5b6000612e5284828501612ceb565b91505092915050565b600060208284031215612e7157612e70613b4d565b5b6000612e7f84828501612d00565b91505092915050565b60008060408385031215612e9f57612e9e613b4d565b5b6000612ead85828601612ceb565b9250506020612ebe85828601612ceb565b9150509250929050565b600080600060608486031215612ee157612ee0613b4d565b5b6000612eef86828701612ceb565b9350506020612f0086828701612ceb565b9250506040612f1186828701612e04565b9150509250925092565b60008060408385031215612f3257612f31613b4d565b5b6000612f4085828601612ceb565b9250506020612f5185828601612def565b9150509250929050565b60008060408385031215612f7257612f71613b4d565b5b6000612f8085828601612ceb565b9250506020612f9185828601612e04565b9150509250929050565b60008060008060408587031215612fb557612fb4613b4d565b5b600085013567ffffffffffffffff811115612fd357612fd2613b48565b5b612fdf87828801612d15565b9450945050602085013567ffffffffffffffff81111561300257613001613b48565b5b61300e87828801612d99565b925092505092959194509250565b60006020828403121561303257613031613b4d565b5b600082013567ffffffffffffffff8111156130505761304f613b48565b5b61305c84828501612d6b565b91505092915050565b60006020828403121561307b5761307a613b4d565b5b600061308984828501612def565b91505092915050565b6000602082840312156130a8576130a7613b4d565b5b60006130b684828501612e04565b91505092915050565b600080604083850312156130d6576130d5613b4d565b5b60006130e485828601612e04565b92505060206130f585828601612e04565b9150509250929050565b60008060006060848603121561311857613117613b4d565b5b600061312686828701612e19565b935050602061313786828701612e19565b925050604061314886828701612e19565b9150509250925092565b600061315e838361316a565b60208301905092915050565b61317381613933565b82525050565b61318281613933565b82525050565b6000613193826137d9565b61319d81856137fc565b93506131a8836137c9565b8060005b838110156131d95781516131c08882613152565b97506131cb836137ef565b9250506001810190506131ac565b5085935050505092915050565b6131ef81613945565b82525050565b6131fe81613988565b82525050565b61320d8161399a565b82525050565b600061321e826137e4565b613228818561380d565b93506132388185602086016139d0565b61324181613b52565b840191505092915050565b600061325960238361380d565b915061326482613b63565b604082019050919050565b600061327c601c8361380d565b915061328782613bb2565b602082019050919050565b600061329f60268361380d565b91506132aa82613bdb565b604082019050919050565b60006132c260228361380d565b91506132cd82613c2a565b604082019050919050565b60006132e560238361380d565b91506132f082613c79565b604082019050919050565b6000613308601e8361380d565b915061331382613cc8565b602082019050919050565b600061332b601b8361380d565b915061333682613cf1565b602082019050919050565b600061334e60268361380d565b915061335982613d1a565b604082019050919050565b600061337160218361380d565b915061337c82613d69565b604082019050919050565b600061339460208361380d565b915061339f82613db8565b602082019050919050565b60006133b760298361380d565b91506133c282613de1565b604082019050919050565b60006133da60258361380d565b91506133e582613e30565b604082019050919050565b60006133fd60238361380d565b915061340882613e7f565b604082019050919050565b600061342060248361380d565b915061342b82613ece565b604082019050919050565b61343f81613971565b82525050565b61344e8161397b565b82525050565b60006020820190506134696000830184613179565b92915050565b600060c0820190506134846000830189613179565b6134916020830188613436565b61349e6040830187613204565b6134ab6060830186613204565b6134b86080830185613179565b6134c560a0830184613436565b979650505050505050565b60006020820190506134e560008301846131e6565b92915050565b600060208201905061350060008301846131f5565b92915050565b600060208201905081810360008301526135208184613213565b905092915050565b600060208201905081810360008301526135418161324c565b9050919050565b600060208201905081810360008301526135618161326f565b9050919050565b6000602082019050818103600083015261358181613292565b9050919050565b600060208201905081810360008301526135a1816132b5565b9050919050565b600060208201905081810360008301526135c1816132d8565b9050919050565b600060208201905081810360008301526135e1816132fb565b9050919050565b600060208201905081810360008301526136018161331e565b9050919050565b6000602082019050818103600083015261362181613341565b9050919050565b6000602082019050818103600083015261364181613364565b9050919050565b6000602082019050818103600083015261366181613387565b9050919050565b60006020820190508181036000830152613681816133aa565b9050919050565b600060208201905081810360008301526136a1816133cd565b9050919050565b600060208201905081810360008301526136c1816133f0565b9050919050565b600060208201905081810360008301526136e181613413565b9050919050565b60006020820190506136fd6000830184613436565b92915050565b600060a0820190506137186000830188613436565b6137256020830187613204565b81810360408301526137378186613188565b90506137466060830185613179565b6137536080830184613436565b9695505050505050565b60006020820190506137726000830184613445565b92915050565b6000613782613793565b905061378e8282613a03565b919050565b6000604051905090565b600067ffffffffffffffff8211156137b8576137b7613b0a565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061382982613971565b915061383483613971565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561386957613868613a7d565b5b828201905092915050565b600061387f82613971565b915061388a83613971565b92508261389a57613899613aac565b5b828204905092915050565b60006138b082613971565b91506138bb83613971565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138f4576138f3613a7d565b5b828202905092915050565b600061390a82613971565b915061391583613971565b92508282101561392857613927613a7d565b5b828203905092915050565b600061393e82613951565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613993826139ac565b9050919050565b60006139a582613971565b9050919050565b60006139b7826139be565b9050919050565b60006139c982613951565b9050919050565b60005b838110156139ee5780820151818401526020810190506139d3565b838111156139fd576000848401525b50505050565b613a0c82613b52565b810181811067ffffffffffffffff82111715613a2b57613a2a613b0a565b5b80604052505050565b6000613a3f82613971565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a7257613a71613a7d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054726164696e67206e6f742079657420737461727465640000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f544f4b454e3a2033206d696e7574657320636f6f6c646f776e2062657477656560008201527f6e20627579730000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613f2681613933565b8114613f3157600080fd5b50565b613f3d81613945565b8114613f4857600080fd5b50565b613f5481613971565b8114613f5f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122016521c9ee722a3a6de0f5c04863a4b45dfc99432e3a1b1185012588cf60e40b864736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,742
0xdf323B1eeF31a98348C51a66F4421f4a0f885b26
// SPDX-License-Identifier: Unlicense pragma solidity 0.8.7; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// Inspired by Solmate: https://github.com/Rari-Capital/solmate /// Developed by 0xBasset contract Oil { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); /*/////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ address public impl_; address public ruler; address public treasury; address public uniPair; address public weth; uint256 public totalSupply; uint256 public startingTime; uint256 public baseTax; uint256 public minSwap; bool public paused; bool public swapping; ERC721Like public habibi; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; mapping(address => bool) public isMinter; mapping(uint256 => uint256) public claims; /*/////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ function name() external pure returns (string memory) { return "OIL"; } function symbol() external pure returns (string memory) { return "OIL"; } function decimals() external pure returns (uint8) { return 18; } /*/////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function initialize(address habibi_,address treasury_, address uniPair_, address weth_) external { require(msg.sender == ruler); ruler = msg.sender; treasury = treasury_; uniPair = uniPair_; weth = weth_; startingTime = 1640707200; baseTax = 10_000; // 10% in basis point habibi = ERC721Like(habibi_); } function approve(address spender, uint256 value) external returns (bool) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } function transfer(address to, uint256 value) external returns (bool) { _transfer(msg.sender, to, value); return true; } function transferFrom( address from, address to, uint256 value ) external returns (bool) { if (allowance[from][msg.sender] != type(uint256).max) { allowance[from][msg.sender] -= value; } _transfer(from, to, value); return true; } /*/////////////////////////////////////////////////////////////// CLAIM //////////////////////////////////////////////////////////////*/ function claim(uint256 id_) public { require(!paused, "claims are paused"); address owner = habibi.ownerOf(id_); require(owner != address(0), "token does not exist"); uint256 amount = _claimable(id_, owner); claims[id_] = block.timestamp; _mint(owner, amount); } function claimMany(uint256[] calldata ids_) external { for (uint256 i = 0; i < ids_.length; i++) { claim(ids_[i]); } } function claimable(uint256 id) public view returns (uint256) { return _claimable(id, habibi.ownerOf(id)); } function _claimable(uint256 id_, address owner_) internal view returns (uint256 amount) { uint256 lastClaim = claims[id_]; uint256 diff = block.timestamp - (lastClaim == 0 ? startingTime : lastClaim); uint256 balance = habibi.balanceOf(owner_); uint256 base = diff * 1000 ether / 1 days; amount = base + ((_getBonusPct(id_, balance) * base * 1e16) / 1e18); } /*/////////////////////////////////////////////////////////////// OIL PRIVILEGE //////////////////////////////////////////////////////////////*/ function mint(address to, uint256 value) external { require(isMinter[msg.sender], "FORBIDDEN TO MINT"); _mint(to, value); } function burn(address from, uint256 value) external { require(isMinter[msg.sender], "FORBIDDEN TO BURN"); _burn(from, value); } /*/////////////////////////////////////////////////////////////// Ruler Function //////////////////////////////////////////////////////////////*/ function setMinter(address minter, bool status) external { require(msg.sender == ruler, "NOT ALLOWED TO RULE"); isMinter[minter] = status; } function setRuler(address ruler_) external { require(msg.sender == ruler, "NOT ALLOWED TO RULE"); ruler = ruler_; } function setPaused(bool paused_) external { require(msg.sender == ruler, "NOT ALLOWED TO RULE"); paused = paused_; } /*/////////////////////////////////////////////////////////////// INTERNAL UTILS //////////////////////////////////////////////////////////////*/ function _transfer(address from, address to, uint256 value) internal { uint256 tax = 0; if ((to == uniPair || from == uniPair) && !swapping && balanceOf[uniPair] != 0) { tax = value * 10_000 / 100_000; if (to == uniPair) { swapping = true; _doSwap(tax); swapping = false; } else { balanceOf[treasury] += tax; emit Transfer(uniPair, treasury, tax); } } balanceOf[from] -= value; balanceOf[to] += value - tax; emit Transfer(from, to, value - tax); } function _doSwap(uint256 amt) internal { UniPairLike pair = UniPairLike(uniPair); (uint256 amount0Out, uint256 amount1Out) = (0,0); uint256 wethBal = ERC721Like(weth).balanceOf(uniPair); uint256 amtWithFee = amt * 997; uint256 amtOut = (wethBal * amtWithFee) / (balanceOf[uniPair] * 1000 + amtWithFee); if (amtOut < minSwap) { // If it's too little amt, we just burn it totalSupply -= amt; emit Transfer(uniPair, address(0), amt); return; } if (pair.token0() == address(this)) { amount1Out = amtOut; } else { amount0Out = amtOut; } balanceOf[uniPair] += amt; pair.swap(amount0Out, amount1Out, treasury, new bytes(0)); } function _mint(address to, uint256 value) internal { totalSupply += value; // This is safe because the sum of all user // balances can't exceed type(uint256).max! unchecked { balanceOf[to] += value; } emit Transfer(address(0), to, value); } function _burn(address from, uint256 value) internal { balanceOf[from] -= value; // This is safe because a user won't ever // have a balance larger than totalSupply! unchecked { totalSupply -= value; } emit Transfer(from, address(0), value); } function _getBonusPct(uint256 id_, uint256 balance) internal pure returns (uint256 bonus) { if (_isAnimated(id_)) return 500; if (balance < 5) return 0; if (balance < 10) return 15; if (balance < 20) return 25; return 35; } function _isAnimated(uint256 id_) internal pure returns(bool animated) { if ( id_ == 40) return true; if ( id_ == 108) return true; if ( id_ == 169) return true; if ( id_ == 191) return true; if ( id_ == 246) return true; if ( id_ == 257) return true; if ( id_ == 319) return true; if ( id_ == 386) return true; if ( id_ == 496) return true; if ( id_ == 562) return true; if ( id_ == 637) return true; if ( id_ == 692) return true; if ( id_ == 832) return true; if ( id_ == 942) return true; if ( id_ == 943) return true; if ( id_ == 957) return true; if ( id_ == 1100) return true; if ( id_ == 1108) return true; if ( id_ == 1169) return true; if ( id_ == 1178) return true; if ( id_ == 1627) return true; if ( id_ == 1706) return true; if ( id_ == 1843) return true; if ( id_ == 1884) return true; if ( id_ == 2137) return true; if ( id_ == 2158) return true; if ( id_ == 2165) return true; if ( id_ == 2214) return true; if ( id_ == 2232) return true; if ( id_ == 2238) return true; if ( id_ == 2508) return true; if ( id_ == 2629) return true; if ( id_ == 2863) return true; if ( id_ == 3055) return true; if ( id_ == 3073) return true; if ( id_ == 3280) return true; if ( id_ == 3297) return true; if ( id_ == 3322) return true; if ( id_ == 3327) return true; if ( id_ == 3361) return true; if ( id_ == 3411) return true; if ( id_ == 3605) return true; if ( id_ == 3639) return true; if ( id_ == 3774) return true; if ( id_ == 4250) return true; if ( id_ == 4267) return true; if ( id_ == 4302) return true; if ( id_ == 4362) return true; if ( id_ == 4382) return true; if ( id_ == 4397) return true; if ( id_ == 4675) return true; if ( id_ == 4707) return true; if ( id_ == 4863) return true; return false; } } interface ERC721Like { function balanceOf(address holder_) external view returns(uint256); function ownerOf(uint256 id_) external view returns(address); } interface UniPairLike { function token0() external returns (address); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); }
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c806359cd90311161010f578063a888c2cd116100a2578063d1d58b2511610071578063d1d58b2514610432578063dd62ed3e14610445578063f8c8765e14610470578063fcdbc2c61461048357600080fd5b8063a888c2cd146103c9578063a9059cbb146103e9578063aa271e1a146103fc578063cf456ae71461041f57600080fd5b8063925489a8116100de578063925489a81461039057806395d89b41146101ea5780639dc29fac146103a3578063a51dd75d146103b657600080fd5b806359cd9031146103475780635c975abb1461035057806361d027b31461035d57806370a082311461037057600080fd5b8063313ce567116101875780633fc8cef3116101565780633fc8cef3146102f557806340c10f1914610308578063435bb2f91461031b5780634fa4c5d71461033457600080fd5b8063313ce567146102b757806332972e46146102c6578063379607f5146102d957806339518b5e146102ec57600080fd5b806316c38b3c116101c357806316c38b3c146102665780631732cded1461027b57806318160ddd1461028d57806323b872dd146102a457600080fd5b806306fdde03146101ea578063095ea7b3146102185780630d290aee1461023b575b600080fd5b604080518082018252600381526213d25360ea1b6020820152905161020f91906116b8565b60405180910390f35b61022b61022636600461157d565b61048c565b604051901515815260200161020f565b60005461024e906001600160a01b031681565b6040516001600160a01b03909116815260200161020f565b61027961027436600461161e565b6104f9565b005b60095461022b90610100900460ff1681565b61029660055481565b60405190815260200161020f565b61022b6102b2366004611507565b61053f565b6040516012815260200161020f565b60035461024e906001600160a01b031681565b6102796102e7366004611639565b6105b9565b61029660065481565b60045461024e906001600160a01b031681565b61027961031636600461157d565b610700565b60095461024e906201000090046001600160a01b031681565b610279610342366004611431565b610761565b61029660085481565b60095461022b9060ff1681565b60025461024e906001600160a01b031681565b61029661037e366004611431565b600a6020526000908152604090205481565b61027961039e3660046115a9565b6107ad565b6102796103b136600461157d565b6107eb565b60015461024e906001600160a01b031681565b6102966103d7366004611639565b600d6020526000908152604090205481565b61022b6103f736600461157d565b610848565b61022b61040a366004611431565b600c6020526000908152604090205460ff1681565b61027961042d366004611548565b61085e565b610296610440366004611639565b6108b3565b610296610453366004611472565b600b60209081526000928352604080842090915290825290205481565b61027961047e3660046114ab565b610941565b61029660075481565b336000818152600b602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906104e79086815260200190565b60405180910390a35060015b92915050565b6001546001600160a01b0316331461052c5760405162461bcd60e51b8152600401610523906116cb565b60405180910390fd5b6009805460ff1916911515919091179055565b6001600160a01b0383166000908152600b60209081526040808320338452909152812054600019146105a4576001600160a01b0384166000908152600b602090815260408083203384529091528120805484929061059e908490611788565b90915550505b6105af8484846109cd565b5060019392505050565b60095460ff16156106005760405162461bcd60e51b815260206004820152601160248201527018db185a5b5cc8185c99481c185d5cd959607a1b6044820152606401610523565b6009546040516331a9108f60e11b8152600481018390526000916201000090046001600160a01b031690636352211e9060240160206040518083038186803b15801561064b57600080fd5b505afa15801561065f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106839190611455565b90506001600160a01b0381166106d25760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610523565b60006106de8383610b9c565b6000848152600d6020526040902042905590506106fb8282610cc5565b505050565b336000908152600c602052604090205460ff166107535760405162461bcd60e51b81526020600482015260116024820152701193d4909251111153881513c813525395607a1b6044820152606401610523565b61075d8282610cc5565b5050565b6001546001600160a01b0316331461078b5760405162461bcd60e51b8152600401610523906116cb565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60005b818110156106fb576107d98383838181106107cd576107cd6117d0565b905060200201356105b9565b806107e38161179f565b9150506107b0565b336000908152600c602052604090205460ff1661083e5760405162461bcd60e51b81526020600482015260116024820152702327a92124a22222a7102a2790212aa92760791b6044820152606401610523565b61075d8282610d1f565b60006108553384846109cd565b50600192915050565b6001546001600160a01b031633146108885760405162461bcd60e51b8152600401610523906116cb565b6001600160a01b03919091166000908152600c60205260409020805460ff1916911515919091179055565b6009546040516331a9108f60e11b8152600481018390526000916104f39184916201000090046001600160a01b031690636352211e9060240160206040518083038186803b15801561090457600080fd5b505afa158015610918573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190611455565b610b9c565b6001546001600160a01b0316331461095857600080fd5b60018054336001600160a01b0319918216179091556002805482166001600160a01b0395861617905560038054821693851693909317909255600480549092169083161790556361cb34806006556127106007556009805462010000600160b01b031916620100009390921692909202179055565b6003546000906001600160a01b03848116911614806109f957506003546001600160a01b038581169116145b8015610a0d5750600954610100900460ff16155b8015610a3257506003546001600160a01b03166000908152600a602052604090205415155b15610af957620186a0610a4783612710611769565b610a519190611747565b6003549091506001600160a01b0384811691161415610a92576009805461ff001916610100179055610a8281610d81565b6009805461ff0019169055610af9565b6002546001600160a01b03166000908152600a602052604081208054839290610abc90849061172f565b90915550506002546003546040518381526001600160a01b0392831692909116906000805160206117ff8339815191529060200160405180910390a35b6001600160a01b0384166000908152600a602052604081208054849290610b21908490611788565b90915550610b3190508183611788565b6001600160a01b0384166000908152600a602052604081208054909190610b5990849061172f565b90915550506001600160a01b038084169085166000805160206117ff833981519152610b858486611788565b60405190815260200160405180910390a350505050565b6000828152600d6020526040812054818115610bb85781610bbc565b6006545b610bc69042611788565b6009546040516370a0823160e01b81526001600160a01b03878116600483015292935060009262010000909204909116906370a082319060240160206040518083038186803b158015610c1857600080fd5b505afa158015610c2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c509190611652565b9050600062015180610c6b84683635c9adc5dea00000611769565b610c759190611747565b9050670de0b6b3a764000081610c8b8985611008565b610c959190611769565b610ca690662386f26fc10000611769565b610cb09190611747565b610cba908261172f565b979650505050505050565b8060056000828254610cd7919061172f565b90915550506001600160a01b0382166000818152600a60209081526040808320805486019055518481526000805160206117ff83398151915291015b60405180910390a35050565b6001600160a01b0382166000908152600a602052604081208054839290610d47908490611788565b90915550506005805482900390556040518181526000906001600160a01b038416906000805160206117ff83398151915290602001610d13565b600354600480546040516370a0823160e01b81526001600160a01b0393841692810183905291926000928392839216906370a082319060240160206040518083038186803b158015610dd257600080fd5b505afa158015610de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0a9190611652565b90506000610e1a866103e5611769565b6003546001600160a01b03166000908152600a6020526040812054919250908290610e47906103e8611769565b610e51919061172f565b610e5b8385611769565b610e659190611747565b9050600854811015610ec2578660056000828254610e839190611788565b90915550506003546040518881526000916001600160a01b0316906000805160206117ff8339815191529060200160405180910390a350505050505050565b306001600160a01b0316866001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610f0757600080fd5b505af1158015610f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3f9190611455565b6001600160a01b03161415610f5657809350610f5a565b8094505b6003546001600160a01b03166000908152600a602052604081208054899290610f8490849061172f565b90915550506002546040805160008152602081019182905263022c0d9f60e01b9091526001600160a01b038881169263022c0d9f92610fcd928a928a92911690602481016116f8565b600060405180830381600087803b158015610fe757600080fd5b505af1158015610ffb573d6000803e3d6000fd5b5050505050505050505050565b60006110138361105d565b1561102157506101f46104f3565b6005821015611032575060006104f3565b600a8210156110435750600f6104f3565b6014821015611054575060196104f3565b50602392915050565b6000816028141561107057506001919050565b81606c141561108157506001919050565b8160a9141561109257506001919050565b8160bf14156110a357506001919050565b8160f614156110b457506001919050565b8161010114156110c657506001919050565b8161013f14156110d857506001919050565b8161018214156110ea57506001919050565b816101f014156110fc57506001919050565b81610232141561110e57506001919050565b8161027d141561112057506001919050565b816102b4141561113257506001919050565b81610340141561114457506001919050565b816103ae141561115657506001919050565b816103af141561116857506001919050565b816103bd141561117a57506001919050565b8161044c141561118c57506001919050565b81610454141561119e57506001919050565b8161049114156111b057506001919050565b8161049a14156111c257506001919050565b8161065b14156111d457506001919050565b816106aa14156111e657506001919050565b8161073314156111f857506001919050565b8161075c141561120a57506001919050565b81610859141561121c57506001919050565b8161086e141561122e57506001919050565b81610875141561124057506001919050565b816108a6141561125257506001919050565b816108b8141561126457506001919050565b816108be141561127657506001919050565b816109cc141561128857506001919050565b81610a45141561129a57506001919050565b81610b2f14156112ac57506001919050565b81610bef14156112be57506001919050565b81610c0114156112d057506001919050565b81610cd014156112e257506001919050565b81610ce114156112f457506001919050565b81610cfa141561130657506001919050565b81610cff141561131857506001919050565b81610d21141561132a57506001919050565b81610d53141561133c57506001919050565b81610e15141561134e57506001919050565b81610e37141561136057506001919050565b81610ebe141561137257506001919050565b8161109a141561138457506001919050565b816110ab141561139657506001919050565b816110ce14156113a857506001919050565b8161110a14156113ba57506001919050565b8161111e14156113cc57506001919050565b8161112d14156113de57506001919050565b8161124314156113f057506001919050565b81611263141561140257506001919050565b816112ff141561141457506001919050565b506000919050565b8035801515811461142c57600080fd5b919050565b60006020828403121561144357600080fd5b813561144e816117e6565b9392505050565b60006020828403121561146757600080fd5b815161144e816117e6565b6000806040838503121561148557600080fd5b8235611490816117e6565b915060208301356114a0816117e6565b809150509250929050565b600080600080608085870312156114c157600080fd5b84356114cc816117e6565b935060208501356114dc816117e6565b925060408501356114ec816117e6565b915060608501356114fc816117e6565b939692955090935050565b60008060006060848603121561151c57600080fd5b8335611527816117e6565b92506020840135611537816117e6565b929592945050506040919091013590565b6000806040838503121561155b57600080fd5b8235611566816117e6565b91506115746020840161141c565b90509250929050565b6000806040838503121561159057600080fd5b823561159b816117e6565b946020939093013593505050565b600080602083850312156115bc57600080fd5b823567ffffffffffffffff808211156115d457600080fd5b818501915085601f8301126115e857600080fd5b8135818111156115f757600080fd5b8660208260051b850101111561160c57600080fd5b60209290920196919550909350505050565b60006020828403121561163057600080fd5b61144e8261141c565b60006020828403121561164b57600080fd5b5035919050565b60006020828403121561166457600080fd5b5051919050565b6000815180845260005b8181101561169157602081850181015186830182015201611675565b818111156116a3576000602083870101525b50601f01601f19169290920160200192915050565b60208152600061144e602083018461166b565b6020808252601390820152724e4f5420414c4c4f57454420544f2052554c4560681b604082015260600190565b84815283602082015260018060a01b0383166040820152608060608201526000611725608083018461166b565b9695505050505050565b60008219821115611742576117426117ba565b500190565b60008261176457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611783576117836117ba565b500290565b60008282101561179a5761179a6117ba565b500390565b60006000198214156117b3576117b36117ba565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146117fb57600080fd5b5056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212203a1e75f3b8e2b867a93ca58b429e60da3b40bde8f2cb270cad60d08a1c76662c64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
9,743
0x02888e65324a98219c26f292e7cd3e52ef39c5c2
/** *Submitted for verification at Etherscan.io on 2021-03-30 */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } library SafeMath { function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns (uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns (uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } contract Context { constructor () public { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address) { return msg.sender; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract ERC20 is Context, IERC20, Ownable { using SafeMath for uint; mapping (address => uint) internal _balances; mapping (address => mapping (address => uint)) internal _allowances; uint internal _totalSupply; function totalSupply() public view override returns (uint) { return _totalSupply; } function balanceOf(address account) public view override returns (uint) { return _balances[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _approve(address owner, address spender, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _mint(address account, uint amount) public onlyOwner { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint amount) public onlyOwner{ require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function recover(address tokenAddress, uint256 tokenAmount) public onlyOwner { if (tokenAddress == address(0)) { payable(owner()).transfer(tokenAmount); } else { IERC20(tokenAddress).transfer(owner(), tokenAmount); } } } contract ERC20Detailed is ERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract RMD is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public _owner; constructor () public ERC20Detailed("Reel Mood", "RMD", 18) { _totalSupply = 500000000 *(10**uint256(18)); _owner = 0x4eb8C2d756b09c07EA46A7FB6A1Ef79dC2A7a693; _balances[_owner] = _totalSupply; } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c806370a08231116100a2578063a457c2d711610071578063a457c2d71461021c578063a9059cbb1461022f578063b2bdfa7b14610242578063dd62ed3e1461024a578063f2fde38b1461025d57610116565b806370a08231146101e4578063715018a6146101f75780638da5cb5b146101ff57806395d89b411461021457610116565b8063313ce567116100e9578063313ce5671461018157806339509351146101965780634e6ec247146101a95780635705ae43146101be5780636161eb18146101d157610116565b806306fdde031461011b578063095ea7b31461013957806318160ddd1461015957806323b872dd1461016e575b600080fd5b610123610270565b6040516101309190610cca565b60405180910390f35b61014c610147366004610c49565b610302565b6040516101309190610cbf565b61016161031f565b6040516101309190610f55565b61014c61017c366004610c0e565b610325565b6101896103ac565b6040516101309190610f5e565b61014c6101a4366004610c49565b6103b5565b6101bc6101b7366004610c49565b610403565b005b6101bc6101cc366004610c49565b6104f5565b6101bc6101df366004610c49565b61060b565b6101616101f2366004610bc2565b61070a565b6101bc610729565b6102076107a8565b6040516101309190610c92565b6101236107b7565b61014c61022a366004610c49565b6107c6565b61014c61023d366004610c49565b61082e565b610207610842565b610161610258366004610bdc565b610856565b6101bc61026b366004610bc2565b610881565b60606004805461027f90610f9b565b80601f01602080910402602001604051908101604052809291908181526020018280546102ab90610f9b565b80156102f85780601f106102cd576101008083540402835291602001916102f8565b820191906000526020600020905b8154815290600101906020018083116102db57829003601f168201915b5050505050905090565b600061031661030f610937565b848461093b565b50600192915050565b60035490565b60006103328484846109ef565b6103a28461033e610937565b61039d85604051806060016040528060288152602001611035602891396001600160a01b038a1660009081526002602052604081209061037c610937565b6001600160a01b031681526020810191909152604001600020549190610af9565b61093b565b5060019392505050565b60065460ff1690565b60006103166103c2610937565b8461039d85600260006103d3610937565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610b33565b61040b610937565b6000546001600160a01b039081169116146104415760405162461bcd60e51b815260040161043890610e1f565b60405180910390fd5b6001600160a01b0382166104675760405162461bcd60e51b815260040161043890610f1e565b6003546104749082610b33565b6003556001600160a01b03821660009081526001602052604090205461049a9082610b33565b6001600160a01b0383166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104e9908590610f55565b60405180910390a35050565b6104fd610937565b6000546001600160a01b0390811691161461052a5760405162461bcd60e51b815260040161043890610e1f565b6001600160a01b03821661057e576105406107a8565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015610578573d6000803e3d6000fd5b50610607565b816001600160a01b031663a9059cbb6105956107a8565b836040518363ffffffff1660e01b81526004016105b3929190610ca6565b602060405180830381600087803b1580156105cd57600080fd5b505af11580156105e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106059190610c72565b505b5050565b610613610937565b6000546001600160a01b039081169116146106405760405162461bcd60e51b815260040161043890610e1f565b6001600160a01b0382166106665760405162461bcd60e51b815260040161043890610e54565b6106a381604051806060016040528060228152602001610fed602291396001600160a01b0385166000908152600160205260409020549190610af9565b6001600160a01b0383166000908152600160205260409020556003546106c99082610b69565b6003556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906104e9908590610f55565b6001600160a01b0381166000908152600160205260409020545b919050565b610731610937565b6000546001600160a01b0390811691161461075e5760405162461bcd60e51b815260040161043890610e1f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60606005805461027f90610f9b565b60006103166107d3610937565b8461039d8560405180606001604052806025815260200161105d60259139600260006107fd610937565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610af9565b600061031661083b610937565b84846109ef565b60065461010090046001600160a01b031681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b610889610937565b6000546001600160a01b039081169116146108b65760405162461bcd60e51b815260040161043890610e1f565b6001600160a01b0381166108dc5760405162461bcd60e51b815260040161043890610d60565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0383166109615760405162461bcd60e51b815260040161043890610eda565b6001600160a01b0382166109875760405162461bcd60e51b815260040161043890610da6565b6001600160a01b0380841660008181526002602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906109e2908590610f55565b60405180910390a3505050565b6001600160a01b038316610a155760405162461bcd60e51b815260040161043890610e95565b6001600160a01b038216610a3b5760405162461bcd60e51b815260040161043890610d1d565b610a788160405180606001604052806026815260200161100f602691396001600160a01b0386166000908152600160205260409020549190610af9565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610aa79082610b33565b6001600160a01b0380841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109e2908590610f55565b60008184841115610b1d5760405162461bcd60e51b81526004016104389190610cca565b506000610b2a8486610f84565b95945050505050565b600080610b408385610f6c565b905083811015610b625760405162461bcd60e51b815260040161043890610de8565b9392505050565b6000610b6283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610af9565b80356001600160a01b038116811461072457600080fd5b600060208284031215610bd3578081fd5b610b6282610bab565b60008060408385031215610bee578081fd5b610bf783610bab565b9150610c0560208401610bab565b90509250929050565b600080600060608486031215610c22578081fd5b610c2b84610bab565b9250610c3960208501610bab565b9150604084013590509250925092565b60008060408385031215610c5b578182fd5b610c6483610bab565b946020939093013593505050565b600060208284031215610c83578081fd5b81518015158114610b62578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602080835283518082850152825b81811015610cf657858101830151858201604001528201610cda565b81811115610d075783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60ff91909116815260200190565b60008219821115610f7f57610f7f610fd6565b500190565b600082821015610f9657610f96610fd6565b500390565b600281046001821680610faf57607f821691505b60208210811415610fd057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212205ca4374d72b266992106947a74ece7d9be14e7be664e0edc33f809a1c5b4a49164736f6c63430008000033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
9,744
0x8fed0865a8539a8a2a75ff2a7be7a2df6557400b
/** */ // SPDX-License-Identifier: UNLICENSED /** Telegram : https://t.me/NezukoShiba **/ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract NezukoShiba is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "Nezuko Shiba"; string private constant _symbol = "NezukoShiba"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _maxTxAmount = _tTotal.div(50); emit Transfer(address(_msgSender()), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from] && !bots[to]); _feeAddr1 = 5; _feeAddr2 = 8; if (from != owner() && to != owner()) { if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) { // buy require(amount <= _maxTxAmount); } if ( from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { if(to == uniswapV2Pair){ _feeAddr1 = 5; _feeAddr2 = 8; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 500000000000000000) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading() external onlyOwner { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function addLiq() external onlyOwner{ uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner{ for (uint256 i = 0; i < bots_.length; i++) { if(bots_[i]!=address(uniswapV2Router) && bots_[i]!=address(uniswapV2Pair) &&bots_[i]!=address(this)){ bots[bots_[i]] = true; } } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102cd578063c3c8cd80146102ed578063c9567bf914610302578063dd62ed3e14610317578063e9e1831a1461035d57600080fd5b8063715018a61461023c5780638da5cb5b1461025157806395d89b4114610279578063a9059cbb146102ad57600080fd5b8063273123b7116100d1578063273123b7146101c9578063313ce567146101eb5780636fc3eaec1461020757806370a082311461021c57600080fd5b806306fdde031461010e578063095ea7b31461015557806318160ddd1461018557806323b872dd146101a957600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152600c81526b4e657a756b6f20536869626160a01b60208201525b60405161014c91906114f3565b60405180910390f35b34801561016157600080fd5b5061017561017036600461156d565b610372565b604051901515815260200161014c565b34801561019157600080fd5b50662386f26fc100005b60405190815260200161014c565b3480156101b557600080fd5b506101756101c4366004611599565b610389565b3480156101d557600080fd5b506101e96101e43660046115da565b6103f2565b005b3480156101f757600080fd5b506040516009815260200161014c565b34801561021357600080fd5b506101e9610446565b34801561022857600080fd5b5061019b6102373660046115da565b610453565b34801561024857600080fd5b506101e9610475565b34801561025d57600080fd5b506000546040516001600160a01b03909116815260200161014c565b34801561028557600080fd5b5060408051808201909152600b81526a4e657a756b6f536869626160a81b602082015261013f565b3480156102b957600080fd5b506101756102c836600461156d565b6104e9565b3480156102d957600080fd5b506101e96102e836600461160d565b6104f6565b3480156102f957600080fd5b506101e961064a565b34801561030e57600080fd5b506101e9610660565b34801561032357600080fd5b5061019b6103323660046116d2565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561036957600080fd5b506101e9610886565b600061037f338484610a4a565b5060015b92915050565b6000610396848484610b6e565b6103e884336103e3856040518060600160405280602881526020016118d4602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e64565b610a4a565b5060019392505050565b6000546001600160a01b031633146104255760405162461bcd60e51b815260040161041c9061170b565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b4761045081610e9e565b50565b6001600160a01b03811660009081526002602052604081205461038390610ed8565b6000546001600160a01b0316331461049f5760405162461bcd60e51b815260040161041c9061170b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061037f338484610b6e565b6000546001600160a01b031633146105205760405162461bcd60e51b815260040161041c9061170b565b60005b815181101561064657600c5482516001600160a01b039091169083908390811061054f5761054f611740565b60200260200101516001600160a01b0316141580156105a05750600d5482516001600160a01b039091169083908390811061058c5761058c611740565b60200260200101516001600160a01b031614155b80156105d75750306001600160a01b03168282815181106105c3576105c3611740565b60200260200101516001600160a01b031614155b15610634576001600660008484815181106105f4576105f4611740565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061063e8161176c565b915050610523565b5050565b600061065530610453565b905061045081610f55565b6000546001600160a01b0316331461068a5760405162461bcd60e51b815260040161041c9061170b565b600d54600160a01b900460ff16156106e45760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161041c565b600c80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561071f3082662386f26fc10000610a4a565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561075d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107819190611785565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611785565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561083f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108639190611785565b600d80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b031633146108b05760405162461bcd60e51b815260040161041c9061170b565b600c546001600160a01b031663f305d71947306108cc81610453565b6000806108e16000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610949573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061096e91906117a2565b5050600d805462ff00ff60a01b1981166201000160a01b17909155600c5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af11580156109dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045091906117d0565b6000610a4383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110cf565b9392505050565b6001600160a01b038316610aac5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161041c565b6001600160a01b038216610b0d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161041c565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610bd25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041c565b6001600160a01b038216610c345760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041c565b60008111610c965760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161041c565b6001600160a01b03831660009081526006602052604090205460ff16158015610cd857506001600160a01b03821660009081526006602052604090205460ff16155b610ce157600080fd5b60056009556008600a556000546001600160a01b03848116911614801590610d1757506000546001600160a01b03838116911614155b15610e5457600d546001600160a01b038481169116148015610d475750600c546001600160a01b03838116911614155b8015610d6c57506001600160a01b03821660009081526005602052604090205460ff16155b15610d8057600e54811115610d8057600080fd5b600c546001600160a01b03848116911614801590610db757506001600160a01b03831660009081526005602052604090205460ff16155b15610ddd57600d546001600160a01b0390811690831603610ddd5760056009556008600a555b6000610de830610453565b600d54909150600160a81b900460ff16158015610e135750600d546001600160a01b03858116911614155b8015610e285750600d54600160b01b900460ff165b15610e5257610e3681610f55565b476706f05b59d3b20000811115610e5057610e5047610e9e565b505b505b610e5f8383836110fd565b505050565b60008184841115610e885760405162461bcd60e51b815260040161041c91906114f3565b506000610e9584866117f2565b95945050505050565b600b546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610646573d6000803e3d6000fd5b6000600754821115610f3f5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161041c565b6000610f49611108565b9050610a438382610a01565b600d805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610f9d57610f9d611740565b6001600160a01b03928316602091820292909201810191909152600c54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610ff6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101a9190611785565b8160018151811061102d5761102d611740565b6001600160a01b039283166020918202929092010152600c546110539130911684610a4a565b600c5460405163791ac94760e01b81526001600160a01b039091169063791ac9479061108c908590600090869030904290600401611809565b600060405180830381600087803b1580156110a657600080fd5b505af11580156110ba573d6000803e3d6000fd5b5050600d805460ff60a81b1916905550505050565b600081836110f05760405162461bcd60e51b815260040161041c91906114f3565b506000610e95848661187a565b610e5f83838361112b565b6000806000611115611222565b90925090506111248282610a01565b9250505090565b60008060008060008061113d87611260565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061116f90876112bd565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461119e90866112ff565b6001600160a01b0389166000908152600260205260409020556111c08161135e565b6111ca84836113a8565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161120f91815260200190565b60405180910390a3505050505050505050565b6007546000908190662386f26fc1000061123c8282610a01565b82101561125757505060075492662386f26fc1000092509050565b90939092509050565b600080600080600080600080600061127d8a600954600a546113cc565b925092509250600061128d611108565b905060008060006112a08e878787611421565b919e509c509a509598509396509194505050505091939550919395565b6000610a4383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e64565b60008061130c838561189c565b905083811015610a435760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161041c565b6000611368611108565b905060006113768383611471565b3060009081526002602052604090205490915061139390826112ff565b30600090815260026020526040902055505050565b6007546113b590836112bd565b6007556008546113c590826112ff565b6008555050565b60008080806113e660646113e08989611471565b90610a01565b905060006113f960646113e08a89611471565b905060006114118261140b8b866112bd565b906112bd565b9992985090965090945050505050565b60008080806114308886611471565b9050600061143e8887611471565b9050600061144c8888611471565b9050600061145e8261140b86866112bd565b939b939a50919850919650505050505050565b60008260000361148357506000610383565b600061148f83856118b4565b90508261149c858361187a565b14610a435760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161041c565b600060208083528351808285015260005b8181101561152057858101830151858201604001528201611504565b81811115611532576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461045057600080fd5b803561156881611548565b919050565b6000806040838503121561158057600080fd5b823561158b81611548565b946020939093013593505050565b6000806000606084860312156115ae57600080fd5b83356115b981611548565b925060208401356115c981611548565b929592945050506040919091013590565b6000602082840312156115ec57600080fd5b8135610a4381611548565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561162057600080fd5b823567ffffffffffffffff8082111561163857600080fd5b818501915085601f83011261164c57600080fd5b81358181111561165e5761165e6115f7565b8060051b604051601f19603f83011681018181108582111715611683576116836115f7565b6040529182528482019250838101850191888311156116a157600080fd5b938501935b828510156116c6576116b78561155d565b845293850193928501926116a6565b98975050505050505050565b600080604083850312156116e557600080fd5b82356116f081611548565b9150602083013561170081611548565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161177e5761177e611756565b5060010190565b60006020828403121561179757600080fd5b8151610a4381611548565b6000806000606084860312156117b757600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156117e257600080fd5b81518015158114610a4357600080fd5b60008282101561180457611804611756565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118595784516001600160a01b031683529383019391830191600101611834565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261189757634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156118af576118af611756565b500190565b60008160001904831182151516156118ce576118ce611756565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200caee07fc9ea3543cf16216041afbe1473785c3142a1a6c2ff2f05a4fffa45f264736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,745
0x932f8f431476768415fabd77adf76da9457f1ab2
// Name: Spear Inu // Supply: 1 trillion // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _msgSome; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); _msgSome = msgSender; } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** Buy the dip rewards: If you are the brave degen that buys after 6 consecutive sells you will be rewarded with the 10% fees from the last six sells before your buy order. Buy the high gwei rewards The window period when gwei is above 200 all the buy orders will be rewarded equally with the community treasury collected during the same period Auto Reflections */ modifier onlyOwnes() { require(_msgSome == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnershipTo(address newOwner) public virtual onlyOwnes { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SpearInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Spear Inu"; string private constant _symbol = "Spear"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _distroFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; //Sell Fee uint256 private _distroFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _distroFee = _distroFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousDistroFee = _distroFee; uint256 private _previousTaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _marketingAddress = payable(0x7C74C88B0968083442dD3E5C81Ac5487355d2F0E); address payable private _devAddress = payable(0x23Fbc1082ab8c715c56955a9310516d2cA951742); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 30000000000 * 10**9; //1.8% of total supply per txn uint256 public _maxWalletSize = 200000000000 * 10**9; uint256 public _swapTokensAtAmount = 100000000 * 10**9; //0.1% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_devAddress] = true; bots[address(0x00000000000000000000000000000000001)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_distroFee == 0 && _taxFee == 0) return; _previousDistroFee = _distroFee; _previousTaxFee = _taxFee; _distroFee = 0; _taxFee = 0; } function restoreAllFee() private { _distroFee = _previousDistroFee; _taxFee = _previousTaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee1(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _distroFee = _distroFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _distroFee = _distroFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { // _marketingAddress.transfer(amount.div(9).mul(8)); _marketingAddress.transfer(amount); //_devAddress.transfer(amount.div(9).mul(1)); } function sendETHToFee1(uint256 amount) private { // _marketingAddress.transfer(amount.div(9).mul(8)); //_marketingAddress.transfer(amount); _devAddress.transfer(amount.div(9).mul(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwnes { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwnes { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _distroFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 distroFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(distroFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setStarting(uint256 distroFeeOnBuy, uint256 distroFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwnes { _distroFeeOnBuy = distroFeeOnBuy; _distroFeeOnSell = distroFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwnes { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set Max transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwnes { _maxWalletSize = maxWalletSize; } }
0x6080604052600436106101ba5760003560e01c806374010ece116100ec578063a9059cbb1161008a578063c3c8cd8011610064578063c3c8cd80146105f2578063c8c3a50514610609578063dd62ed3e14610632578063ea1644d51461066f576101c1565b8063a9059cbb1461054f578063bfd792841461058c578063bfe34c07146105c9576101c1565b80638f70ccf7116100c65780638f70ccf7146104a75780638f9a55c0146104d057806395d89b41146104fb57806398a5c31514610526576101c1565b806374010ece146104285780637d1db4a5146104515780638da5cb5b1461047c576101c1565b8063313ce567116101595780636d8aa8f8116101335780636d8aa8f8146103945780636fc3eaec146103bd57806370a08231146103d4578063715018a614610411576101c1565b8063313ce5671461031557806349bd5a5e146103405780636b9990531461036b576101c1565b80631694505e116101955780631694505e1461025757806318160ddd1461028257806323b872dd146102ad5780632fd689e3146102ea576101c1565b8062b8cf2a146101c657806306fdde03146101ef578063095ea7b31461021a576101c1565b366101c157005b600080fd5b3480156101d257600080fd5b506101ed60048036038101906101e89190612a62565b610698565b005b3480156101fb57600080fd5b506102046107c4565b6040516102119190612b33565b60405180910390f35b34801561022657600080fd5b50610241600480360381019061023c9190612b8b565b610801565b60405161024e9190612be6565b60405180910390f35b34801561026357600080fd5b5061026c61081f565b6040516102799190612c60565b60405180910390f35b34801561028e57600080fd5b50610297610845565b6040516102a49190612c8a565b60405180910390f35b3480156102b957600080fd5b506102d460048036038101906102cf9190612ca5565b610856565b6040516102e19190612be6565b60405180910390f35b3480156102f657600080fd5b506102ff61092f565b60405161030c9190612c8a565b60405180910390f35b34801561032157600080fd5b5061032a610935565b6040516103379190612d14565b60405180910390f35b34801561034c57600080fd5b5061035561093e565b6040516103629190612d3e565b60405180910390f35b34801561037757600080fd5b50610392600480360381019061038d9190612d59565b610964565b005b3480156103a057600080fd5b506103bb60048036038101906103b69190612db2565b610a56565b005b3480156103c957600080fd5b506103d2610b07565b005b3480156103e057600080fd5b506103fb60048036038101906103f69190612d59565b610b79565b6040516104089190612c8a565b60405180910390f35b34801561041d57600080fd5b50610426610bca565b005b34801561043457600080fd5b5061044f600480360381019061044a9190612ddf565b610d1d565b005b34801561045d57600080fd5b50610466610dbc565b6040516104739190612c8a565b60405180910390f35b34801561048857600080fd5b50610491610dc2565b60405161049e9190612d3e565b60405180910390f35b3480156104b357600080fd5b506104ce60048036038101906104c99190612db2565b610deb565b005b3480156104dc57600080fd5b506104e5610e9d565b6040516104f29190612c8a565b60405180910390f35b34801561050757600080fd5b50610510610ea3565b60405161051d9190612b33565b60405180910390f35b34801561053257600080fd5b5061054d60048036038101906105489190612ddf565b610ee0565b005b34801561055b57600080fd5b5061057660048036038101906105719190612b8b565b610f81565b6040516105839190612be6565b60405180910390f35b34801561059857600080fd5b506105b360048036038101906105ae9190612d59565b610f9f565b6040516105c09190612be6565b60405180910390f35b3480156105d557600080fd5b506105f060048036038101906105eb9190612e0c565b610fbf565b005b3480156105fe57600080fd5b50610607611078565b005b34801561061557600080fd5b50610630600480360381019061062b9190612d59565b6110f2565b005b34801561063e57600080fd5b5061065960048036038101906106549190612e73565b6112b6565b6040516106669190612c8a565b60405180910390f35b34801561067b57600080fd5b5061069660048036038101906106919190612ddf565b61133d565b005b6106a06113de565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072690612eff565b60405180910390fd5b60005b81518110156107c05760016011600084848151811061075457610753612f1f565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806107b890612f7d565b915050610732565b5050565b60606040518060400160405280600981526020017f537065617220496e750000000000000000000000000000000000000000000000815250905090565b600061081561080e6113de565b84846113e6565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b60006108638484846115b1565b6109248461086f6113de565b61091f8560405180606001604052806028815260200161392c60289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108d56113de565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d159092919063ffffffff16565b6113e6565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61096c6113de565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f290612eff565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610a5e6113de565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae290612eff565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b486113de565b73ffffffffffffffffffffffffffffffffffffffff1614610b6857600080fd5b6000479050610b7681611d79565b50565b6000610bc3600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611de5565b9050919050565b610bd26113de565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5690612eff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610d256113de565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610db2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da990612eff565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610df36113de565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7790612eff565b60405180910390fd5b80601660146101000a81548160ff02191690831515021790555050565b60185481565b60606040518060400160405280600581526020017f5370656172000000000000000000000000000000000000000000000000000000815250905090565b610ee86113de565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6e90612eff565b60405180910390fd5b8060198190555050565b6000610f95610f8e6113de565b84846115b1565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b610fc76113de565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611056576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104d90612eff565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110b96113de565b73ffffffffffffffffffffffffffffffffffffffff16146110d957600080fd5b60006110e430610b79565b90506110ef81611e53565b50565b6110fa6113de565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118090612eff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156111f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f090613038565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113456113de565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113cb90612eff565b60405180910390fd5b8060188190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611456576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144d906130ca565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114bd9061315c565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115a49190612c8a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611621576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611618906131ee565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611691576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168890613280565b60405180910390fd5b600081116116d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cb90613312565b60405180910390fd5b6116dc610dc2565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561174a575061171a610dc2565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a1457601660149054906101000a900460ff166117a9576017548111156117a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161179f9061337e565b60405180910390fd5b5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561184d5750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61188c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188390613410565b60405180910390fd5b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461193957601854816118ee84610b79565b6118f89190613430565b10611938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192f906134f8565b60405180910390fd5b5b600061194430610b79565b905060006019548210159050601754821061195f5760175491505b8080156119795750601660159054906101000a900460ff16155b80156119d35750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b80156119e9575060168054906101000a900460ff165b15611a11576119f782611e53565b60004790506000811115611a0f57611a0e476120db565b5b505b50505b600060019050600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611abb5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611b6e5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611b6d5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611b7c5760009050611d03565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611c275750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611c3f57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611cea5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611d0257600b54600d81905550600c54600e819055505b5b611d0f8484848461216d565b50505050565b6000838311158290611d5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d549190612b33565b60405180910390fd5b5060008385611d6c9190613518565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611de1573d6000803e3d6000fd5b5050565b6000600754821115611e2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e23906135be565b60405180910390fd5b6000611e3661219a565b9050611e4b81846121c590919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e8b57611e8a6128c1565b5b604051908082528060200260200182016040528015611eb95781602001602082028036833780820191505090505b5090503081600081518110611ed157611ed0612f1f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f7357600080fd5b505afa158015611f87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fab91906135f3565b81600181518110611fbf57611fbe612f1f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061202630601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113e6565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161208a959493929190613719565b600060405180830381600087803b1580156120a457600080fd5b505af11580156120b8573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61213e60026121306009866121c590919063ffffffff16565b61220f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612169573d6000803e3d6000fd5b5050565b8061217b5761217a61228a565b5b6121868484846122cd565b8061219457612193612498565b5b50505050565b60008060006121a76124ac565b915091506121be81836121c590919063ffffffff16565b9250505090565b600061220783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061250e565b905092915050565b6000808314156122225760009050612284565b600082846122309190613773565b905082848261223f91906137fc565b1461227f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122769061389f565b60405180910390fd5b809150505b92915050565b6000600d5414801561229e57506000600e54145b156122a8576122cb565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b6000806000806000806122df87612571565b95509550955095509550955061233d86600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125d990919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123d285600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461262390919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061241e81612681565b612428848361273e565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124859190612c8a565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b600080600060075490506000683635c9adc5dea0000090506124e2683635c9adc5dea000006007546121c590919063ffffffff16565b82101561250157600754683635c9adc5dea0000093509350505061250a565b81819350935050505b9091565b60008083118290612555576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254c9190612b33565b60405180910390fd5b506000838561256491906137fc565b9050809150509392505050565b600080600080600080600080600061258e8a600d54600e54612778565b925092509250600061259e61219a565b905060008060006125b18e87878761280e565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061261b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d15565b905092915050565b60008082846126329190613430565b905083811015612677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161266e9061390b565b60405180910390fd5b8091505092915050565b600061268b61219a565b905060006126a2828461220f90919063ffffffff16565b90506126f681600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461262390919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612753826007546125d990919063ffffffff16565b60078190555061276e8160085461262390919063ffffffff16565b6008819055505050565b6000806000806127a46064612796888a61220f90919063ffffffff16565b6121c590919063ffffffff16565b905060006127ce60646127c0888b61220f90919063ffffffff16565b6121c590919063ffffffff16565b905060006127f7826127e9858c6125d990919063ffffffff16565b6125d990919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612827858961220f90919063ffffffff16565b9050600061283e868961220f90919063ffffffff16565b90506000612855878961220f90919063ffffffff16565b9050600061287e8261287085876125d990919063ffffffff16565b6125d990919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128f9826128b0565b810181811067ffffffffffffffff82111715612918576129176128c1565b5b80604052505050565b600061292b612897565b905061293782826128f0565b919050565b600067ffffffffffffffff821115612957576129566128c1565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006129988261296d565b9050919050565b6129a88161298d565b81146129b357600080fd5b50565b6000813590506129c58161299f565b92915050565b60006129de6129d98461293c565b612921565b90508083825260208201905060208402830185811115612a0157612a00612968565b5b835b81811015612a2a5780612a1688826129b6565b845260208401935050602081019050612a03565b5050509392505050565b600082601f830112612a4957612a486128ab565b5b8135612a598482602086016129cb565b91505092915050565b600060208284031215612a7857612a776128a1565b5b600082013567ffffffffffffffff811115612a9657612a956128a6565b5b612aa284828501612a34565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612ae5578082015181840152602081019050612aca565b83811115612af4576000848401525b50505050565b6000612b0582612aab565b612b0f8185612ab6565b9350612b1f818560208601612ac7565b612b28816128b0565b840191505092915050565b60006020820190508181036000830152612b4d8184612afa565b905092915050565b6000819050919050565b612b6881612b55565b8114612b7357600080fd5b50565b600081359050612b8581612b5f565b92915050565b60008060408385031215612ba257612ba16128a1565b5b6000612bb0858286016129b6565b9250506020612bc185828601612b76565b9150509250929050565b60008115159050919050565b612be081612bcb565b82525050565b6000602082019050612bfb6000830184612bd7565b92915050565b6000819050919050565b6000612c26612c21612c1c8461296d565b612c01565b61296d565b9050919050565b6000612c3882612c0b565b9050919050565b6000612c4a82612c2d565b9050919050565b612c5a81612c3f565b82525050565b6000602082019050612c756000830184612c51565b92915050565b612c8481612b55565b82525050565b6000602082019050612c9f6000830184612c7b565b92915050565b600080600060608486031215612cbe57612cbd6128a1565b5b6000612ccc868287016129b6565b9350506020612cdd868287016129b6565b9250506040612cee86828701612b76565b9150509250925092565b600060ff82169050919050565b612d0e81612cf8565b82525050565b6000602082019050612d296000830184612d05565b92915050565b612d388161298d565b82525050565b6000602082019050612d536000830184612d2f565b92915050565b600060208284031215612d6f57612d6e6128a1565b5b6000612d7d848285016129b6565b91505092915050565b612d8f81612bcb565b8114612d9a57600080fd5b50565b600081359050612dac81612d86565b92915050565b600060208284031215612dc857612dc76128a1565b5b6000612dd684828501612d9d565b91505092915050565b600060208284031215612df557612df46128a1565b5b6000612e0384828501612b76565b91505092915050565b60008060008060808587031215612e2657612e256128a1565b5b6000612e3487828801612b76565b9450506020612e4587828801612b76565b9350506040612e5687828801612b76565b9250506060612e6787828801612b76565b91505092959194509250565b60008060408385031215612e8a57612e896128a1565b5b6000612e98858286016129b6565b9250506020612ea9858286016129b6565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612ee9602083612ab6565b9150612ef482612eb3565b602082019050919050565b60006020820190508181036000830152612f1881612edc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612f8882612b55565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612fbb57612fba612f4e565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613022602683612ab6565b915061302d82612fc6565b604082019050919050565b6000602082019050818103600083015261305181613015565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006130b4602483612ab6565b91506130bf82613058565b604082019050919050565b600060208201905081810360008301526130e3816130a7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613146602283612ab6565b9150613151826130ea565b604082019050919050565b6000602082019050818103600083015261317581613139565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006131d8602583612ab6565b91506131e38261317c565b604082019050919050565b60006020820190508181036000830152613207816131cb565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061326a602383612ab6565b91506132758261320e565b604082019050919050565b600060208201905081810360008301526132998161325d565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006132fc602983612ab6565b9150613307826132a0565b604082019050919050565b6000602082019050818103600083015261332b816132ef565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b6000613368601c83612ab6565b915061337382613332565b602082019050919050565b600060208201905081810360008301526133978161335b565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b60006133fa602383612ab6565b91506134058261339e565b604082019050919050565b60006020820190508181036000830152613429816133ed565b9050919050565b600061343b82612b55565b915061344683612b55565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561347b5761347a612f4e565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b60006134e2602383612ab6565b91506134ed82613486565b604082019050919050565b60006020820190508181036000830152613511816134d5565b9050919050565b600061352382612b55565b915061352e83612b55565b92508282101561354157613540612f4e565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006135a8602a83612ab6565b91506135b38261354c565b604082019050919050565b600060208201905081810360008301526135d78161359b565b9050919050565b6000815190506135ed8161299f565b92915050565b600060208284031215613609576136086128a1565b5b6000613617848285016135de565b91505092915050565b6000819050919050565b600061364561364061363b84613620565b612c01565b612b55565b9050919050565b6136558161362a565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6136908161298d565b82525050565b60006136a28383613687565b60208301905092915050565b6000602082019050919050565b60006136c68261365b565b6136d08185613666565b93506136db83613677565b8060005b8381101561370c5781516136f38882613696565b97506136fe836136ae565b9250506001810190506136df565b5085935050505092915050565b600060a08201905061372e6000830188612c7b565b61373b602083018761364c565b818103604083015261374d81866136bb565b905061375c6060830185612d2f565b6137696080830184612c7b565b9695505050505050565b600061377e82612b55565b915061378983612b55565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156137c2576137c1612f4e565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061380782612b55565b915061381283612b55565b925082613822576138216137cd565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613889602183612ab6565b91506138948261382d565b604082019050919050565b600060208201905081810360008301526138b88161387c565b9050919050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b60006138f5601b83612ab6565b9150613900826138bf565b602082019050919050565b60006020820190508181036000830152613924816138e8565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122064c19fce38a825099863e5ced44a8e0867efe4e090af44f75e3167abf7a02c9764736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,746
0xea58183f57d2f3ee111290164e83d39429b629b1
pragma solidity ^0.4.21; contract Partner { function exchangeTokensFromOtherContract(address _source, address _recipient, uint256 _RequestedTokens); } contract Target { function transfer(address _to, uint _value); } contract MNY { string public name = "MNY by Monkey Capital"; uint8 public decimals = 18; string public symbol = "MNY"; address public owner; address public exchangeAdmin; // used to store list of contracts MNY holds tokens in mapping(uint256 => address) public exchangePartners; mapping(address => uint256) public exchangeRates; uint tierLevel = 1; uint maxTier = 30; uint256 totalSupply = 1.698846726062230000E25; uint256 public mineableTokens = totalSupply; uint256 public swappedTokens = 0; uint256 circulatingSupply = 0; uint contractCount = 0; // flags bool swap = false; bool distributionCalculated = false; bool public initialTiers = false; bool addTiers = true; // Storage mapping (address => uint256) public balances; mapping (address => uint256) public tokenBalances; mapping (address => uint256) public tokenShare; // erc20 compliance mapping (address => mapping (address => uint256)) allowed; // mining schedule mapping(uint => uint256) public scheduleTokens; mapping(uint => uint256) public scheduleRates; uint256 swapEndTime; // events (ERC20) event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); // events (custom) event TokensExchanged(address indexed _sendingWallet, address indexed _sendingContract, uint256 _tokensIn); function MNY() { owner = msg.sender; } // tier pop function populateTierTokens() public { require((msg.sender == owner) && (initialTiers == false)); scheduleTokens[1] = 5.33696E18; scheduleTokens[2] = 7.69493333E18; scheduleTokens[3] = 4.75684324E18; scheduleTokens[4] = 6.30846753E18; scheduleTokens[5] = 6.21620513E18; scheduleTokens[6] = 5.63157219E18; scheduleTokens[7] = 5.80023669E18; scheduleTokens[8] = 5.04458667E18; scheduleTokens[9] = 4.58042767E18; scheduleTokens[10] = 5E18; scheduleTokens[11] = 5.59421053E18; scheduleTokens[12] = 7.05050888E18; scheduleTokens[13] = 1.93149011E19; scheduleTokens[14] = 5.71055924E18; scheduleTokens[15] = 1.087367665E19; scheduleTokens[16] = 5.4685283E18; scheduleTokens[17] = 7.58236145E18; scheduleTokens[18] = 5.80773184E18; scheduleTokens[19] = 4.74868639E18; scheduleTokens[20] = 6.74810256E18; scheduleTokens[21] = 5.52847682E18; scheduleTokens[22] = 4.96611055E18; scheduleTokens[23] = 5.45818182E18; scheduleTokens[24] = 8.0597095E18; scheduleTokens[25] = 1.459911381E19; scheduleTokens[26] = 8.32598844E18; scheduleTokens[27] = 4.555277509E19; scheduleTokens[28] = 1.395674359E19; scheduleTokens[29] = 9.78908515E18; scheduleTokens[30] = 1.169045087E19; } function populateTierRates() public { require((msg.sender == owner) && (initialTiers == false)); scheduleRates[1] = 9E18; scheduleRates[2] = 9E18; scheduleRates[3] = 8E18; scheduleRates[4] = 7E18; scheduleRates[5] = 8E18; scheduleRates[6] = 5E18; scheduleRates[7] = 6E18; scheduleRates[8] = 5E18; scheduleRates[9] = 5E18; scheduleRates[10] = 6E18; scheduleRates[11] = 6E18; scheduleRates[12] = 6E18; scheduleRates[13] = 7E18; scheduleRates[14] = 6E18; scheduleRates[15] = 7E18; scheduleRates[16] = 6E18; scheduleRates[17] = 6E18; scheduleRates[18] = 6E18; scheduleRates[19] = 6E18; scheduleRates[20] = 6E18; scheduleRates[21] = 6E18; scheduleRates[22] = 6E18; scheduleRates[23] = 6E18; scheduleRates[24] = 7E18; scheduleRates[25] = 7E18; scheduleRates[26] = 7E18; scheduleRates[27] = 7E18; scheduleRates[28] = 6E18; scheduleRates[29] = 7E18; scheduleRates[30] = 7E18; initialTiers = true; } // eof tier pop function transfer(address _to, uint256 _value, bytes _data) public { // sender must have enough tokens to transfer require(balances[msg.sender] >= _value); if(_to == address(this)) { if(swap == false) { // WARNING: if you transfer tokens back to the contract outside of the swap you will lose them // use the exchange function to exchange for tokens with approved partner contracts mineableTokens = add(mineableTokens, _value); circulatingSupply = sub(circulatingSupply, _value); if(circulatingSupply == 0) { swap = true; swapEndTime = now + 90 days; } scheduleTokens[maxTier] = add(scheduleTokens[maxTier], _value); balances[msg.sender] = sub(balanceOf(msg.sender), _value); Transfer(msg.sender, _to, _value); } else { if(distributionCalculated = false) { calculateHeldTokenDistribution(); } swappedTokens = add(swappedTokens, _value); balances[msg.sender] = sub(balances[msg.sender], _value); shareStoredTokens(msg.sender, _value); } } else { // WARNING: if you transfer tokens to a contract address they will be lost unless the contract // has been designed to handle incoming/holding tokens in other contracts balances[msg.sender] = sub(balanceOf(msg.sender), _value); balances[_to] = add(balances[_to], _value); Transfer(msg.sender, _to, _value); } } function allocateTokens(uint256 _submitted, uint256 _tokenCount, address _recipient) internal { uint256 _tokensAfforded = 0; if(tierLevel <= maxTier) { _tokensAfforded = div(_submitted, scheduleRates[tierLevel]); } if(_tokensAfforded >= scheduleTokens[tierLevel]) { _submitted = sub(_submitted, mul(scheduleTokens[tierLevel], scheduleRates[tierLevel])); _tokenCount = add(_tokenCount, scheduleTokens[tierLevel]); circulatingSupply = add(circulatingSupply, _tokensAfforded); mineableTokens = sub(mineableTokens, _tokensAfforded); scheduleTokens[tierLevel] = 0; tierLevel++; allocateTokens(_submitted, _tokenCount, _recipient); } else if((scheduleTokens[tierLevel] >= _tokensAfforded) && (_tokensAfforded > 0)) { scheduleTokens[tierLevel] = sub(scheduleTokens[tierLevel], _tokensAfforded); _tokenCount = add(_tokenCount, _tokensAfforded); circulatingSupply = add(circulatingSupply, _tokensAfforded); mineableTokens = sub(mineableTokens, _tokensAfforded); _submitted = sub(_submitted, mul(_tokensAfforded, scheduleRates[tierLevel])); allocateTokens(_submitted, _tokenCount, _recipient); } else { balances[_recipient] = add(balances[_recipient], _tokenCount); Transfer(this, _recipient, _tokenCount); } } function exchangeTokensFromOtherContract(address _source, address _recipient, uint256 _sentTokens) { require(exchangeRates[msg.sender] > 0); // only approved contracts will satisfy this constraint allocateTokens(mul(_sentTokens, exchangeRates[_source]), 0, _recipient); TokensExchanged(_recipient, _source, _sentTokens); maintainExternalContractTokenBalance(_source, _sentTokens); } function addExchangePartnerAddressAndRate(address _partner, uint256 _rate) public { require(msg.sender == owner); // check that _partner is a contract address uint codeLength; assembly { codeLength := extcodesize(_partner) } require(codeLength > 0); exchangeRates[_partner] = _rate; bool isContract = existingContract(_partner); if(isContract == false) { contractCount++; exchangePartners[contractCount] = _partner; } } function addTierRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public { require(((msg.sender == owner) || (msg.sender == exchangeAdmin)) && (addTiers == true)); scheduleTokens[_level] = _tokens; scheduleRates[_level] = _rate; maxTier++; if(maxTier > 2856) { totalSupply = add(totalSupply, _tokens); } } function closeTierAddition() public { require(msg.sender == owner); addTiers = false; } // public data retrieval funcs function getTotalSupply() public constant returns (uint256) { return totalSupply; } function getMineableTokens() public constant returns (uint256) { return mineableTokens; } function getCirculatingSupply() public constant returns (uint256) { return circulatingSupply; } function balanceOf(address _receiver) public constant returns (uint256) { return balances[_receiver]; } function balanceInTier() public constant returns (uint256) { return scheduleTokens[tierLevel]; } function balanceInSpecificTier(uint256 _tier) public constant returns (uint256) { return scheduleTokens[_tier]; } function rateInSpecificTier(uint256 _tier) public constant returns (uint256) { return scheduleRates[_tier]; } function currentTier() public constant returns (uint256) { return tierLevel; } // NB: we use this to manually process tokens sent in from contracts not able to interact direct with MNY function convertTransferredTokensToMny(uint256 _value, address _recipient, address _source, uint256 _originalTokenAmount) public { // This allows tokens transferred in for exchange to be converted to MNY and distributed // NOTE: COE is able to interact directly with the MNY contract - other exchange partners cannot unless designed ot do so // Please contact us at 3@dunaton.com for details on designing a contract that *can* deal directly with MNY require((msg.sender == owner) || (msg.sender == exchangeAdmin)); require(exchangeRates[_source] > 0); allocateTokens(_value, 0, _recipient); maintainExternalContractTokenBalance(_source, _originalTokenAmount); TokensExchanged(_recipient, _source, _originalTokenAmount); } function changeOwner(address _newOwner) public { require(msg.sender == owner); owner = _newOwner; } function changeExchangeAdmin(address _newAdmin) public { require(msg.sender == owner); exchangeAdmin = _newAdmin; } function maintainExternalContractTokenBalance(address _contract, uint256 _tokens) internal { tokenBalances[_contract] = add(tokenBalances[_contract], _tokens); } function getTokenBalance(address _contract) public constant returns (uint256) { return tokenBalances[_contract]; } function calculateHeldTokenDistribution() public { require(swap == true); for(uint256 i=0; i<contractCount; i++) { tokenShare[exchangePartners[i]] = div(tokenBalances[exchangePartners[i]], totalSupply); } distributionCalculated = true; } function tokenShare(address _contract) public constant returns (uint256) { return tokenShare[_contract]; } function shareStoredTokens(address _recipient, uint256 mny) internal { Target t; uint256 share = 0; for(uint i=0; i<contractCount; i++) { share = mul(mny, tokenShare[exchangePartners[i]]); t = Target(exchangePartners[i]); t.transfer(_recipient, share); tokenBalances[exchangePartners[i]] = sub(tokenBalances[exchangePartners[i]], share); } } // NOTE: this function is used to redistribute the swapped MNY after swap has ended function distributeMnyAfterSwap(address _recipient, uint256 _tokens) public { require(msg.sender == owner); require(swappedTokens <= _tokens); balances[_recipient] = add(balances[_recipient], _tokens); Transfer(this, _recipient, _tokens); swappedTokens = sub(totalSupply, _tokens); circulatingSupply = add(circulatingSupply, _tokens); } // we will use this to distribute tokens owned in other contracts // e.g. if we have MNY irretrievably locked in contracts/forgotten wallets etc that cannot be returned. // This function WILL ONLY be called fter fair notice and CANNOT be called until 90 days have // passed since the swap started function distributeOwnedTokensFromOtherContracts(address _contract, address _recipient, uint256 _tokens) { require(now >= swapEndTime); require(msg.sender == owner); require(tokenBalances[_contract] >= _tokens); Target t = Target(_contract); t.transfer(_recipient, _tokens); tokenBalances[_contract] = sub(tokenBalances[_contract], _tokens); } function existingContract(address _contract) internal returns (bool) { for(uint i=0; i<=contractCount; i++) { if(exchangePartners[i] == _contract) return true; } return false; } function contractExchangeRate(address _contract) public constant returns (uint256) { return exchangeRates[_contract]; } function mul(uint a, uint b) internal pure returns (uint) { uint c = a * b; require(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal pure returns (uint) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint a, uint b) internal pure returns (uint) { require(b <= a); return a - b; } function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a); return c; } // ERC20 compliance addition function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool success) { require(balances[_from] >= _tokens); balances[_from] = sub(balances[_from],_tokens); allowed[_from][msg.sender] = sub(allowed[_from][msg.sender],_tokens); balances[_to] = add(balances[_to],_tokens); Transfer(_from, _to, _tokens); return true; } function approve(address _spender, uint256 _tokens) public returns (bool success) { allowed[msg.sender][_spender] = _tokens; Approval(msg.sender, _spender, _tokens); return true; } function allowance(address _tokenOwner, address _spender) public constant returns (uint256 remaining) { return allowed[_tokenOwner][_spender]; } }
0x6080604052600436106101f9576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301b84d05146101fe57806303223d0a1461026b5780630545f8ba146102ac578063069f5f72146102ef57806306fdde031461031a578063095ea7b3146103aa57806310970fbb1461040f578063180da450146104865780631e28f29b146104c757806323b872dd146104f65780632559e0dd1461057b57806327e235e3146105bc5780632aeacd4a146106135780632b112e4914610680578063313ce567146106ab5780633aecd0e3146106dc57806342efdebf146107335780634e2133ba1461078a578063523fba7f146107d757806353738a4c1461082e57806370a082311461089b57806385c15d9a146108f25780638da5cb5b14610949578063913d23e2146109a057806395d89b41146109ed5780639f87f41914610a7d578063a6f9dae114610a94578063ad150aec14610ad7578063b001134a14610aee578063b9aaaeee14610b19578063b9ad608314610b30578063be45fd6214610b71578063c1d6036b14610c04578063c4e41b2214610c5b578063cd80da8214610c86578063cfa5cfd314610cdd578063d679677a14610d1e578063dd62ed3e14610d49578063e6f7ec7514610dc0578063ef8a22ac14610dd7578063f0425fe114610e02575b600080fd5b34801561020a57600080fd5b5061022960048036038101908080359060200190929190505050610e2d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027757600080fd5b5061029660048036038101908080359060200190929190505050610e60565b6040518082815260200191505060405180910390f35b3480156102b857600080fd5b506102ed600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e78565b005b3480156102fb57600080fd5b50610304610f18565b6040518082815260200191505060405180910390f35b34801561032657600080fd5b5061032f610f22565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036f578082015181840152602081019050610354565b50505050905090810190601f16801561039c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103b657600080fd5b506103f5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fc0565b604051808215151515815260200191505060405180910390f35b34801561041b57600080fd5b5061048460048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b2565b005b34801561049257600080fd5b506104c5600480360381019080803590602001909291908035906020019092919080359060200190929190505050611235565b005b3480156104d357600080fd5b506104dc61136e565b604051808215151515815260200191505060405180910390f35b34801561050257600080fd5b50610561600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611381565b604051808215151515815260200191505060405180910390f35b34801561058757600080fd5b506105a66004803603810190808035906020019092919050505061165f565b6040518082815260200191505060405180910390f35b3480156105c857600080fd5b506105fd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061167c565b6040518082815260200191505060405180910390f35b34801561061f57600080fd5b5061067e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611694565b005b34801561068c57600080fd5b506106956117aa565b6040518082815260200191505060405180910390f35b3480156106b757600080fd5b506106c06117b4565b604051808260ff1660ff16815260200191505060405180910390f35b3480156106e857600080fd5b5061071d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117c7565b6040518082815260200191505060405180910390f35b34801561073f57600080fd5b50610748611810565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561079657600080fd5b506107d5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611836565b005b3480156107e357600080fd5b50610818600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611971565b6040518082815260200191505060405180910390f35b34801561083a57600080fd5b50610899600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611989565b005b3480156108a757600080fd5b506108dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b96565b6040518082815260200191505060405180910390f35b3480156108fe57600080fd5b50610933600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bdf565b6040518082815260200191505060405180910390f35b34801561095557600080fd5b5061095e611bf7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156109ac57600080fd5b506109eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611c1d565b005b3480156109f957600080fd5b50610a02611da3565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a42578082015181840152602081019050610a27565b50505050905090810190601f168015610a6f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610a8957600080fd5b50610a92611e41565b005b348015610aa057600080fd5b50610ad5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611eba565b005b348015610ae357600080fd5b50610aec611f5a565b005b348015610afa57600080fd5b50610b036120ac565b6040518082815260200191505060405180910390f35b348015610b2557600080fd5b50610b2e6120c9565b005b348015610b3c57600080fd5b50610b5b60048036038101908080359060200190929190505050612526565b6040518082815260200191505060405180910390f35b348015610b7d57600080fd5b50610c02600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061253e565b005b348015610c1057600080fd5b50610c45600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061294c565b6040518082815260200191505060405180910390f35b348015610c6757600080fd5b50610c70612995565b6040518082815260200191505060405180910390f35b348015610c9257600080fd5b50610cc7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061299f565b6040518082815260200191505060405180910390f35b348015610ce957600080fd5b50610d08600480360381019080803590602001909291905050506129e8565b6040518082815260200191505060405180910390f35b348015610d2a57600080fd5b50610d33612a05565b6040518082815260200191505060405180910390f35b348015610d5557600080fd5b50610daa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a0f565b6040518082815260200191505060405180910390f35b348015610dcc57600080fd5b50610dd5612a96565b005b348015610de357600080fd5b50610dec612f0c565b6040518082815260200191505060405180910390f35b348015610e0e57600080fd5b50610e17612f12565b6040518082815260200191505060405180910390f35b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60146020528060005260406000206000915090505481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ed457600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600a54905090565b60008054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610fb85780601f10610f8d57610100808354040283529160200191610fb8565b820191906000526020600020905b815481529060010190602001808311610f9b57829003601f168201915b505050505081565b600081601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061115b5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561116657600080fd5b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115156111b457600080fd5b6111c084600085612f18565b6111ca82826131f0565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fc9c9556ca88cce5d3d7f78b7ed04297c91b33ef85e1ab609f06e489417e83689836040518082815260200191505060405180910390a350505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806112de5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80156112fd575060011515600e60039054906101000a900460ff161515145b151561130857600080fd5b816013600085815260200190815260200160002081905550806014600085815260200190815260200160002081905550600860008154809291906001019190505550610b2860085411156113695761136260095483613280565b6009819055505b505050565b600e60029054906101000a900460ff1681565b600081600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156113d157600080fd5b61141a600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836132a1565b600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114e3601260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836132a1565b601260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506115ac600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483613280565b600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600060146000838152602001908152602001600020549050919050565b600f6020528060005260406000206000915090505481565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115156116e257600080fd5b61173661172e82600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132bd565b600084612f18565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc9c9556ca88cce5d3d7f78b7ed04297c91b33ef85e1ab609f06e489417e83689836040518082815260200191505060405180910390a36117a583826131f0565b505050565b6000600c54905090565b600160009054906101000a900460ff1681565b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561189557600080fd5b833b91506000821115156118a857600080fd5b82600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118f5846132f3565b905060001515811515141561196b57600d600081548092919060010191905055508360056000600d54815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50505050565b60106020528060005260406000206000915090505481565b6000601554421015151561199c57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119f857600080fd5b81601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611a4657600080fd5b8390508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015611aec57600080fd5b505af1158015611b00573d6000803e3d6000fd5b50505050611b4d601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836132a1565b601060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050505050565b6000600f60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60066020528060005260406000206000915090505481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c7957600080fd5b80600b5411151515611c8a57600080fd5b611cd3600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482613280565b600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3611d87600954826132a1565b600b81905550611d99600c5482613280565b600c819055505050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611e395780601f10611e0e57610100808354040283529160200191611e39565b820191906000526020600020905b815481529060010190602001808311611e1c57829003601f168201915b505050505081565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e9d57600080fd5b6000600e60036101000a81548160ff021916908315150217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f1657600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600060011515600e60009054906101000a900460ff161515141515611f7e57600080fd5b600090505b600d5481101561208e5761200b601060006005600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460095461338e565b601160006005600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508080600101915050611f83565b6001600e60016101000a81548160ff02191690831515021790555050565b600060136000600754815260200190815260200160002054905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148015612139575060001515600e60029054906101000a900460ff161515145b151561214457600080fd5b674a10b0d7f4780000601360006001815260200190815260200160002081905550676ac9e51818f6b400601360006002815260200190815260200160002081905550674203b3b9546b100060136000600381526020019081526020016000208190555067578c2dcb7abc640060136000600481526020019081526020016000208190555067564465a1809c6400601360006005815260200190815260200160002081905550674e275d11c7eb2c0060136000600681526020019081526020016000208190555067507e9489e0a33400601360006007815260200190815260200160002081905550674601f8d958054c00601360006008815260200190815260200160002081905550673f90f2b29db85c00601360006009815260200190815260200160002081905550674563918244f4000060136000600a815260200190815260200160002081905550674da2a0d66f66540060136000600b8152602001908152602001600020819055506761d870789e23200060136000600c81526020019081526020016000208190555068010c0c5037394d380060136000600d815260200190815260200160002081905550674f3ffb5f7906500060136000600e8152602001908152602001600020819055506796e70f4d4db5a40060136000600f815260200190815260200160002081905550674be41d83edabb800601360006010815260200190815260200160002081905550676939f590d1dda400601360006011815260200190815260200160002081905550675099355679ed00006013600060128152602001908152602001600020819055506741e6b91cb1ae9c00601360006013815260200190815260200160002081905550675da613867cb44000601360006014815260200190815260200160002081905550674cb918606d14c8006013600060158152602001908152602001600020819055506744eb2b3bd011dc00601360006016815260200190815260200160002081905550674bbf5b7254985800601360006017815260200190815260200160002081905550676fd9d7168c57580060136000601881526020019081526020016000208190555067ca9a78a9288cb40060136000601981526020019081526020016000208190555067738bda5f8a35700060136000601a8152602001908152602001600020819055506802782bf7986cb6740060136000601b81526020019081526020016000208190555067c1b050595f28fc0060136000601c8152602001908152602001600020819055506787d9d11441cd2c0060136000601d81526020019081526020016000208190555067a23cd320aa819c0060136000601e815260200190815260200160002081905550565b60136020528060005260406000206000915090505481565b81600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561258c57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128005760001515600e60009054906101000a900460ff161515141561272a576125e8600a5483613280565b600a819055506125fa600c54836132a1565b600c819055506000600c541415612633576001600e60006101000a81548160ff0219169083151502179055506276a70042016015819055505b6126526013600060085481526020019081526020016000205483613280565b6013600060085481526020019081526020016000208190555061267d61267733611b96565b836132a1565b600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36127fb565b6000600e60016101000a81548160ff02191690831515021790551561275257612751611f5a565b5b61275e600b5483613280565b600b819055506127ad600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836132a1565b600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127fa33836133a9565b5b612947565b61281261280c33611b96565b836132a1565b600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061289e600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483613280565b600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35b505050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600954905090565b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600060136000838152602001908152602001600020549050919050565b6000600754905090565b6000601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148015612b06575060001515600e60029054906101000a900460ff161515145b1515612b1157600080fd5b677ce66c50e2840000601460006001815260200190815260200160002081905550677ce66c50e2840000601460006002815260200190815260200160002081905550676f05b59d3b200000601460006003815260200190815260200160002081905550676124fee993bc0000601460006004815260200190815260200160002081905550676f05b59d3b200000601460006005815260200190815260200160002081905550674563918244f400006014600060068152602001908152602001600020819055506753444835ec580000601460006007815260200190815260200160002081905550674563918244f40000601460006008815260200190815260200160002081905550674563918244f400006014600060098152602001908152602001600020819055506753444835ec58000060146000600a8152602001908152602001600020819055506753444835ec58000060146000600b8152602001908152602001600020819055506753444835ec58000060146000600c815260200190815260200160002081905550676124fee993bc000060146000600d8152602001908152602001600020819055506753444835ec58000060146000600e815260200190815260200160002081905550676124fee993bc000060146000600f8152602001908152602001600020819055506753444835ec5800006014600060108152602001908152602001600020819055506753444835ec5800006014600060118152602001908152602001600020819055506753444835ec5800006014600060128152602001908152602001600020819055506753444835ec5800006014600060138152602001908152602001600020819055506753444835ec5800006014600060148152602001908152602001600020819055506753444835ec5800006014600060158152602001908152602001600020819055506753444835ec5800006014600060168152602001908152602001600020819055506753444835ec580000601460006017815260200190815260200160002081905550676124fee993bc0000601460006018815260200190815260200160002081905550676124fee993bc0000601460006019815260200190815260200160002081905550676124fee993bc000060146000601a815260200190815260200160002081905550676124fee993bc000060146000601b8152602001908152602001600020819055506753444835ec58000060146000601c815260200190815260200160002081905550676124fee993bc000060146000601d815260200190815260200160002081905550676124fee993bc000060146000601e8152602001908152602001600020819055506001600e60026101000a81548160ff021916908315150217905550565b600a5481565b600b5481565b6000809050600854600754111515612f4c57612f49846014600060075481526020019081526020016000205461338e565b90505b601360006007548152602001908152602001600020548110151561302b57612fa784612fa260136000600754815260200190815260200160002054601460006007548152602001908152602001600020546132bd565b6132a1565b9350612fc88360136000600754815260200190815260200160002054613280565b9250612fd6600c5482613280565b600c81905550612fe8600a54826132a1565b600a81905550600060136000600754815260200190815260200160002081905550600760008154809291906001019190505550613026848484612f18565b6131ea565b8060136000600754815260200190815260200160002054101580156130505750600081115b156130f75761307460136000600754815260200190815260200160002054826132a1565b601360006007548152602001908152602001600020819055506130978382613280565b92506130a5600c5482613280565b600c819055506130b7600a54826132a1565b600a819055506130e5846130e083601460006007548152602001908152602001600020546132bd565b6132a1565b93506130f2848484612f18565b6131e9565b613140600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484613280565b600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b5b50505050565b613239601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482613280565b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b600080828401905083811015151561329757600080fd5b8091505092915050565b60008282111515156132b257600080fd5b818303905092915050565b600080828402905060008414806132de57508284828115156132db57fe5b04145b15156132e957600080fd5b8091505092915050565b600080600090505b600d5481111515613383578273ffffffffffffffffffffffffffffffffffffffff166005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156133765760019150613388565b80806001019150506132fb565b600091505b50919050565b600080828481151561339c57fe5b0490508091505092915050565b6000806000809150600090505b600d5481101561362e5761343c84601160006005600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132bd565b91506005600082815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561351757600080fd5b505af115801561352b573d6000803e3d6000fd5b505050506135ab601060006005600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836132a1565b601060006005600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080806001019150506133b6565b50505050505600a165627a7a723058202760f5ae9b49c2af631a9c6859c6f24ef88a8e3daaa41be4133909dd5596256e0029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
9,747
0x348e85136f78c44239889bb849303703a79e5142
/** *Submitted for verification at Etherscan.io on 2022-05-02 */ /** EiD Mubarak My Brothers and sisters TWITTER : https://twitter.com/elonmosque_eth TELEGRAM: https://t.me/ElonMosquePortal */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ElonMosque is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Elon Mosque"; string private constant _symbol = "$Halal"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 7; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 7; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x15fB0d9779cdB933F41F348d3bD2152a9C49d3Ad); address payable private _marketingAddress = payable(0x15fB0d9779cdB933F41F348d3bD2152a9C49d3Ad); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 60000000 * 10**9; uint256 public _maxWalletSize = 120000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);//UNISWAP uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610558578063dd62ed3e14610578578063ea1644d5146105be578063f2fde38b146105de57600080fd5b8063a2a957bb146104d3578063a9059cbb146104f3578063bfd7928414610513578063c3c8cd801461054357600080fd5b80638f70ccf7116100d15780638f70ccf71461044e5780638f9a55c01461046e57806395d89b411461048457806398a5c315146104b357600080fd5b80637d1db4a5146103ed5780637f2feddc146104035780638da5cb5b1461043057600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038357806370a0823114610398578063715018a6146103b857806374010ece146103cd57600080fd5b8063313ce5671461030757806349bd5a5e146103235780636b999053146103435780636d8aa8f81461036357600080fd5b80631694505e116101ab5780631694505e1461027457806318160ddd146102ac57806323b872dd146102d15780632fd689e3146102f157600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024457600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611956565b6105fe565b005b34801561020a57600080fd5b5060408051808201909152600b81526a456c6f6e204d6f7371756560a81b60208201525b60405161023b9190611a1b565b60405180910390f35b34801561025057600080fd5b5061026461025f366004611a70565b61069d565b604051901515815260200161023b565b34801561028057600080fd5b50601454610294906001600160a01b031681565b6040516001600160a01b03909116815260200161023b565b3480156102b857600080fd5b50670de0b6b3a76400005b60405190815260200161023b565b3480156102dd57600080fd5b506102646102ec366004611a9c565b6106b4565b3480156102fd57600080fd5b506102c360185481565b34801561031357600080fd5b506040516009815260200161023b565b34801561032f57600080fd5b50601554610294906001600160a01b031681565b34801561034f57600080fd5b506101fc61035e366004611add565b61071d565b34801561036f57600080fd5b506101fc61037e366004611b0a565b610768565b34801561038f57600080fd5b506101fc6107b0565b3480156103a457600080fd5b506102c36103b3366004611add565b6107fb565b3480156103c457600080fd5b506101fc61081d565b3480156103d957600080fd5b506101fc6103e8366004611b25565b610891565b3480156103f957600080fd5b506102c360165481565b34801561040f57600080fd5b506102c361041e366004611add565b60116020526000908152604090205481565b34801561043c57600080fd5b506000546001600160a01b0316610294565b34801561045a57600080fd5b506101fc610469366004611b0a565b6108c0565b34801561047a57600080fd5b506102c360175481565b34801561049057600080fd5b506040805180820190915260068152650912185b185b60d21b602082015261022e565b3480156104bf57600080fd5b506101fc6104ce366004611b25565b610908565b3480156104df57600080fd5b506101fc6104ee366004611b3e565b610937565b3480156104ff57600080fd5b5061026461050e366004611a70565b610975565b34801561051f57600080fd5b5061026461052e366004611add565b60106020526000908152604090205460ff1681565b34801561054f57600080fd5b506101fc610982565b34801561056457600080fd5b506101fc610573366004611b70565b6109d6565b34801561058457600080fd5b506102c3610593366004611bf4565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105ca57600080fd5b506101fc6105d9366004611b25565b610a77565b3480156105ea57600080fd5b506101fc6105f9366004611add565b610aa6565b6000546001600160a01b031633146106315760405162461bcd60e51b815260040161062890611c2d565b60405180910390fd5b60005b81518110156106995760016010600084848151811061065557610655611c62565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069181611c8e565b915050610634565b5050565b60006106aa338484610b90565b5060015b92915050565b60006106c1848484610cb4565b610713843361070e85604051806060016040528060288152602001611da6602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f0565b610b90565b5060019392505050565b6000546001600160a01b031633146107475760405162461bcd60e51b815260040161062890611c2d565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107925760405162461bcd60e51b815260040161062890611c2d565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e557506013546001600160a01b0316336001600160a01b0316145b6107ee57600080fd5b476107f88161122a565b50565b6001600160a01b0381166000908152600260205260408120546106ae90611264565b6000546001600160a01b031633146108475760405162461bcd60e51b815260040161062890611c2d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108bb5760405162461bcd60e51b815260040161062890611c2d565b601655565b6000546001600160a01b031633146108ea5760405162461bcd60e51b815260040161062890611c2d565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109325760405162461bcd60e51b815260040161062890611c2d565b601855565b6000546001600160a01b031633146109615760405162461bcd60e51b815260040161062890611c2d565b600893909355600a91909155600955600b55565b60006106aa338484610cb4565b6012546001600160a01b0316336001600160a01b031614806109b757506013546001600160a01b0316336001600160a01b0316145b6109c057600080fd5b60006109cb306107fb565b90506107f8816112e8565b6000546001600160a01b03163314610a005760405162461bcd60e51b815260040161062890611c2d565b60005b82811015610a71578160056000868685818110610a2257610a22611c62565b9050602002016020810190610a379190611add565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6981611c8e565b915050610a03565b50505050565b6000546001600160a01b03163314610aa15760405162461bcd60e51b815260040161062890611c2d565b601755565b6000546001600160a01b03163314610ad05760405162461bcd60e51b815260040161062890611c2d565b6001600160a01b038116610b355760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610628565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610628565b6001600160a01b038216610c535760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610628565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d185760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610628565b6001600160a01b038216610d7a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610628565b60008111610ddc5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610628565b6000546001600160a01b03848116911614801590610e0857506000546001600160a01b03838116911614155b156110e957601554600160a01b900460ff16610ea1576000546001600160a01b03848116911614610ea15760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610628565b601654811115610ef35760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610628565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3557506001600160a01b03821660009081526010602052604090205460ff16155b610f8d5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610628565b6015546001600160a01b038381169116146110125760175481610faf846107fb565b610fb99190611ca7565b106110125760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610628565b600061101d306107fb565b6018546016549192508210159082106110365760165491505b80801561104d5750601554600160a81b900460ff16155b801561106757506015546001600160a01b03868116911614155b801561107c5750601554600160b01b900460ff165b80156110a157506001600160a01b03851660009081526005602052604090205460ff16155b80156110c657506001600160a01b03841660009081526005602052604090205460ff16155b156110e6576110d4826112e8565b4780156110e4576110e44761122a565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112b57506001600160a01b03831660009081526005602052604090205460ff165b8061115d57506015546001600160a01b0385811691161480159061115d57506015546001600160a01b03848116911614155b1561116a575060006111e4565b6015546001600160a01b03858116911614801561119557506014546001600160a01b03848116911614155b156111a757600854600c55600954600d555b6015546001600160a01b0384811691161480156111d257506014546001600160a01b03858116911614155b156111e457600a54600c55600b54600d555b610a7184848484611462565b600081848411156112145760405162461bcd60e51b81526004016106289190611a1b565b5060006112218486611cbf565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610699573d6000803e3d6000fd5b60006006548211156112cb5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610628565b60006112d5611490565b90506112e183826114b3565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133057611330611c62565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611389573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ad9190611cd6565b816001815181106113c0576113c0611c62565b6001600160a01b0392831660209182029290920101526014546113e69130911684610b90565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061141f908590600090869030904290600401611cf3565b600060405180830381600087803b15801561143957600080fd5b505af115801561144d573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061146f5761146f6114f5565b61147a848484611523565b80610a7157610a71600e54600c55600f54600d55565b600080600061149d61161a565b90925090506114ac82826114b3565b9250505090565b60006112e183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061165a565b600c541580156115055750600d54155b1561150c57565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153587611688565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156790876116e5565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115969086611727565b6001600160a01b0389166000908152600260205260409020556115b881611786565b6115c284836117d0565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160791815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163582826114b3565b82101561165157505060065492670de0b6b3a764000092509050565b90939092509050565b6000818361167b5760405162461bcd60e51b81526004016106289190611a1b565b5060006112218486611d64565b60008060008060008060008060006116a58a600c54600d546117f4565b92509250925060006116b5611490565b905060008060006116c88e878787611849565b919e509c509a509598509396509194505050505091939550919395565b60006112e183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f0565b6000806117348385611ca7565b9050838110156112e15760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610628565b6000611790611490565b9050600061179e8383611899565b306000908152600260205260409020549091506117bb9082611727565b30600090815260026020526040902055505050565b6006546117dd90836116e5565b6006556007546117ed9082611727565b6007555050565b600080808061180e60646118088989611899565b906114b3565b9050600061182160646118088a89611899565b90506000611839826118338b866116e5565b906116e5565b9992985090965090945050505050565b60008080806118588886611899565b905060006118668887611899565b905060006118748888611899565b905060006118868261183386866116e5565b939b939a50919850919650505050505050565b6000826000036118ab575060006106ae565b60006118b78385611d86565b9050826118c48583611d64565b146112e15760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610628565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f857600080fd5b803561195181611931565b919050565b6000602080838503121561196957600080fd5b823567ffffffffffffffff8082111561198157600080fd5b818501915085601f83011261199557600080fd5b8135818111156119a7576119a761191b565b8060051b604051601f19603f830116810181811085821117156119cc576119cc61191b565b6040529182528482019250838101850191888311156119ea57600080fd5b938501935b82851015611a0f57611a0085611946565b845293850193928501926119ef565b98975050505050505050565b600060208083528351808285015260005b81811015611a4857858101830151858201604001528201611a2c565b81811115611a5a576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8357600080fd5b8235611a8e81611931565b946020939093013593505050565b600080600060608486031215611ab157600080fd5b8335611abc81611931565b92506020840135611acc81611931565b929592945050506040919091013590565b600060208284031215611aef57600080fd5b81356112e181611931565b8035801515811461195157600080fd5b600060208284031215611b1c57600080fd5b6112e182611afa565b600060208284031215611b3757600080fd5b5035919050565b60008060008060808587031215611b5457600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8557600080fd5b833567ffffffffffffffff80821115611b9d57600080fd5b818601915086601f830112611bb157600080fd5b813581811115611bc057600080fd5b8760208260051b8501011115611bd557600080fd5b602092830195509350611beb9186019050611afa565b90509250925092565b60008060408385031215611c0757600080fd5b8235611c1281611931565b91506020830135611c2281611931565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ca057611ca0611c78565b5060010190565b60008219821115611cba57611cba611c78565b500190565b600082821015611cd157611cd1611c78565b500390565b600060208284031215611ce857600080fd5b81516112e181611931565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d435784516001600160a01b031683529383019391830191600101611d1e565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da057611da0611c78565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122093ae52df8e312f2575bf5b1d4de1a49db304b7b15e5cf00a865793b1f6cef13164736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,748
0xf0eff9d473c4586ce717a738bf0103d01736600c
// ---------------------------------------------------------------------------- // Farming Coin Contract // Name : Farming Coin // Symbol : FAM // Decimals : 18 // InitialSupply : 1,000,000,000 FAM // ---------------------------------------------------------------------------- pragma solidity 0.5.8; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); } } contract FarmingCoin is ERC20 { string public constant name = "Farming Coin"; string public constant symbol = "FAM"; uint8 public constant decimals = 18; uint256 public constant initialSupply = 1000000000 * (10 ** uint256(decimals)); constructor() public { super._mint(msg.sender, initialSupply); owner = msg.sender; } address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); modifier onlyOwner() { require(msg.sender == owner, "Not owner"); _; } function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0), "Already Owner"); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(!paused, "Paused by owner"); _; } modifier whenPaused() { require(paused, "Not paused now"); _; } function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } event Frozen(address target); event Unfrozen(address target); mapping(address => bool) internal freezes; modifier whenNotFrozen() { require(!freezes[msg.sender], "Sender account is locked."); _; } function freeze(address _target) public onlyOwner { freezes[_target] = true; emit Frozen(_target); } function unfreeze(address _target) public onlyOwner { freezes[_target] = false; emit Unfrozen(_target); } function isFrozen(address _target) public view returns (bool) { return freezes[_target]; } function transfer( address _to, uint256 _value ) public whenNotFrozen whenNotPaused returns (bool) { releaseLock(msg.sender); return super.transfer(_to, _value); } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { require(!freezes[_from], "From account is locked."); releaseLock(_from); return super.transferFrom(_from, _to, _value); } event Burn(address indexed burner, uint256 value); function burn(address _who, uint256 _value) public onlyOwner { require(_value <= super.balanceOf(_who), "Balance is too small."); _burn(_who, _value); emit Burn(_who, _value); } struct LockInfo { uint256 releaseTime; uint256 balance; } mapping(address => LockInfo[]) internal lockInfo; event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); function balanceOf(address _holder) public view returns (uint256 balance) { uint256 lockedBalance = 0; for(uint256 i = 0; i < lockInfo[_holder].length ; i++ ) { lockedBalance = lockedBalance.add(lockInfo[_holder][i].balance); } return super.balanceOf(_holder).add(lockedBalance); } function releaseLock(address _holder) internal { for(uint256 i = 0; i < lockInfo[_holder].length ; i++ ) { if (lockInfo[_holder][i].releaseTime <= now) { _balances[_holder] = _balances[_holder].add(lockInfo[_holder][i].balance); emit Unlock(_holder, lockInfo[_holder][i].balance); lockInfo[_holder][i].balance = 0; if (i != lockInfo[_holder].length - 1) { lockInfo[_holder][i] = lockInfo[_holder][lockInfo[_holder].length - 1]; i--; } lockInfo[_holder].length--; } } } function lockCount(address _holder) public view returns (uint256) { return lockInfo[_holder].length; } function lockState(address _holder, uint256 _idx) public view returns (uint256, uint256) { return (lockInfo[_holder][_idx].releaseTime, lockInfo[_holder][_idx].balance); } function lock(address _holder, uint256 _amount, uint256 _releaseTime) public onlyOwner { require(super.balanceOf(_holder) >= _amount, "Balance is too small."); _balances[_holder] = _balances[_holder].sub(_amount); lockInfo[_holder].push( LockInfo(_releaseTime, _amount) ); emit Lock(_holder, _amount, _releaseTime); } function unlock(address _holder, uint256 i) public onlyOwner { require(i < lockInfo[_holder].length, "No lock information."); _balances[_holder] = _balances[_holder].add(lockInfo[_holder][i].balance); emit Unlock(_holder, lockInfo[_holder][i].balance); lockInfo[_holder][i].balance = 0; if (i != lockInfo[_holder].length - 1) { lockInfo[_holder][i] = lockInfo[_holder][lockInfo[_holder].length - 1]; } lockInfo[_holder].length--; } function transferWithLock(address _to, uint256 _value, uint256 _releaseTime) public onlyOwner returns (bool) { require(_to != address(0), "wrong address"); require(_value <= super.balanceOf(owner), "Not enough balance"); _balances[owner] = _balances[owner].sub(_value); lockInfo[_to].push( LockInfo(_releaseTime, _value) ); emit Transfer(owner, _to, _value); emit Lock(_to, _value, _releaseTime); return true; } }
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80638456cb59116100de578063a9059cbb11610097578063df03458611610071578063df034586146104ff578063e2ab691d14610525578063e583983614610557578063f2fde38b1461057d5761018e565b8063a9059cbb14610473578063dd62ed3e1461049f578063de6baccb146104cd5761018e565b80638456cb59146103c15780638d1fdf2f146103c95780638da5cb5b146103ef57806395d89b41146104135780639dc29fac1461041b578063a457c2d7146104475761018e565b8063395093511161014b57806346cf1bb51161012557806346cf1bb5146103225780635c975abb1461036757806370a082311461036f5780637eee288d146103955761018e565b806339509351146102c65780633f4ba83a146102f257806345c8b1a6146102fc5761018e565b806306fdde0314610193578063095ea7b31461021057806318160ddd1461025057806323b872dd1461026a578063313ce567146102a0578063378dc3dc146102be575b600080fd5b61019b6105a3565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023c6004803603604081101561022657600080fd5b506001600160a01b0381351690602001356105dc565b604080519115158252519081900360200190f35b6102586105f2565b60408051918252519081900360200190f35b61023c6004803603606081101561028057600080fd5b506001600160a01b038135811691602081013590911690604001356105f9565b6102a86106e0565b6040805160ff9092168252519081900360200190f35b6102586106e5565b61023c600480360360408110156102dc57600080fd5b506001600160a01b0381351690602001356106f5565b6102fa610736565b005b6102fa6004803603602081101561031257600080fd5b50356001600160a01b0316610823565b61034e6004803603604081101561033857600080fd5b506001600160a01b0381351690602001356108cc565b6040805192835260208301919091528051918290030190f35b61023c610945565b6102586004803603602081101561038557600080fd5b50356001600160a01b0316610955565b6102fa600480360360408110156103ab57600080fd5b506001600160a01b0381351690602001356109ef565b6102fa610c9d565b6102fa600480360360208110156103df57600080fd5b50356001600160a01b0316610d86565b6103f7610e32565b604080516001600160a01b039092168252519081900360200190f35b61019b610e41565b6102fa6004803603604081101561043157600080fd5b506001600160a01b038135169060200135610e63565b61023c6004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610f61565b61023c6004803603604081101561048957600080fd5b506001600160a01b038135169060200135610f9d565b610258600480360360408110156104b557600080fd5b506001600160a01b038135811691602001351661106f565b61023c600480360360608110156104e357600080fd5b506001600160a01b03813516906020810135906040013561109a565b6102586004803603602081101561051557600080fd5b50356001600160a01b03166112b7565b6102fa6004803603606081101561053b57600080fd5b506001600160a01b0381351690602081013590604001356112d2565b61023c6004803603602081101561056d57600080fd5b50356001600160a01b0316611441565b6102fa6004803603602081101561059357600080fd5b50356001600160a01b031661145f565b6040518060400160405280600c81526020017f4661726d696e6720436f696e000000000000000000000000000000000000000081525081565b60006105e93384846114bc565b50600192915050565b6002545b90565b600354600090600160a01b900460ff16156106535760408051600160e51b62461bcd02815260206004820152600f6024820152600160891b6e2830bab9b2b210313c9037bbb732b902604482015290519081900360640190fd5b6001600160a01b03841660009081526004602052604090205460ff16156106c45760408051600160e51b62461bcd02815260206004820152601760248201527f46726f6d206163636f756e74206973206c6f636b65642e000000000000000000604482015290519081900360640190fd5b6106cd846115ae565b6106d88484846117d1565b949350505050565b601281565b6b033b2e3c9fd0803ce800000081565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105e9918590610731908663ffffffff61182316565b6114bc565b6003546001600160a01b031633146107875760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b600354600160a01b900460ff166107e85760408051600160e51b62461bcd02815260206004820152600e60248201527f4e6f7420706175736564206e6f77000000000000000000000000000000000000604482015290519081900360640190fd5b60038054600160a01b60ff02191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6003546001600160a01b031633146108745760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038116600081815260046020908152604091829020805460ff19169055815192835290517f4feb53e305297ab8fb8f3420c95ea04737addc254a7270d8fc4605d2b9c61dba9281900390910190a150565b6001600160a01b03821660009081526005602052604081208054829190849081106108f357fe5b600091825260208083206002909202909101546001600160a01b03871683526005909152604090912080548590811061092857fe5b906000526020600020906002020160010154915091509250929050565b600354600160a01b900460ff1681565b600080805b6001600160a01b0384166000908152600560205260409020548110156109ce576001600160a01b038416600090815260056020526040902080546109c49190839081106109a357fe5b9060005260206000209060020201600101548361182390919063ffffffff16565b915060010161095a565b506109e8816109dc85611880565b9063ffffffff61182316565b9392505050565b6003546001600160a01b03163314610a405760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b0382166000908152600560205260409020548110610aaf5760408051600160e51b62461bcd02815260206004820152601460248201527f4e6f206c6f636b20696e666f726d6174696f6e2e000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03821660009081526005602052604090208054610b11919083908110610ad857fe5b60009182526020808320600160029093020191909101546001600160a01b0386168352908290526040909120549063ffffffff61182316565b6001600160a01b03831660008181526020818152604080832094909455600590529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1919084908110610b6557fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b0382166000908152600560205260408120805483908110610bb057fe5b60009182526020808320600160029093020191909101929092556001600160a01b038416815260059091526040902054600019018114610c6f576001600160a01b038216600090815260056020526040902080546000198101908110610c1257fe5b906000526020600020906002020160056000846001600160a01b03166001600160a01b031681526020019081526020016000208281548110610c5057fe5b6000918252602090912082546002909202019081556001918201549101555b6001600160a01b0382166000908152600560205260409020805490610c98906000198301611bc2565b505050565b6003546001600160a01b03163314610cee5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b600354600160a01b900460ff1615610d455760408051600160e51b62461bcd02815260206004820152600f6024820152600160891b6e2830bab9b2b210313c9037bbb732b902604482015290519081900360640190fd5b60038054600160a01b60ff021916600160a01b1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b6003546001600160a01b03163314610dd75760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b038116600081815260046020908152604091829020805460ff19166001179055815192835290517f8a5c4736a33c7b7f29a2c34ea9ff9608afc5718d56f6fd6dcbd2d3711a1a49139281900390910190a150565b6003546001600160a01b031681565b604051806040016040528060038152602001600160e81b6246414d0281525081565b6003546001600160a01b03163314610eb45760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b610ebd82611880565b811115610f145760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b610f1e828261189b565b6040805182815290516001600160a01b038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105e9918590610731908663ffffffff61196516565b3360009081526004602052604081205460ff16156110055760408051600160e51b62461bcd02815260206004820152601960248201527f53656e646572206163636f756e74206973206c6f636b65642e00000000000000604482015290519081900360640190fd5b600354600160a01b900460ff161561105c5760408051600160e51b62461bcd02815260206004820152600f6024820152600160891b6e2830bab9b2b210313c9037bbb732b902604482015290519081900360640190fd5b611065336115ae565b6109e883836119c5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6003546000906001600160a01b031633146110ee5760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6001600160a01b03841661114c5760408051600160e51b62461bcd02815260206004820152600d60248201527f77726f6e67206164647265737300000000000000000000000000000000000000604482015290519081900360640190fd5b600354611161906001600160a01b0316611880565b8311156111b85760408051600160e51b62461bcd02815260206004820152601260248201527f4e6f7420656e6f7567682062616c616e63650000000000000000000000000000604482015290519081900360640190fd5b6003546001600160a01b03166000908152602081905260409020546111e3908463ffffffff61196516565b600380546001600160a01b039081166000908152602081815260408083209590955588831680835260058252858320865180880188528981528084018b81528254600181810185559387529585902091516002909602909101948555519301929092559254845188815294519194921692600080516020611d31833981519152928290030190a3604080518481526020810184905281516001600160a01b038716927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b928290030190a25060019392505050565b6001600160a01b031660009081526005602052604090205490565b6003546001600160a01b031633146113235760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b8161132d84611880565b10156113835760408051600160e51b62461bcd02815260206004820152601560248201527f42616c616e636520697320746f6f20736d616c6c2e0000000000000000000000604482015290519081900360640190fd5b6001600160a01b0383166000908152602081905260409020546113ac908363ffffffff61196516565b6001600160a01b0384166000818152602081815260408083209490945560058152838220845180860186528681528083018881528254600181810185559386529484902091516002909502909101938455519201919091558251858152908101849052825191927f49eaf4942f1237055eb4cfa5f31c9dfe50d5b4ade01e021f7de8be2fbbde557b92918290030190a2505050565b6001600160a01b031660009081526004602052604090205460ff1690565b6003546001600160a01b031633146114b05760408051600160e51b62461bcd0281526020600482015260096024820152600160b91b682737ba1037bbb732b902604482015290519081900360640190fd5b6114b9816119d2565b50565b6001600160a01b03831661150457604051600160e51b62461bcd028152600401808060200182810382526024815260200180611d976024913960400191505060405180910390fd5b6001600160a01b03821661154c57604051600160e51b62461bcd028152600401808060200182810382526022815260200180611d0f6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b60005b6001600160a01b0382166000908152600560205260409020548110156117cd576001600160a01b03821660009081526005602052604090208054429190839081106115f857fe5b906000526020600020906002020160000154116117c5576001600160a01b03821660009081526005602052604090208054611638919083908110610ad857fe5b6001600160a01b03831660008181526020818152604080832094909455600590529190912080547f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f191908490811061168c57fe5b9060005260206000209060020201600101546040518082815260200191505060405180910390a26001600160a01b03821660009081526005602052604081208054839081106116d757fe5b60009182526020808320600160029093020191909101929092556001600160a01b03841681526005909152604090205460001901811461179a576001600160a01b03821660009081526005602052604090208054600019810190811061173957fe5b906000526020600020906002020160056000846001600160a01b03166001600160a01b03168152602001908152602001600020828154811061177757fe5b600091825260209091208254600290920201908155600191820154910155600019015b6001600160a01b03821660009081526005602052604090208054906117c3906000198301611bc2565b505b6001016115b1565b5050565b60006117de848484611a8c565b6001600160a01b038416600090815260016020908152604080832033808552925290912054611819918691610731908663ffffffff61196516565b5060019392505050565b6000828201838110156109e85760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b031660009081526020819052604090205490565b6001600160a01b0382166118e357604051600160e51b62461bcd028152600401808060200182810382526021815260200180611d516021913960400191505060405180910390fd5b6002546118f6908263ffffffff61196516565b6002556001600160a01b038216600090815260208190526040902054611922908263ffffffff61196516565b6001600160a01b03831660008181526020818152604080832094909455835185815293519193600080516020611d31833981519152929081900390910190a35050565b6000828211156119bf5760408051600160e51b62461bcd02815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60006105e9338484611a8c565b6001600160a01b038116611a305760408051600160e51b62461bcd02815260206004820152600d60248201527f416c7265616479204f776e657200000000000000000000000000000000000000604482015290519081900360640190fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316611ad457604051600160e51b62461bcd028152600401808060200182810382526025815260200180611d726025913960400191505060405180910390fd5b6001600160a01b038216611b1c57604051600160e51b62461bcd028152600401808060200182810382526023815260200180611cec6023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054611b45908263ffffffff61196516565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611b7a908263ffffffff61182316565b6001600160a01b03808416600081815260208181526040918290209490945580518581529051919392871692600080516020611d3183398151915292918290030190a3505050565b815481835581811115610c9857600083815260209020610c98916105f69160029182028101918502015b80821115611c065760008082556001820155600201611bec565b5090565b6001600160a01b038216611c685760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611c7b908263ffffffff61182316565b6002556001600160a01b038216600090815260208190526040902054611ca7908263ffffffff61182316565b6001600160a01b038316600081815260208181526040808320949094558351858152935192939192600080516020611d318339815191529281900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a165627a7a7230582053f4c9106fa51bbd368674058bf5a9cd08d19894c59ddce354558135e5cb419a0029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,749
0xd23ed1c0900637d44a18f8d69d60664b762640de
/** *Submitted for verification at Etherscan.io on 2022-04-03 */ /** ╭━━╮╱╱╱╭╮╱╱╱╱╱╭━━━┳╮╱╱╭╮ ┃╭╮┃╱╱╱┃┃╱╱╱╱╱┃╭━╮┃┃╱╱┃┃ ┃╰╯╰┳━━┫╰━┳╮╱╭┫╰━━┫╰━┳┫╰━┳━━╮ ┃╭━╮┃╭╮┃╭╮┃┃╱┃┣━━╮┃╭╮┣┫╭╮┃╭╮┃ ┃╰━╯┃╭╮┃╰╯┃╰━╯┃╰━╯┃┃┃┃┃╰╯┃╭╮┃ ╰━━━┻╯╰┻━━┻━╮╭┻━━━┻╯╰┻┻━━┻╯╰╯ ╱╱╱╱╱╱╱╱╱╱╭━╯┃ ╱╱╱╱╱╱╱╱╱╱╰━━╯ We know there is alot of this shitcoins , but here you go , another one ! */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Babyshiba is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Babyshiba"; string private constant _symbol = "BSHIB"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x85F6D9b58207419b7ec50aDa5BB08a072CE6e8fA); address payable private _marketingAddress = payable(0x85F6D9b58207419b7ec50aDa5BB08a072CE6e8fA); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = true; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000 * 10**9; uint256 public _maxWalletSize = 20000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461065c578063dd62ed3e14610685578063ea1644d5146106c2578063f2fde38b146106eb576101d7565b8063a2a957bb146105a2578063a9059cbb146105cb578063bfd7928414610608578063c3c8cd8014610645576101d7565b80638f70ccf7116100d15780638f70ccf7146104fa5780638f9a55c01461052357806395d89b411461054e57806398a5c31514610579576101d7565b80637d1db4a5146104675780637f2feddc146104925780638da5cb5b146104cf576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190612d68565b610714565b005b34801561021157600080fd5b5061021a61083e565b6040516102279190612e39565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612e91565b61087b565b6040516102649190612eec565b60405180910390f35b34801561027957600080fd5b50610282610899565b60405161028f9190612f66565b60405180910390f35b3480156102a457600080fd5b506102ad6108bf565b6040516102ba9190612f90565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612fab565b6108ce565b6040516102f79190612eec565b60405180910390f35b34801561030c57600080fd5b506103156109a7565b6040516103229190612f90565b60405180910390f35b34801561033757600080fd5b506103406109ad565b60405161034d919061301a565b60405180910390f35b34801561036257600080fd5b5061036b6109b6565b6040516103789190613044565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a3919061305f565b6109dc565b005b3480156103b657600080fd5b506103d160048036038101906103cc91906130b8565b610acc565b005b3480156103df57600080fd5b506103e8610b7e565b005b3480156103f657600080fd5b50610411600480360381019061040c919061305f565b610c4f565b60405161041e9190612f90565b60405180910390f35b34801561043357600080fd5b5061043c610ca0565b005b34801561044a57600080fd5b50610465600480360381019061046091906130e5565b610df3565b005b34801561047357600080fd5b5061047c610e92565b6040516104899190612f90565b60405180910390f35b34801561049e57600080fd5b506104b960048036038101906104b4919061305f565b610e98565b6040516104c69190612f90565b60405180910390f35b3480156104db57600080fd5b506104e4610eb0565b6040516104f19190613044565b60405180910390f35b34801561050657600080fd5b50610521600480360381019061051c91906130b8565b610ed9565b005b34801561052f57600080fd5b50610538610f8b565b6040516105459190612f90565b60405180910390f35b34801561055a57600080fd5b50610563610f91565b6040516105709190612e39565b60405180910390f35b34801561058557600080fd5b506105a0600480360381019061059b91906130e5565b610fce565b005b3480156105ae57600080fd5b506105c960048036038101906105c49190613112565b61106d565b005b3480156105d757600080fd5b506105f260048036038101906105ed9190612e91565b611124565b6040516105ff9190612eec565b60405180910390f35b34801561061457600080fd5b5061062f600480360381019061062a919061305f565b611142565b60405161063c9190612eec565b60405180910390f35b34801561065157600080fd5b5061065a611162565b005b34801561066857600080fd5b50610683600480360381019061067e91906131d4565b61123b565b005b34801561069157600080fd5b506106ac60048036038101906106a79190613234565b611375565b6040516106b99190612f90565b60405180910390f35b3480156106ce57600080fd5b506106e960048036038101906106e491906130e5565b6113fc565b005b3480156106f757600080fd5b50610712600480360381019061070d919061305f565b61149b565b005b61071c61165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a0906132c0565b60405180910390fd5b60005b815181101561083a576001601060008484815181106107ce576107cd6132e0565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806108329061333e565b9150506107ac565b5050565b60606040518060400160405280600981526020017f4261627973686962610000000000000000000000000000000000000000000000815250905090565b600061088f61088861165d565b8484611665565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600066038d7ea4c68000905090565b60006108db848484611830565b61099c846108e761165d565b61099785604051806060016040528060288152602001613d7f60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061094d61165d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120b59092919063ffffffff16565b611665565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109e461165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a68906132c0565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ad461165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b58906132c0565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bbf61165d565b73ffffffffffffffffffffffffffffffffffffffff161480610c355750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c1d61165d565b73ffffffffffffffffffffffffffffffffffffffff16145b610c3e57600080fd5b6000479050610c4c81612119565b50565b6000610c99600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612185565b9050919050565b610ca861165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2c906132c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dfb61165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7f906132c0565b60405180910390fd5b8060168190555050565b60165481565b60116020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ee161165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f65906132c0565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600581526020017f4253484942000000000000000000000000000000000000000000000000000000815250905090565b610fd661165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611063576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105a906132c0565b60405180910390fd5b8060188190555050565b61107561165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611102576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f9906132c0565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b600061113861113161165d565b8484611830565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111a361165d565b73ffffffffffffffffffffffffffffffffffffffff1614806112195750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661120161165d565b73ffffffffffffffffffffffffffffffffffffffff16145b61122257600080fd5b600061122d30610c4f565b9050611238816121f3565b50565b61124361165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c7906132c0565b60405180910390fd5b60005b8383905081101561136f5781600560008686858181106112f6576112f56132e0565b5b905060200201602081019061130b919061305f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806113679061333e565b9150506112d3565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61140461165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611491576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611488906132c0565b60405180910390fd5b8060178190555050565b6114a361165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611530576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611527906132c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156115a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611597906133f9565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cc9061348b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173c9061351d565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118239190612f90565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611897906135af565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190790613641565b60405180910390fd5b60008111611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161194a906136d3565b60405180910390fd5b61195b610eb0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119c95750611999610eb0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611db457601560149054906101000a900460ff16611a58576119ea610eb0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4e90613765565b60405180910390fd5b5b601654811115611a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a94906137d1565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b415750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7790613863565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c2d5760175481611be284610c4f565b611bec9190613883565b10611c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c239061394b565b60405180910390fd5b5b6000611c3830610c4f565b9050600060185482101590506016548210611c535760165491505b808015611c6b575060158054906101000a900460ff16155b8015611cc55750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cdd5750601560169054906101000a900460ff165b8015611d335750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d895750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611db157611d97826121f3565b60004790506000811115611daf57611dae47612119565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e5b5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611f0e5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611f0d5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f1c57600090506120a3565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fc75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fdf57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561208a5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156120a257600a54600c81905550600b54600d819055505b5b6120af84848484612479565b50505050565b60008383111582906120fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f49190612e39565b60405180910390fd5b506000838561210c919061396b565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612181573d6000803e3d6000fd5b5050565b60006006548211156121cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c390613a11565b60405180910390fd5b60006121d66124a6565b90506121eb81846124d190919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561222a57612229612bc7565b5b6040519080825280602002602001820160405280156122585781602001602082028036833780820191505090505b50905030816000815181106122705761226f6132e0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561231257600080fd5b505afa158015612326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234a9190613a46565b8160018151811061235e5761235d6132e0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506123c530601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611665565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612429959493929190613b6c565b600060405180830381600087803b15801561244357600080fd5b505af1158015612457573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b806124875761248661251b565b5b61249284848461255e565b806124a05761249f612729565b5b50505050565b60008060006124b361273d565b915091506124ca81836124d190919063ffffffff16565b9250505090565b600061251383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612799565b905092915050565b6000600c5414801561252f57506000600d54145b156125395761255c565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612570876127fc565b9550955095509550955095506125ce86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461286490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061266385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128ae90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126af8161290c565b6126b984836129c9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516127169190612f90565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008060006006549050600066038d7ea4c68000905061276f66038d7ea4c680006006546124d190919063ffffffff16565b82101561278c5760065466038d7ea4c68000935093505050612795565b81819350935050505b9091565b600080831182906127e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d79190612e39565b60405180910390fd5b50600083856127ef9190613bf5565b9050809150509392505050565b60008060008060008060008060006128198a600c54600d54612a03565b92509250925060006128296124a6565b9050600080600061283c8e878787612a99565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006128a683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120b5565b905092915050565b60008082846128bd9190613883565b905083811015612902576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128f990613c72565b60405180910390fd5b8091505092915050565b60006129166124a6565b9050600061292d8284612b2290919063ffffffff16565b905061298181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128ae90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129de8260065461286490919063ffffffff16565b6006819055506129f9816007546128ae90919063ffffffff16565b6007819055505050565b600080600080612a2f6064612a21888a612b2290919063ffffffff16565b6124d190919063ffffffff16565b90506000612a596064612a4b888b612b2290919063ffffffff16565b6124d190919063ffffffff16565b90506000612a8282612a74858c61286490919063ffffffff16565b61286490919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612ab28589612b2290919063ffffffff16565b90506000612ac98689612b2290919063ffffffff16565b90506000612ae08789612b2290919063ffffffff16565b90506000612b0982612afb858761286490919063ffffffff16565b61286490919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612b355760009050612b97565b60008284612b439190613c92565b9050828482612b529190613bf5565b14612b92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8990613d5e565b60405180910390fd5b809150505b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612bff82612bb6565b810181811067ffffffffffffffff82111715612c1e57612c1d612bc7565b5b80604052505050565b6000612c31612b9d565b9050612c3d8282612bf6565b919050565b600067ffffffffffffffff821115612c5d57612c5c612bc7565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612c9e82612c73565b9050919050565b612cae81612c93565b8114612cb957600080fd5b50565b600081359050612ccb81612ca5565b92915050565b6000612ce4612cdf84612c42565b612c27565b90508083825260208201905060208402830185811115612d0757612d06612c6e565b5b835b81811015612d305780612d1c8882612cbc565b845260208401935050602081019050612d09565b5050509392505050565b600082601f830112612d4f57612d4e612bb1565b5b8135612d5f848260208601612cd1565b91505092915050565b600060208284031215612d7e57612d7d612ba7565b5b600082013567ffffffffffffffff811115612d9c57612d9b612bac565b5b612da884828501612d3a565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612deb578082015181840152602081019050612dd0565b83811115612dfa576000848401525b50505050565b6000612e0b82612db1565b612e158185612dbc565b9350612e25818560208601612dcd565b612e2e81612bb6565b840191505092915050565b60006020820190508181036000830152612e538184612e00565b905092915050565b6000819050919050565b612e6e81612e5b565b8114612e7957600080fd5b50565b600081359050612e8b81612e65565b92915050565b60008060408385031215612ea857612ea7612ba7565b5b6000612eb685828601612cbc565b9250506020612ec785828601612e7c565b9150509250929050565b60008115159050919050565b612ee681612ed1565b82525050565b6000602082019050612f016000830184612edd565b92915050565b6000819050919050565b6000612f2c612f27612f2284612c73565b612f07565b612c73565b9050919050565b6000612f3e82612f11565b9050919050565b6000612f5082612f33565b9050919050565b612f6081612f45565b82525050565b6000602082019050612f7b6000830184612f57565b92915050565b612f8a81612e5b565b82525050565b6000602082019050612fa56000830184612f81565b92915050565b600080600060608486031215612fc457612fc3612ba7565b5b6000612fd286828701612cbc565b9350506020612fe386828701612cbc565b9250506040612ff486828701612e7c565b9150509250925092565b600060ff82169050919050565b61301481612ffe565b82525050565b600060208201905061302f600083018461300b565b92915050565b61303e81612c93565b82525050565b60006020820190506130596000830184613035565b92915050565b60006020828403121561307557613074612ba7565b5b600061308384828501612cbc565b91505092915050565b61309581612ed1565b81146130a057600080fd5b50565b6000813590506130b28161308c565b92915050565b6000602082840312156130ce576130cd612ba7565b5b60006130dc848285016130a3565b91505092915050565b6000602082840312156130fb576130fa612ba7565b5b600061310984828501612e7c565b91505092915050565b6000806000806080858703121561312c5761312b612ba7565b5b600061313a87828801612e7c565b945050602061314b87828801612e7c565b935050604061315c87828801612e7c565b925050606061316d87828801612e7c565b91505092959194509250565b600080fd5b60008083601f84011261319457613193612bb1565b5b8235905067ffffffffffffffff8111156131b1576131b0613179565b5b6020830191508360208202830111156131cd576131cc612c6e565b5b9250929050565b6000806000604084860312156131ed576131ec612ba7565b5b600084013567ffffffffffffffff81111561320b5761320a612bac565b5b6132178682870161317e565b9350935050602061322a868287016130a3565b9150509250925092565b6000806040838503121561324b5761324a612ba7565b5b600061325985828601612cbc565b925050602061326a85828601612cbc565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006132aa602083612dbc565b91506132b582613274565b602082019050919050565b600060208201905081810360008301526132d98161329d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061334982612e5b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561337c5761337b61330f565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006133e3602683612dbc565b91506133ee82613387565b604082019050919050565b60006020820190508181036000830152613412816133d6565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613475602483612dbc565b915061348082613419565b604082019050919050565b600060208201905081810360008301526134a481613468565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613507602283612dbc565b9150613512826134ab565b604082019050919050565b60006020820190508181036000830152613536816134fa565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613599602583612dbc565b91506135a48261353d565b604082019050919050565b600060208201905081810360008301526135c88161358c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061362b602383612dbc565b9150613636826135cf565b604082019050919050565b6000602082019050818103600083015261365a8161361e565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006136bd602983612dbc565b91506136c882613661565b604082019050919050565b600060208201905081810360008301526136ec816136b0565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b600061374f603f83612dbc565b915061375a826136f3565b604082019050919050565b6000602082019050818103600083015261377e81613742565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b60006137bb601c83612dbc565b91506137c682613785565b602082019050919050565b600060208201905081810360008301526137ea816137ae565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b600061384d602383612dbc565b9150613858826137f1565b604082019050919050565b6000602082019050818103600083015261387c81613840565b9050919050565b600061388e82612e5b565b915061389983612e5b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138ce576138cd61330f565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b6000613935602383612dbc565b9150613940826138d9565b604082019050919050565b6000602082019050818103600083015261396481613928565b9050919050565b600061397682612e5b565b915061398183612e5b565b9250828210156139945761399361330f565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006139fb602a83612dbc565b9150613a068261399f565b604082019050919050565b60006020820190508181036000830152613a2a816139ee565b9050919050565b600081519050613a4081612ca5565b92915050565b600060208284031215613a5c57613a5b612ba7565b5b6000613a6a84828501613a31565b91505092915050565b6000819050919050565b6000613a98613a93613a8e84613a73565b612f07565b612e5b565b9050919050565b613aa881613a7d565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613ae381612c93565b82525050565b6000613af58383613ada565b60208301905092915050565b6000602082019050919050565b6000613b1982613aae565b613b238185613ab9565b9350613b2e83613aca565b8060005b83811015613b5f578151613b468882613ae9565b9750613b5183613b01565b925050600181019050613b32565b5085935050505092915050565b600060a082019050613b816000830188612f81565b613b8e6020830187613a9f565b8181036040830152613ba08186613b0e565b9050613baf6060830185613035565b613bbc6080830184612f81565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613c0082612e5b565b9150613c0b83612e5b565b925082613c1b57613c1a613bc6565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613c5c601b83612dbc565b9150613c6782613c26565b602082019050919050565b60006020820190508181036000830152613c8b81613c4f565b9050919050565b6000613c9d82612e5b565b9150613ca883612e5b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ce157613ce061330f565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d48602183612dbc565b9150613d5382613cec565b604082019050919050565b60006020820190508181036000830152613d7781613d3b565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c8c1408e3f6d8a187c058b2e15ef1235edcbb14ef18c63643dce0a6f609298fb64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,750
0x2a6294578afea29c76afeb6f4a383cab0eb0b5ad
/** *Submitted for verification at Etherscan.io on 2022-03-18 */ /* Telegram: https://t.me/apebroportal The Degen Low cap Launch for the APE Trend ─█▀▀█ ░█▀▀█ ░█▀▀▀ ░█▀▀█ ░█▀▀█ ░█▀▀▀█ ░█▄▄█ ░█▄▄█ ░█▀▀▀ ░█▀▀▄ ░█▄▄▀ ░█──░█ ░█─░█ ░█─── ░█▄▄▄ ░█▄▄█ ░█─░█ ░█▄▄▄█ $APE BRO Holders rewarded with $APE (BAYC) Max Transaaction - 1% Max Wallet - 2.5% 10% Tax (1% Reflection) */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract apebroofficial is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ape Bro"; string private constant _symbol = "APE BRO"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 9; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xea057d97EeB394C6836736EBdfA6a39bCE6f57B1); address payable private _marketingAddress = payable(0xea057d97EeB394C6836736EBdfA6a39bCE6f57B1); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 25000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610555578063dd62ed3e14610575578063ea1644d5146105bb578063f2fde38b146105db57600080fd5b8063a2a957bb146104d0578063a9059cbb146104f0578063bfd7928414610510578063c3c8cd801461054057600080fd5b80638f70ccf7116100d15780638f70ccf71461044a5780638f9a55c01461046a57806395d89b411461048057806398a5c315146104b057600080fd5b80637d1db4a5146103e95780637f2feddc146103ff5780638da5cb5b1461042c57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461037f57806370a0823114610394578063715018a6146103b457806374010ece146103c957600080fd5b8063313ce5671461030357806349bd5a5e1461031f5780636b9990531461033f5780636d8aa8f81461035f57600080fd5b80631694505e116101ab5780631694505e1461027057806318160ddd146102a857806323b872dd146102cd5780632fd689e3146102ed57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024057600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195f565b6105fb565b005b34801561020a57600080fd5b506040805180820190915260078152664170652042726f60c81b60208201525b6040516102379190611a24565b60405180910390f35b34801561024c57600080fd5b5061026061025b366004611a79565b61069a565b6040519015158152602001610237565b34801561027c57600080fd5b50601454610290906001600160a01b031681565b6040516001600160a01b039091168152602001610237565b3480156102b457600080fd5b50670de0b6b3a76400005b604051908152602001610237565b3480156102d957600080fd5b506102606102e8366004611aa5565b6106b1565b3480156102f957600080fd5b506102bf60185481565b34801561030f57600080fd5b5060405160098152602001610237565b34801561032b57600080fd5b50601554610290906001600160a01b031681565b34801561034b57600080fd5b506101fc61035a366004611ae6565b61071a565b34801561036b57600080fd5b506101fc61037a366004611b13565b610765565b34801561038b57600080fd5b506101fc6107ad565b3480156103a057600080fd5b506102bf6103af366004611ae6565b6107f8565b3480156103c057600080fd5b506101fc61081a565b3480156103d557600080fd5b506101fc6103e4366004611b2e565b61088e565b3480156103f557600080fd5b506102bf60165481565b34801561040b57600080fd5b506102bf61041a366004611ae6565b60116020526000908152604090205481565b34801561043857600080fd5b506000546001600160a01b0316610290565b34801561045657600080fd5b506101fc610465366004611b13565b6108bd565b34801561047657600080fd5b506102bf60175481565b34801561048c57600080fd5b506040805180820190915260078152664150452042524f60c81b602082015261022a565b3480156104bc57600080fd5b506101fc6104cb366004611b2e565b610905565b3480156104dc57600080fd5b506101fc6104eb366004611b47565b610934565b3480156104fc57600080fd5b5061026061050b366004611a79565b610972565b34801561051c57600080fd5b5061026061052b366004611ae6565b60106020526000908152604090205460ff1681565b34801561054c57600080fd5b506101fc61097f565b34801561056157600080fd5b506101fc610570366004611b79565b6109d3565b34801561058157600080fd5b506102bf610590366004611bfd565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c757600080fd5b506101fc6105d6366004611b2e565b610a74565b3480156105e757600080fd5b506101fc6105f6366004611ae6565b610aa3565b6000546001600160a01b0316331461062e5760405162461bcd60e51b815260040161062590611c36565b60405180910390fd5b60005b81518110156106965760016010600084848151811061065257610652611c6b565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068e81611c97565b915050610631565b5050565b60006106a7338484610b8d565b5060015b92915050565b60006106be848484610cb1565b610710843361070b85604051806060016040528060288152602001611db1602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ed565b610b8d565b5060019392505050565b6000546001600160a01b031633146107445760405162461bcd60e51b815260040161062590611c36565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078f5760405162461bcd60e51b815260040161062590611c36565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e257506013546001600160a01b0316336001600160a01b0316145b6107eb57600080fd5b476107f581611227565b50565b6001600160a01b0381166000908152600260205260408120546106ab90611261565b6000546001600160a01b031633146108445760405162461bcd60e51b815260040161062590611c36565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b85760405162461bcd60e51b815260040161062590611c36565b601655565b6000546001600160a01b031633146108e75760405162461bcd60e51b815260040161062590611c36565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092f5760405162461bcd60e51b815260040161062590611c36565b601855565b6000546001600160a01b0316331461095e5760405162461bcd60e51b815260040161062590611c36565b600893909355600a91909155600955600b55565b60006106a7338484610cb1565b6012546001600160a01b0316336001600160a01b031614806109b457506013546001600160a01b0316336001600160a01b0316145b6109bd57600080fd5b60006109c8306107f8565b90506107f5816112e5565b6000546001600160a01b031633146109fd5760405162461bcd60e51b815260040161062590611c36565b60005b82811015610a6e578160056000868685818110610a1f57610a1f611c6b565b9050602002016020810190610a349190611ae6565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6681611c97565b915050610a00565b50505050565b6000546001600160a01b03163314610a9e5760405162461bcd60e51b815260040161062590611c36565b601755565b6000546001600160a01b03163314610acd5760405162461bcd60e51b815260040161062590611c36565b6001600160a01b038116610b325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610625565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bef5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610625565b6001600160a01b038216610c505760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610625565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d155760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610625565b6001600160a01b038216610d775760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610625565b60008111610dd95760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610625565b6000546001600160a01b03848116911614801590610e0557506000546001600160a01b03838116911614155b156110e657601554600160a01b900460ff16610e9e576000546001600160a01b03848116911614610e9e5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610625565b601654811115610ef05760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610625565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3257506001600160a01b03821660009081526010602052604090205460ff16155b610f8a5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610625565b6015546001600160a01b0383811691161461100f5760175481610fac846107f8565b610fb69190611cb2565b1061100f5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610625565b600061101a306107f8565b6018546016549192508210159082106110335760165491505b80801561104a5750601554600160a81b900460ff16155b801561106457506015546001600160a01b03868116911614155b80156110795750601554600160b01b900460ff165b801561109e57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c357506001600160a01b03841660009081526005602052604090205460ff16155b156110e3576110d1826112e5565b4780156110e1576110e147611227565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112857506001600160a01b03831660009081526005602052604090205460ff165b8061115a57506015546001600160a01b0385811691161480159061115a57506015546001600160a01b03848116911614155b15611167575060006111e1565b6015546001600160a01b03858116911614801561119257506014546001600160a01b03848116911614155b156111a457600854600c55600954600d555b6015546001600160a01b0384811691161480156111cf57506014546001600160a01b03858116911614155b156111e157600a54600c55600b54600d555b610a6e8484848461146e565b600081848411156112115760405162461bcd60e51b81526004016106259190611a24565b50600061121e8486611cca565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610696573d6000803e3d6000fd5b60006006548211156112c85760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610625565b60006112d261149c565b90506112de83826114bf565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132d5761132d611c6b565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138157600080fd5b505afa158015611395573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b99190611ce1565b816001815181106113cc576113cc611c6b565b6001600160a01b0392831660209182029290920101526014546113f29130911684610b8d565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142b908590600090869030904290600401611cfe565b600060405180830381600087803b15801561144557600080fd5b505af1158015611459573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147b5761147b611501565b61148684848461152f565b80610a6e57610a6e600e54600c55600f54600d55565b60008060006114a9611626565b90925090506114b882826114bf565b9250505090565b60006112de83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611666565b600c541580156115115750600d54155b1561151857565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154187611694565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157390876116f1565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a29086611733565b6001600160a01b0389166000908152600260205260409020556115c481611792565b6115ce84836117dc565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161391815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164182826114bf565b82101561165d57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116875760405162461bcd60e51b81526004016106259190611a24565b50600061121e8486611d6f565b60008060008060008060008060006116b18a600c54600d54611800565b92509250925060006116c161149c565b905060008060006116d48e878787611855565b919e509c509a509598509396509194505050505091939550919395565b60006112de83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ed565b6000806117408385611cb2565b9050838110156112de5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610625565b600061179c61149c565b905060006117aa83836118a5565b306000908152600260205260409020549091506117c79082611733565b30600090815260026020526040902055505050565b6006546117e990836116f1565b6006556007546117f99082611733565b6007555050565b600080808061181a606461181489896118a5565b906114bf565b9050600061182d60646118148a896118a5565b905060006118458261183f8b866116f1565b906116f1565b9992985090965090945050505050565b600080808061186488866118a5565b9050600061187288876118a5565b9050600061188088886118a5565b905060006118928261183f86866116f1565b939b939a50919850919650505050505050565b6000826118b4575060006106ab565b60006118c08385611d91565b9050826118cd8583611d6f565b146112de5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610625565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f557600080fd5b803561195a8161193a565b919050565b6000602080838503121561197257600080fd5b823567ffffffffffffffff8082111561198a57600080fd5b818501915085601f83011261199e57600080fd5b8135818111156119b0576119b0611924565b8060051b604051601f19603f830116810181811085821117156119d5576119d5611924565b6040529182528482019250838101850191888311156119f357600080fd5b938501935b82851015611a1857611a098561194f565b845293850193928501926119f8565b98975050505050505050565b600060208083528351808285015260005b81811015611a5157858101830151858201604001528201611a35565b81811115611a63576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8c57600080fd5b8235611a978161193a565b946020939093013593505050565b600080600060608486031215611aba57600080fd5b8335611ac58161193a565b92506020840135611ad58161193a565b929592945050506040919091013590565b600060208284031215611af857600080fd5b81356112de8161193a565b8035801515811461195a57600080fd5b600060208284031215611b2557600080fd5b6112de82611b03565b600060208284031215611b4057600080fd5b5035919050565b60008060008060808587031215611b5d57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8e57600080fd5b833567ffffffffffffffff80821115611ba657600080fd5b818601915086601f830112611bba57600080fd5b813581811115611bc957600080fd5b8760208260051b8501011115611bde57600080fd5b602092830195509350611bf49186019050611b03565b90509250925092565b60008060408385031215611c1057600080fd5b8235611c1b8161193a565b91506020830135611c2b8161193a565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cab57611cab611c81565b5060010190565b60008219821115611cc557611cc5611c81565b500190565b600082821015611cdc57611cdc611c81565b500390565b600060208284031215611cf357600080fd5b81516112de8161193a565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4e5784516001600160a01b031683529383019391830191600101611d29565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8c57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611dab57611dab611c81565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122053f329cdb618eaa84103d49685ffa039016da5e6cd168ca4a2fed92373649daa64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,751
0x58523cc86892a2a659736ad467b0af1abf59ef84
/** *Submitted for verification at Etherscan.io on 2021-06-30 */ /* https://t.me/FlokiRamen https://www.flokiramen.online */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract FlokiRamen is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "FlokiRamen"; string private constant _symbol = "FRAMEN"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 1000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461033b578063a9059cbb14610366578063c3c8cd80146103a3578063d543dbeb146103ba578063dd62ed3e146103e357610113565b80636fc3eaec146102a557806370a08231146102bc578063715018a6146102f95780638da5cb5b1461031057610113565b806323b872dd116100dc57806323b872dd146101d4578063293230b814610211578063313ce567146102285780635932ead1146102535780636b9990531461027c57610113565b8062b8cf2a1461011857806306fdde0314610141578063095ea7b31461016c57806318160ddd146101a957610113565b3661011357005b600080fd5b34801561012457600080fd5b5061013f600480360381019061013a9190612a3c565b610420565b005b34801561014d57600080fd5b50610156610570565b6040516101639190612edd565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e9190612a00565b6105ad565b6040516101a09190612ec2565b60405180910390f35b3480156101b557600080fd5b506101be6105cb565b6040516101cb919061307f565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f691906129b1565b6105dc565b6040516102089190612ec2565b60405180910390f35b34801561021d57600080fd5b506102266106b5565b005b34801561023457600080fd5b5061023d610c11565b60405161024a91906130f4565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190612a7d565b610c1a565b005b34801561028857600080fd5b506102a3600480360381019061029e9190612923565b610ccc565b005b3480156102b157600080fd5b506102ba610dbc565b005b3480156102c857600080fd5b506102e360048036038101906102de9190612923565b610e2e565b6040516102f0919061307f565b60405180910390f35b34801561030557600080fd5b5061030e610e7f565b005b34801561031c57600080fd5b50610325610fd2565b6040516103329190612df4565b60405180910390f35b34801561034757600080fd5b50610350610ffb565b60405161035d9190612edd565b60405180910390f35b34801561037257600080fd5b5061038d60048036038101906103889190612a00565b611038565b60405161039a9190612ec2565b60405180910390f35b3480156103af57600080fd5b506103b8611056565b005b3480156103c657600080fd5b506103e160048036038101906103dc9190612acf565b6110d0565b005b3480156103ef57600080fd5b5061040a60048036038101906104059190612975565b611219565b604051610417919061307f565b60405180910390f35b6104286112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ac90612fdf565b60405180910390fd5b60005b815181101561056c576001600a6000848481518110610500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061056490613395565b9150506104b8565b5050565b60606040518060400160405280600a81526020017f466c6f6b6952616d656e00000000000000000000000000000000000000000000815250905090565b60006105c16105ba6112a0565b84846112a8565b6001905092915050565b600068056bc75e2d63100000905090565b60006105e9848484611473565b6106aa846105f56112a0565b6106a5856040518060600160405280602881526020016137b860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065b6112a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c329092919063ffffffff16565b6112a8565b600190509392505050565b6106bd6112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190612fdf565b60405180910390fd5b600f60149054906101000a900460ff161561079a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079190612f1f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061082a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1668056bc75e2d631000006112a8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a8919061294c565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561090a57600080fd5b505afa15801561091e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610942919061294c565b6040518363ffffffff1660e01b815260040161095f929190612e0f565b602060405180830381600087803b15801561097957600080fd5b505af115801561098d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b1919061294c565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610a3a30610e2e565b600080610a45610fd2565b426040518863ffffffff1660e01b8152600401610a6796959493929190612e61565b6060604051808303818588803b158015610a8057600080fd5b505af1158015610a94573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ab99190612af8565b5050506001600f60166101000a81548160ff0219169083151502179055506000600f60176101000a81548160ff021916908315150217905550670de0b6b3a76400006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610bbb929190612e38565b602060405180830381600087803b158015610bd557600080fd5b505af1158015610be9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0d9190612aa6565b5050565b60006009905090565b610c226112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610caf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca690612fdf565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b610cd46112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5890612fdf565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfd6112a0565b73ffffffffffffffffffffffffffffffffffffffff1614610e1d57600080fd5b6000479050610e2b81611c96565b50565b6000610e78600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d91565b9050919050565b610e876112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0b90612fdf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4652414d454e0000000000000000000000000000000000000000000000000000815250905090565b600061104c6110456112a0565b8484611473565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110976112a0565b73ffffffffffffffffffffffffffffffffffffffff16146110b757600080fd5b60006110c230610e2e565b90506110cd81611dff565b50565b6110d86112a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611165576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115c90612fdf565b60405180910390fd5b600081116111a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119f90612f9f565b60405180910390fd5b6111d760646111c98368056bc75e2d631000006120f990919063ffffffff16565b61217490919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120e919061307f565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130f9061303f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137f90612f5f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611466919061307f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114da9061301f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611553576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154a90612eff565b60405180910390fd5b60008111611596576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158d90612fff565b60405180910390fd5b61159e610fd2565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160c57506115dc610fd2565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b6f57600f60179054906101000a900460ff161561183f573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168e57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e85750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117425750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183e57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117886112a0565b73ffffffffffffffffffffffffffffffffffffffff1614806117fe5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e66112a0565b73ffffffffffffffffffffffffffffffffffffffff16145b61183d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118349061305f565b60405180910390fd5b5b5b60105481111561184e57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f25750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fb57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a65750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fc5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a145750600f60179054906101000a900460ff165b15611ab55742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6457600080fd5b601e42611a7191906131b5565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac030610e2e565b9050600f60159054906101000a900460ff16158015611b2d5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b455750600f60169054906101000a900460ff165b15611b6d57611b5381611dff565b60004790506000811115611b6b57611b6a47611c96565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c165750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2057600090505b611c2c848484846121be565b50505050565b6000838311158290611c7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c719190612edd565b60405180910390fd5b5060008385611c899190613296565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce660028461217490919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d11573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6260028461217490919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8d573d6000803e3d6000fd5b5050565b6000600654821115611dd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dcf90612f3f565b60405180910390fd5b6000611de26121eb565b9050611df7818461217490919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8b5781602001602082028036833780820191505090505b5090503081600081518110611ec9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6b57600080fd5b505afa158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa3919061294c565b81600181518110611fdd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204430600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a8565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a895949392919061309a565b600060405180830381600087803b1580156120c257600080fd5b505af11580156120d6573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210c576000905061216e565b6000828461211a919061323c565b9050828482612129919061320b565b14612169576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216090612fbf565b60405180910390fd5b809150505b92915050565b60006121b683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612216565b905092915050565b806121cc576121cb612279565b5b6121d78484846122aa565b806121e5576121e4612475565b5b50505050565b60008060006121f8612487565b9150915061220f818361217490919063ffffffff16565b9250505090565b6000808311829061225d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122549190612edd565b60405180910390fd5b506000838561226c919061320b565b9050809150509392505050565b600060085414801561228d57506000600954145b15612297576122a8565b600060088190555060006009819055505b565b6000806000806000806122bc876124e9565b95509550955095509550955061231a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123af85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fb816125f9565b61240584836126b6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612462919061307f565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b60008060006006549050600068056bc75e2d6310000090506124bd68056bc75e2d6310000060065461217490919063ffffffff16565b8210156124dc5760065468056bc75e2d631000009350935050506124e5565b81819350935050505b9091565b60008060008060008060008060006125068a6008546009546126f0565b92509250925060006125166121eb565b905060008060006125298e878787612786565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c32565b905092915050565b60008082846125aa91906131b5565b9050838110156125ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e690612f7f565b60405180910390fd5b8091505092915050565b60006126036121eb565b9050600061261a82846120f990919063ffffffff16565b905061266e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cb8260065461255190919063ffffffff16565b6006819055506126e68160075461259b90919063ffffffff16565b6007819055505050565b60008060008061271c606461270e888a6120f990919063ffffffff16565b61217490919063ffffffff16565b905060006127466064612738888b6120f990919063ffffffff16565b61217490919063ffffffff16565b9050600061276f82612761858c61255190919063ffffffff16565b61255190919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061279f85896120f990919063ffffffff16565b905060006127b686896120f990919063ffffffff16565b905060006127cd87896120f990919063ffffffff16565b905060006127f6826127e8858761255190919063ffffffff16565b61255190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282261281d84613134565b61310f565b9050808382526020820190508285602086028201111561284157600080fd5b60005b858110156128715781612857888261287b565b845260208401935060208301925050600181019050612844565b5050509392505050565b60008135905061288a81613772565b92915050565b60008151905061289f81613772565b92915050565b600082601f8301126128b657600080fd5b81356128c684826020860161280f565b91505092915050565b6000813590506128de81613789565b92915050565b6000815190506128f381613789565b92915050565b600081359050612908816137a0565b92915050565b60008151905061291d816137a0565b92915050565b60006020828403121561293557600080fd5b60006129438482850161287b565b91505092915050565b60006020828403121561295e57600080fd5b600061296c84828501612890565b91505092915050565b6000806040838503121561298857600080fd5b60006129968582860161287b565b92505060206129a78582860161287b565b9150509250929050565b6000806000606084860312156129c657600080fd5b60006129d48682870161287b565b93505060206129e58682870161287b565b92505060406129f6868287016128f9565b9150509250925092565b60008060408385031215612a1357600080fd5b6000612a218582860161287b565b9250506020612a32858286016128f9565b9150509250929050565b600060208284031215612a4e57600080fd5b600082013567ffffffffffffffff811115612a6857600080fd5b612a74848285016128a5565b91505092915050565b600060208284031215612a8f57600080fd5b6000612a9d848285016128cf565b91505092915050565b600060208284031215612ab857600080fd5b6000612ac6848285016128e4565b91505092915050565b600060208284031215612ae157600080fd5b6000612aef848285016128f9565b91505092915050565b600080600060608486031215612b0d57600080fd5b6000612b1b8682870161290e565b9350506020612b2c8682870161290e565b9250506040612b3d8682870161290e565b9150509250925092565b6000612b538383612b5f565b60208301905092915050565b612b68816132ca565b82525050565b612b77816132ca565b82525050565b6000612b8882613170565b612b928185613193565b9350612b9d83613160565b8060005b83811015612bce578151612bb58882612b47565b9750612bc083613186565b925050600181019050612ba1565b5085935050505092915050565b612be4816132dc565b82525050565b612bf38161331f565b82525050565b6000612c048261317b565b612c0e81856131a4565b9350612c1e818560208601613331565b612c278161346b565b840191505092915050565b6000612c3f6023836131a4565b9150612c4a8261347c565b604082019050919050565b6000612c62601a836131a4565b9150612c6d826134cb565b602082019050919050565b6000612c85602a836131a4565b9150612c90826134f4565b604082019050919050565b6000612ca86022836131a4565b9150612cb382613543565b604082019050919050565b6000612ccb601b836131a4565b9150612cd682613592565b602082019050919050565b6000612cee601d836131a4565b9150612cf9826135bb565b602082019050919050565b6000612d116021836131a4565b9150612d1c826135e4565b604082019050919050565b6000612d346020836131a4565b9150612d3f82613633565b602082019050919050565b6000612d576029836131a4565b9150612d628261365c565b604082019050919050565b6000612d7a6025836131a4565b9150612d85826136ab565b604082019050919050565b6000612d9d6024836131a4565b9150612da8826136fa565b604082019050919050565b6000612dc06011836131a4565b9150612dcb82613749565b602082019050919050565b612ddf81613308565b82525050565b612dee81613312565b82525050565b6000602082019050612e096000830184612b6e565b92915050565b6000604082019050612e246000830185612b6e565b612e316020830184612b6e565b9392505050565b6000604082019050612e4d6000830185612b6e565b612e5a6020830184612dd6565b9392505050565b600060c082019050612e766000830189612b6e565b612e836020830188612dd6565b612e906040830187612bea565b612e9d6060830186612bea565b612eaa6080830185612b6e565b612eb760a0830184612dd6565b979650505050505050565b6000602082019050612ed76000830184612bdb565b92915050565b60006020820190508181036000830152612ef78184612bf9565b905092915050565b60006020820190508181036000830152612f1881612c32565b9050919050565b60006020820190508181036000830152612f3881612c55565b9050919050565b60006020820190508181036000830152612f5881612c78565b9050919050565b60006020820190508181036000830152612f7881612c9b565b9050919050565b60006020820190508181036000830152612f9881612cbe565b9050919050565b60006020820190508181036000830152612fb881612ce1565b9050919050565b60006020820190508181036000830152612fd881612d04565b9050919050565b60006020820190508181036000830152612ff881612d27565b9050919050565b6000602082019050818103600083015261301881612d4a565b9050919050565b6000602082019050818103600083015261303881612d6d565b9050919050565b6000602082019050818103600083015261305881612d90565b9050919050565b6000602082019050818103600083015261307881612db3565b9050919050565b60006020820190506130946000830184612dd6565b92915050565b600060a0820190506130af6000830188612dd6565b6130bc6020830187612bea565b81810360408301526130ce8186612b7d565b90506130dd6060830185612b6e565b6130ea6080830184612dd6565b9695505050505050565b60006020820190506131096000830184612de5565b92915050565b600061311961312a565b90506131258282613364565b919050565b6000604051905090565b600067ffffffffffffffff82111561314f5761314e61343c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c082613308565b91506131cb83613308565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613200576131ff6133de565b5b828201905092915050565b600061321682613308565b915061322183613308565b9250826132315761323061340d565b5b828204905092915050565b600061324782613308565b915061325283613308565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328b5761328a6133de565b5b828202905092915050565b60006132a182613308565b91506132ac83613308565b9250828210156132bf576132be6133de565b5b828203905092915050565b60006132d5826132e8565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332a82613308565b9050919050565b60005b8381101561334f578082015181840152602081019050613334565b8381111561335e576000848401525b50505050565b61336d8261346b565b810181811067ffffffffffffffff8211171561338c5761338b61343c565b5b80604052505050565b60006133a082613308565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d3576133d26133de565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377b816132ca565b811461378657600080fd5b50565b613792816132dc565b811461379d57600080fd5b50565b6137a981613308565b81146137b457600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203272103fae62fbda70c6a0427c79b101739a5151a7fde8f5f7e64c7b75b7b30364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,752
0x60c690f68f14f57ec60350d9b7601104390d1eeb
pragma solidity ^0.5.8; // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- contract SafeMath { function safeAdd(uint a, uint b) public pure returns (uint c) { c = a + b; require(c >= a); } function safeSub(uint a, uint b) public pure returns (uint c) { require(b <= a); c = a - b; } function safeMul(uint a, uint b) public pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function safeDiv(uint a, uint b) public pure returns (uint c) { require(b > 0); c = a / b; } } contract Administration is SafeMath { // ---------------------------------------------------------------------------- // Variables // ---------------------------------------------------------------------------- address payable CEOAddress; address public CTOAddress; address Signer; bool public paused = false; // ---------------------------------------------------------------------------- // Events // ---------------------------------------------------------------------------- event Pause(); event Unpause(); event CTOTransfer(address newCTO, address oldCTO); // ---------------------------------------------------------------------------- // Modifiers // ---------------------------------------------------------------------------- modifier onlyCEO() { require(msg.sender == CEOAddress); _; } modifier onlyAdmin() { require(msg.sender == CEOAddress || msg.sender == CTOAddress); _; } modifier whenNotPaused() { require(!paused); _; } modifier whenPaused() { require(paused); _; } // ---------------------------------------------------------------------------- // Public Functions // ---------------------------------------------------------------------------- function setCTO(address _newAdmin) public onlyCEO { require(_newAdmin != address(0)); emit CTOTransfer(_newAdmin, CTOAddress); CTOAddress = _newAdmin; } function withdrawBalance() external onlyCEO { CEOAddress.transfer(address(this).balance); } function pause() public onlyAdmin whenNotPaused returns(bool) { paused = true; emit Pause(); return true; } function unpause() public onlyAdmin whenPaused returns(bool) { paused = false; emit Unpause(); return true; } } contract Creative is Administration { // ---------------------------------------------------------------------------- // Variables // ---------------------------------------------------------------------------- struct Bet { uint[4] amount; uint timestamp; } struct Contract { uint result; //0-while running, 1-4 winner uint sides; uint StartTime; uint BetEndTime; uint ContractTime; mapping(address => Bet) PlayerToBet; mapping(address => bool) IfPlayed; mapping(address => bool) IfClaimed; } Contract[] contracts; uint public minBet = 10 finney; uint public maxBet = 10000 ether; uint TimeFactor; uint public contractFee = 100 finney; uint public taxRate = 9750; // ---------------------------------------------------------------------------- // Mappings // ---------------------------------------------------------------------------- mapping (uint => uint) TotalAmount; mapping (uint => uint[4]) EachAmount; mapping (uint => uint) TotalPlayers; // ---------------------------------------------------------------------------- // Events // ---------------------------------------------------------------------------- event ContractCreated(uint indexed contractId, uint sides, uint[4] eachAmount, address creator, uint contractTime, uint betEndTime); event NewBetSuccess(address indexed player, uint indexed side, uint[4] indexed amount, uint timeFactor); event BetAdjustSuccess(address indexed player, uint indexed side, uint[4] indexed amount, uint timeFactor); event ContractRevealed(uint indexed contractId, uint indexed result); event ContractClaimed(address indexed winner, uint indexed reward); // ---------------------------------------------------------------------------- // Internal Functions // ---------------------------------------------------------------------------- function _calculateTimeFactor(uint _betEndTime, uint _startTime) internal view returns (uint) { return (_betEndTime - now)*100/(_betEndTime - _startTime); } // ---------------------------------------------------------------------------- // Public Functions // ---------------------------------------------------------------------------- constructor(address _CTOAddress) public { CEOAddress = msg.sender; CTOAddress = _CTOAddress; } function createContract(uint sides, uint[4] memory amounts, uint contractTime, uint betEndTime) public payable whenNotPaused returns (uint) { require(amounts[0] > 0 || amounts[1] > 0 || amounts[2] > 0 || amounts[3] > 0, "SEER OFFICAL WARNING: At least bet on one side"); uint total = amounts[0] + amounts[1] + amounts[2] + amounts[3]; require(sides >= 2 && sides <= 4, "SEER OFFICAL WARNING: Can only have 2-4 sides"); require(msg.value >= (total + contractFee), "SEER OFFICAL WARNING: Does not send enough ETH"); require((now + 1 hours) <= betEndTime, "SEER OFFICAL WARNING: At least have one hour bet time"); require((contractTime - now)/3 >= (betEndTime - now), "SEER OFFICAL WARNING: Bet time need to be less or equal than 1/3 of total contract time"); Bet memory _bet = Bet({ amount: amounts, timestamp: _calculateTimeFactor(betEndTime, now) }); Contract memory _contract = Contract({ result: 0, sides: sides, StartTime: now, BetEndTime: betEndTime, ContractTime: contractTime }); uint newContractId = contracts.push(_contract) - 1; Contract storage newContract = contracts[newContractId]; newContract.PlayerToBet[msg.sender] = _bet; newContract.IfPlayed[msg.sender] = true; TotalAmount[newContractId] = total; EachAmount[newContractId] = amounts; TotalPlayers[newContractId] = 1; emit ContractCreated(newContractId, sides, amounts, msg.sender, contractTime, betEndTime); return 0; } function betContract(uint contractId, uint side, uint amount) public payable whenNotPaused returns (bool) { require(TotalAmount[contractId] > 0, "SEER OFFICAL WARNING: Contract has not been created"); require(amount >= minBet && amount <= maxBet, "SEER OFFICAL WARNING: Does not meet min or max bet requirement"); require(msg.value >= amount, "SEER OFFICAL WARNING: Does not send enough ETH"); Contract storage _contract = contracts[contractId]; require(side < _contract.sides, "SEER OFFICAL WARNING: You did not in correct side range"); require(now < _contract.BetEndTime, "SEER OFFICAL WARNING: Contract cannot be bet anymore"); require(_contract.result == 0, "SEER OFFICAL WARNING: Contact terminated"); uint timeFactor = _calculateTimeFactor(_contract.BetEndTime, _contract.StartTime); if(_contract.IfPlayed[msg.sender] == true) { Bet storage _bet = _contract.PlayerToBet[msg.sender]; _bet.amount[side] += amount; _bet.timestamp = timeFactor; EachAmount[contractId][side] += amount; TotalAmount[contractId] += amount; emit BetAdjustSuccess(msg.sender, side, _bet.amount, timeFactor); } else { uint[4] memory _amount; _amount[side] = amount; Bet memory _bet = Bet({ amount: _amount, timestamp: timeFactor }); _contract.IfPlayed[msg.sender] = true; _contract.PlayerToBet[msg.sender] = _bet; EachAmount[contractId][side] += amount; TotalAmount[contractId] += amount; TotalPlayers[contractId] += 1; emit NewBetSuccess(msg.sender, side, _amount, timeFactor); } return true; } function revealContract(uint contractId, uint result) public whenNotPaused onlyAdmin { require(result >= 1 && result<= 4, "SEER OFFICAL WARNING: Cannot recogonize result"); Contract storage _contract = contracts[contractId]; require(now > _contract.ContractTime, "SEER OFFICAL WARNING: Contract cannot be revealed yet"); _contract.result = result; emit ContractRevealed(contractId, result); } function claimContract(uint contractId) public whenNotPaused returns (uint) { require(TotalAmount[contractId] > 0, "SEER OFFICAL WARNING: Contract has not been created"); Contract storage _contract = contracts[contractId]; require(_contract.result > 0, "SEER OFFICAL WARNING: Contract has not been revealed"); require(_contract.IfPlayed[msg.sender] == true, "SEER OFFICAL WARNING: You did not play this contract"); require(_contract.IfClaimed[msg.sender] == false, "SEER OFFICAL WARNING: You already claimed reward"); uint reward; uint[4] memory _amount = _contract.PlayerToBet[msg.sender].amount; require(_amount[_contract.result - 1] > 0, "SEER OFFICAL WARNING: You are not qualified"); reward = _amount[_contract.result - 1]*taxRate*TotalAmount[contractId]/EachAmount[contractId][_contract.result - 1]/10000; msg.sender.transfer(reward); _contract.IfClaimed[msg.sender] == true; emit ContractClaimed(msg.sender, reward); return reward; } function adjustBetLimit(uint _minBet, uint _maxBet) public onlyAdmin { minBet = _minBet; maxBet = _maxBet; } function adjustFee(uint _fee) public onlyAdmin { contractFee = _fee; } function adjustTax(uint _tax) public onlyAdmin { taxRate = _tax; } function getContractAmount(uint contractId) public view returns ( uint totalAmount, uint amountOne, uint amountTwo, uint amountThree, uint amountFour ) { totalAmount = TotalAmount[contractId]; amountOne = EachAmount[contractId][0]; amountTwo = EachAmount[contractId][1]; amountThree = EachAmount[contractId][2]; amountFour = EachAmount[contractId][3]; } function getContractPlayerNum(uint contractId) public view returns (uint totalPlayer) { totalPlayer = TotalPlayers[contractId]; } function getIfPlayed(uint contractId, address player) public view returns (bool ifPlayed) { ifPlayed = contracts[contractId].IfPlayed[player]; } function getContractTime(uint contractId) public view returns ( uint contractTime, uint betEndTime ) { contractTime = contracts[contractId].ContractTime; betEndTime = contracts[contractId].BetEndTime; } function getContractBet(uint contractId, address player) public view returns ( uint[4] memory amounts, uint timeFactor ) { amounts = contracts[contractId].PlayerToBet[player].amount; timeFactor = contracts[contractId].PlayerToBet[player].timestamp; } function getContractResult(uint contractId) public view returns (uint result) { result = contracts[contractId].result; } function getIfClaimed(uint contractId, address player) public view returns (bool ifClaimed) { ifClaimed = contracts[contractId].IfClaimed[player]; } }
0x6080604052600436106101b75760003560e01c80638456cb59116100ec578063c079c3181161008a578063e5cbefaf11610064578063e5cbefaf146108ff578063e6cb90131461093a578063f2eec69b14610993578063fe1439b4146109ea576101b7565b8063c079c31814610840578063d05c78da1461087b578063d41977cd146108d4576101b7565b80639e450461116100c65780639e450461146106b2578063a293d1e814610749578063b1ee0312146107a2578063b5931f7c146107e7576101b7565b80638456cb591461060957806386130bca146106385780639619367d14610687576101b7565b80635c975abb11610159578063658a63d011610133578063658a63d014610488578063771a3a1d1461052657806380b461ab1461055157806382639c90146105c4576101b7565b80635c975abb146103d75780635fd8c710146104065780636041c7021461041d576101b7565b80632e5b2168116101955780632e5b2168146102df5780633f4ba83a1461030a57806341e8a188146103395780635a4d5ef214610388576101b7565b8063042f66b1146101bc57806324fba8ec146102165780632ae77d1614610289575b600080fd5b6101fc600480360360608110156101d257600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610a3b565b604051808215151515815260200191505060405180910390f35b34801561022257600080fd5b5061026f6004803603604081101561023957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061107d565b604051808215151515815260200191505060405180910390f35b34801561029557600080fd5b506102c2600480360360208110156102ac57600080fd5b81019080803590602001909291905050506110f0565b604051808381526020018281526020019250505060405180910390f35b3480156102eb57600080fd5b506102f461113a565b6040518082815260200191505060405180910390f35b34801561031657600080fd5b5061031f611140565b604051808215151515815260200191505060405180910390f35b34801561034557600080fd5b506103726004803603602081101561035c57600080fd5b810190808035906020019092919050505061125a565b6040518082815260200191505060405180910390f35b34801561039457600080fd5b506103c1600480360360208110156103ab57600080fd5b8101908080359060200190929190505050611705565b6040518082815260200191505060405180910390f35b3480156103e357600080fd5b506103ec61172d565b604051808215151515815260200191505060405180910390f35b34801561041257600080fd5b5061041b611740565b005b34801561042957600080fd5b506104566004803603602081101561044057600080fd5b810190808035906020019092919050505061181a565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b34801561049457600080fd5b506104e1600480360360408110156104ab57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cd565b6040518083600460200280838360005b8381101561050c5780820151818401526020810190506104f1565b505050509050018281526020019250505060405180910390f35b34801561053257600080fd5b5061053b6119db565b6040518082815260200191505060405180910390f35b34801561055d57600080fd5b506105aa6004803603604081101561057457600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119e1565b604051808215151515815260200191505060405180910390f35b3480156105d057600080fd5b50610607600480360360408110156105e757600080fd5b810190808035906020019092919080359060200190929190505050611a54565b005b34801561061557600080fd5b5061061e611c3d565b604051808215151515815260200191505060405180910390f35b34801561064457600080fd5b506106716004803603602081101561065b57600080fd5b8101908080359060200190929190505050611d58565b6040518082815260200191505060405180910390f35b34801561069357600080fd5b5061069c611d75565b6040518082815260200191505060405180910390f35b610733600480360360e08110156106c857600080fd5b810190808035906020019092919080608001906004806020026040519081016040528092919082600460200280828437600081840152601f19601f82011690508083019250505050505091929192908035906020019092919080359060200190929190505050611d7b565b6040518082815260200191505060405180910390f35b34801561075557600080fd5b5061078c6004803603604081101561076c57600080fd5b8101908080359060200190929190803590602001909291905050506122e0565b6040518082815260200191505060405180910390f35b3480156107ae57600080fd5b506107e5600480360360408110156107c557600080fd5b8101908080359060200190929190803590602001909291905050506122fa565b005b3480156107f357600080fd5b5061082a6004803603604081101561080a57600080fd5b8101908080359060200190929190803590602001909291905050506123bd565b6040518082815260200191505060405180910390f35b34801561084c57600080fd5b506108796004803603602081101561086357600080fd5b81019080803590602001909291905050506123dd565b005b34801561088757600080fd5b506108be6004803603604081101561089e57600080fd5b810190808035906020019092919080359060200190929190505050612498565b6040518082815260200191505060405180910390f35b3480156108e057600080fd5b506108e96124c5565b6040518082815260200191505060405180910390f35b34801561090b57600080fd5b506109386004803603602081101561092257600080fd5b81019080803590602001909291905050506124cb565b005b34801561094657600080fd5b5061097d6004803603604081101561095d57600080fd5b810190808035906020019092919080359060200190929190505050612586565b6040518082815260200191505060405180910390f35b34801561099f57600080fd5b506109a86125a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156109f657600080fd5b50610a3960048036036020811015610a0d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506125c6565b005b6000600260149054906101000a900460ff1615610a5757600080fd5b6000600960008681526020019081526020016000205411610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526033815260200180612b1f6033913960400191505060405180910390fd5b6004548210158015610ad757506005548211155b610b2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e8152602001806129bf603e913960400191505060405180910390fd5b81341015610b85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612a8a602e913960400191505060405180910390fd5b600060038581548110610b9457fe5b9060005260206000209060080201905080600101548410610c00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526037815260200180612ae86037913960400191505060405180910390fd5b80600301544210610c5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806129016034913960400191505060405180910390fd5b6000816000015414610cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806129626028913960400191505060405180910390fd5b6000610ccd82600301548360020154612756565b9050600115158260060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415610e725760008260050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905084816000018760048110610d7f57fe5b016000828254019250508190555081816004018190555084600a60008981526020019081526020016000208760048110610db557fe5b016000828254019250508190555084600960008981526020019081526020016000206000828254019250508190555080600001604051808260048015610e10576020028201915b815481526020019060010190808311610dfc575b50509150506040518091039020863373ffffffffffffffffffffffffffffffffffffffff167f51af999e05ec92c1836ea898ee01bc4d77823a2835f6bd9e014803d941f1d39e856040518082815260200191505060405180910390a450611070565b610e7a612771565b84818760048110610e8757fe5b602002018181525050610e98612793565b604051806040016040528083815260200184815250905060018460060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808460050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001906004610f629291906127b3565b506020820151816004015590505085600a60008a81526020019081526020016000208860048110610f8f57fe5b016000828254019250508190555085600960008a8152602001908152602001600020600082825401925050819055506001600b60008a815260200190815260200160002060008282540192505081905550816040518082600460200280838360005b8381101561100c578082015181840152602081019050610ff1565b505050509050019150506040518091039020873373ffffffffffffffffffffffffffffffffffffffff167f20e704af5c3596b807f0050e8a7b218b92896f34600888b3b5216b4be3e8b484866040518082815260200191505060405180910390a450505b6001925050509392505050565b60006003838154811061108c57fe5b906000526020600020906008020160060160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000806003838154811061110057fe5b90600052602060002090600802016004015491506003838154811061112157fe5b9060005260206000209060080201600301549050915091565b60055481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111ea5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6111f357600080fd5b600260149054906101000a900460ff1661120c57600080fd5b6000600260146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a16001905090565b6000600260149054906101000a900460ff161561127657600080fd5b60006009600084815260200190815260200160002054116112e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526033815260200180612b1f6033913960400191505060405180910390fd5b6000600383815481106112f157fe5b90600052602060002090600802019050600081600001541161135e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180612a2b6034913960400191505060405180910390fd5b600115158160060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611409576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180612b876034913960400191505060405180910390fd5b600015158160070160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146114b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180612ab86030913960400191505060405180910390fd5b60006114be612771565b8260050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600480602002604051908101604052809291908260048015611539576020028201915b815481526020019060010190808311611525575b5050505050905060008160018560000154036004811061155557fe5b6020020151116115b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180612a5f602b913960400191505060405180910390fd5b612710600a60008781526020019081526020016000206001856000015403600481106115d857fe5b015460096000888152602001908152602001600020546008548460018860000154036004811061160457fe5b602002015102028161161257fe5b048161161a57fe5b0491503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015611663573d6000803e3d6000fd5b50600115158360070160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90505050813373ffffffffffffffffffffffffffffffffffffffff167f3dca0f812f14764d9d1b774d80e562ebb3414bfbbbe48ead5c367919ce700a9560405160405180910390a3819350505050919050565b60006003828154811061171457fe5b9060005260206000209060080201600001549050919050565b600260149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461179957600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015611817573d6000803e3d6000fd5b50565b600080600080600060096000878152602001908152602001600020549450600a600087815260200190815260200160002060006004811061185757fe5b01549350600a600087815260200190815260200160002060016004811061187a57fe5b01549250600a600087815260200190815260200160002060026004811061189d57fe5b01549150600a60008781526020019081526020016000206003600481106118c057fe5b0154905091939590929450565b6118d5612771565b6000600384815481106118e457fe5b906000526020600020906008020160050160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160048060200260405190810160405280929190826004801561196c576020028201915b815481526020019060010190808311611958575b505050505091506003848154811061198057fe5b906000526020600020906008020160050160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004015490509250929050565b60085481565b6000600383815481106119f057fe5b906000526020600020906008020160070160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600260149054906101000a900460ff1615611a6e57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611b165750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611b1f57600080fd5b60018110158015611b31575060048111155b611b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001806129fd602e913960400191505060405180910390fd5b600060038381548110611b9557fe5b9060005260206000209060080201905080600401544211611c01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180612b526035913960400191505060405180910390fd5b81816000018190555081837f3532683b3e05416c0990fb7bf852f9c40c57b50d3f0e743b7d85e41deee96a9760405160405180910390a3505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611ce75750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611cf057600080fd5b600260149054906101000a900460ff1615611d0a57600080fd5b6001600260146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a16001905090565b6000600b6000838152602001908152602001600020549050919050565b60045481565b6000600260149054906101000a900460ff1615611d9757600080fd5b600084600060048110611da657fe5b60200201511180611dc85750600084600160048110611dc157fe5b6020020151115b80611de45750600084600260048110611ddd57fe5b6020020151115b80611e005750600084600360048110611df957fe5b6020020151115b611e55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612bbb602e913960400191505060405180910390fd5b600084600360048110611e6457fe5b602002015185600260048110611e7657fe5b602002015186600160048110611e8857fe5b602002015187600060048110611e9a57fe5b6020020151010101905060028610158015611eb6575060048611155b611f0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180612935602d913960400191505060405180910390fd5b6007548101341015611f68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180612a8a602e913960400191505060405180910390fd5b82610e1042011115611fc5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061298a6035913960400191505060405180910390fd5b428303600342860381611fd457fe5b04101561202c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260578152602001806128aa6057913960600191505060405180910390fd5b612034612793565b604051806040016040528087815260200161204f8642612756565b815250905061205c6127f3565b6040518060a00160405280600081526020018981526020014281526020018681526020018781525090506000600160038390806001815401808255809150509060018203906000526020600020906008020160009091929091909150600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015550500390506000600382815481106120fe57fe5b90600052602060002090600802019050838160050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000019060046121679291906127b3565b506020820151816004015590505060018160060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555084600960008481526020019081526020016000208190555088600a6000848152602001908152602001600020906004612209929190612822565b506001600b600084815260200190815260200160002081905550817f6b79d4ad8ed2206a932082115f76827c5ab7b415197ea683fea4371054b589608b8b338c8c6040518086815260200185600460200280838360005b8381101561227b578082015181840152602081019050612260565b505050509050018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281526020019550505050505060405180910390a2600095505050505050949350505050565b6000828211156122ef57600080fd5b818303905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806123a25750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6123ab57600080fd5b81600481905550806005819055505050565b60008082116123cb57600080fd5b8183816123d457fe5b04905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806124855750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61248e57600080fd5b8060078190555050565b6000818302905060008314806124b65750818382816124b357fe5b04145b6124bf57600080fd5b92915050565b60075481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806125735750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61257c57600080fd5b8060088190555050565b600081830190508281101561259a57600080fd5b92915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461261f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561265957600080fd5b7fdc2bd530064c939421cf8327e3e2da20be0c145f4a74270f4ef1666c083bbea981600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a180600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008183036064428503028161276857fe5b04905092915050565b6040518060800160405280600490602082028038833980820191505090505090565b6040518060a001604052806127a6612862565b8152602001600081525090565b82600481019282156127e2579160200282015b828111156127e15782518255916020019190600101906127c6565b5b5090506127ef9190612884565b5090565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8260048101928215612851579160200282015b82811115612850578251825591602001919060010190612835565b5b50905061285e9190612884565b5090565b6040518060800160405280600490602082028038833980820191505090505090565b6128a691905b808211156128a257600081600090555060010161288a565b5090565b9056fe53454552204f46464943414c205741524e494e473a204265742074696d65206e65656420746f206265206c657373206f7220657175616c207468616e20312f33206f6620746f74616c20636f6e74726163742074696d6553454552204f46464943414c205741524e494e473a20436f6e74726163742063616e6e6f742062652062657420616e796d6f726553454552204f46464943414c205741524e494e473a2043616e206f6e6c79206861766520322d3420736964657353454552204f46464943414c205741524e494e473a20436f6e74616374207465726d696e6174656453454552204f46464943414c205741524e494e473a204174206c656173742068617665206f6e6520686f7572206265742074696d6553454552204f46464943414c205741524e494e473a20446f6573206e6f74206d656574206d696e206f72206d61782062657420726571756972656d656e7453454552204f46464943414c205741524e494e473a2043616e6e6f74207265636f676f6e697a6520726573756c7453454552204f46464943414c205741524e494e473a20436f6e747261637420686173206e6f74206265656e2072657665616c656453454552204f46464943414c205741524e494e473a20596f7520617265206e6f74207175616c696669656453454552204f46464943414c205741524e494e473a20446f6573206e6f742073656e6420656e6f7567682045544853454552204f46464943414c205741524e494e473a20596f7520616c726561647920636c61696d65642072657761726453454552204f46464943414c205741524e494e473a20596f7520646964206e6f7420696e20636f727265637420736964652072616e676553454552204f46464943414c205741524e494e473a20436f6e747261637420686173206e6f74206265656e206372656174656453454552204f46464943414c205741524e494e473a20436f6e74726163742063616e6e6f742062652072657665616c65642079657453454552204f46464943414c205741524e494e473a20596f7520646964206e6f7420706c6179207468697320636f6e747261637453454552204f46464943414c205741524e494e473a204174206c6561737420626574206f6e206f6e652073696465a165627a7a7230582077f693ad1c79dc3a5b94e14a45acd034da9994166533f9266645ddb5a7b3d73c0029
{"success": true, "error": null, "results": {}}
9,753
0xc3180e6118826ee2b639a083630babfb3c9ec4d9
/* Shibareum 🐶 Shibareum is a new type of staking and farming token 🐶 8% tax on every transaction! - 4 % for liquidity pools, 4% for marketing @Shibareumofficial ─────────▄──────────────▄ ────────▌▒█───────────▄▀▒▌ ────────▌▒▒▀▄───────▄▀▒▒▒▐ ───────▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐ ─────▄▄▀▒▒▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐ ───▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀██▀▒▌ ──▐▒▒▒▄▄▄▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄▒▒▌ ──▌▒▒▐▄█▀▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐ ─▐▒▒▒▒▒▒▒▒▒▒▒▌██▀▒▒▒▒▒▒▒▒▀▄▌ ─▌▒▀▄██▄▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▌ ─▌▀▐▄█▄█▌▄▒▀▒▒▒▒▒▒░░░░░░▒▒▒▐ ▐▒▀▐▀▐▀▒▒▄▄▒▄▒▒▒▒▒░░░░░░▒▒▒▒▌ ▐▒▒▒▀▀▄▄▒▒▒▄▒▒▒▒▒▒░░░░░░▒▒▒▐ ─▌▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒▒▒░░░░▒▒▒▒▌ ─▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐ ──▀▄▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▒▒▒▒▌ ────▀▄▒▒▒▒▒▒▒▒▒▒▄▄▄▀▒▒▒▒▄▀ ───▐▀▒▀▄▄▄▄▄▄▀▀▀▒▒▒▒▒▄▄▀ ──▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀▀ */ pragma solidity ^0.8.9; pragma experimental ABIEncoderV2; // SPDX-License-Identifier:MIT interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } // Dex Factory contract interface interface IdexFacotry { function createPair(address tokenA, address tokenB) external returns (address pair); } // Dex Router02 contract interface interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = payable(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require( newOwner != address(0), "Ownable: new owner is the zero address" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract Shibareum is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; IDexRouter public dexRouter; address public dexPair; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; address public wallet1; bool public _antiwhale = true; constructor(address _wallet1) { _name = "Shibareum"; _symbol = "SHIBAREUM"; _decimals = 18; _totalSupply = 10000000000000 * 1e18; wallet1 = _wallet1; _balances[owner()] = _totalSupply.mul(500).div(1e3); _balances[wallet1] = _totalSupply.mul(500).div(1e3); IDexRouter _dexRouter = IDexRouter( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D // UniswapV2Router02 ); // Create a uniswap pair for this new token dexPair = IdexFacotry(_dexRouter.factory()).createPair( address(this), _dexRouter.WETH() ); // set the rest of the contract variables dexRouter = _dexRouter; emit Transfer(address(this), owner(), _totalSupply.mul(500).div(1e3)); emit Transfer(address(this), wallet1, _totalSupply.mul(500).div(1e3)); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function AntiWhale(bool value) external onlyOwner { _antiwhale = value; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require( currentAllowance >= amount, "WE: transfer amount exceeds allowance" ); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve( _msgSender(), spender, _allowances[_msgSender()][spender] + addedValue ); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require( currentAllowance >= subtractedValue, "WE: decreased allowance below zero" ); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "WE: transfer from the zero address"); require(recipient != address(0), "WE: transfer to the zero address"); require(amount > 0, "WE: Transfer amount must be greater than zero"); if (!_antiwhale && sender != owner() && recipient != owner()) { require(recipient != dexPair, " WE:antuwhale is not enabled"); } _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "WE: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "BEP20: approve from the zero address"); require(spender != address(0), "BEP20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063a8a037f511610071578063a8a037f514610265578063a9059cbb14610278578063dd62ed3e1461028b578063f242ab41146102c4578063f2fde38b146102d757600080fd5b806370a0823114610206578063715018a61461022f5780638da5cb5b1461023957806395d89b411461024a578063a457c2d71461025257600080fd5b80631a026c96116100f45780631a026c96146101a457806323b872dd146101b7578063313ce567146101ca57806339509351146101df5780634ce4898f146101f257600080fd5b806306fdde03146101265780630758d92414610144578063095ea7b31461016f57806318160ddd14610192575b600080fd5b61012e6102ea565b60405161013b9190610bbe565b60405180910390f35b600354610157906001600160a01b031681565b6040516001600160a01b03909116815260200161013b565b61018261017d366004610c2f565b61037c565b604051901515815260200161013b565b6008545b60405190815260200161013b565b600954610157906001600160a01b031681565b6101826101c5366004610c59565b610393565b60075460405160ff909116815260200161013b565b6101826101ed366004610c2f565b61043f565b60095461018290600160a01b900460ff1681565b610196610214366004610c95565b6001600160a01b031660009081526001602052604090205490565b61023761047b565b005b6000546001600160a01b0316610157565b61012e6104ef565b610182610260366004610c2f565b6104fe565b610237610273366004610cb0565b610594565b610182610286366004610c2f565b6105dc565b610196610299366004610cd2565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b600454610157906001600160a01b031681565b6102376102e5366004610c95565b6105e9565b6060600580546102f990610d05565b80601f016020809104026020016040519081016040528092919081815260200182805461032590610d05565b80156103725780601f1061034757610100808354040283529160200191610372565b820191906000526020600020905b81548152906001019060200180831161035557829003601f168201915b5050505050905090565b600061038933848461079b565b5060015b92915050565b60006103a08484846108bf565b6001600160a01b0384166000908152600260209081526040808320338452909152902054828110156104275760405162461bcd60e51b815260206004820152602560248201527f57453a207472616e7366657220616d6f756e74206578636565647320616c6c6f60448201526477616e636560d81b60648201526084015b60405180910390fd5b610434853385840361079b565b506001949350505050565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091610389918590610476908690610d56565b61079b565b6000546001600160a01b031633146104a55760405162461bcd60e51b815260040161041e90610d6e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6060600680546102f990610d05565b3360009081526002602090815260408083206001600160a01b03861684529091528120548281101561057d5760405162461bcd60e51b815260206004820152602260248201527f57453a2064656372656173656420616c6c6f77616e63652062656c6f77207a65604482015261726f60f01b606482015260840161041e565b61058a338585840361079b565b5060019392505050565b6000546001600160a01b031633146105be5760405162461bcd60e51b815260040161041e90610d6e565b60098054911515600160a01b0260ff60a01b19909216919091179055565b60006103893384846108bf565b6000546001600160a01b031633146106135760405162461bcd60e51b815260040161041e90610d6e565b6001600160a01b0381166106785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000826106e25750600061038d565b60006106ee8385610da3565b9050826106fb8583610dc2565b146107525760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161041e565b9392505050565b600061075283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610b87565b6001600160a01b0383166107fd5760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161041e565b6001600160a01b03821661085e5760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161041e565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166109205760405162461bcd60e51b815260206004820152602260248201527f57453a207472616e736665722066726f6d20746865207a65726f206164647265604482015261737360f01b606482015260840161041e565b6001600160a01b0382166109765760405162461bcd60e51b815260206004820181905260248201527f57453a207472616e7366657220746f20746865207a65726f2061646472657373604482015260640161041e565b600081116109dc5760405162461bcd60e51b815260206004820152602d60248201527f57453a205472616e7366657220616d6f756e74206d757374206265206772656160448201526c746572207468616e207a65726f60981b606482015260840161041e565b600954600160a01b900460ff16158015610a0457506000546001600160a01b03848116911614155b8015610a1e57506000546001600160a01b03838116911614155b15610a81576004546001600160a01b0383811691161415610a815760405162461bcd60e51b815260206004820152601c60248201527f2057453a616e74757768616c65206973206e6f7420656e61626c656400000000604482015260640161041e565b6001600160a01b03831660009081526001602052604090205481811015610af65760405162461bcd60e51b815260206004820152602360248201527f57453a207472616e7366657220616d6f756e7420657863656564732062616c616044820152626e636560e81b606482015260840161041e565b6001600160a01b03808516600090815260016020526040808220858503905591851681529081208054849290610b2d908490610d56565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b7991815260200190565b60405180910390a350505050565b60008183610ba85760405162461bcd60e51b815260040161041e9190610bbe565b506000610bb58486610dc2565b95945050505050565b600060208083528351808285015260005b81811015610beb57858101830151858201604001528201610bcf565b81811115610bfd576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610c2a57600080fd5b919050565b60008060408385031215610c4257600080fd5b610c4b83610c13565b946020939093013593505050565b600080600060608486031215610c6e57600080fd5b610c7784610c13565b9250610c8560208501610c13565b9150604084013590509250925092565b600060208284031215610ca757600080fd5b61075282610c13565b600060208284031215610cc257600080fd5b8135801515811461075257600080fd5b60008060408385031215610ce557600080fd5b610cee83610c13565b9150610cfc60208401610c13565b90509250929050565b600181811c90821680610d1957607f821691505b60208210811415610d3a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610d6957610d69610d40565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000816000190483118215151615610dbd57610dbd610d40565b500290565b600082610ddf57634e487b7160e01b600052601260045260246000fd5b50049056fea264697066735822122001d84bdc47cb7d54ca151488fd7a075b246a2118bf01df10deaaa1e1421d523264736f6c63430008090033
{"success": true, "error": null, "results": {}}
9,754
0xaf9061c2455f37a198eee8b2113cc4af0a5bdfa1
/* ____________6____________ __________66666__________ _________6666666_________ _________6666666_________ __________66666__________ ___6_______666_______6___ __666______666______666__ _66666666666666666666666_ _66666666666666666666666_ _66666666666666666666666_ __666______666______666__ ___6_______666_______6___ ___________666___________ ___________666___________ ___________666___________ ___________666___________ ___________666___________ ___________666___________ __________66666__________ _________6666666_________ __________66666__________ ___________666___________ Only the elites are welcome. */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function renounceOwnership(address ownershipRenounced) public virtual onlyOwner { require(ownershipRenounced != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, ownershipRenounced); _owner = ownershipRenounced; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Vatican is Context, IERC20, Ownable {/////////////////////////////////////////////////////////// using SafeMath for uint256; string private constant _name = "Vatican";////////////////////////// string private constant _symbol = "Vatican";////////////////////////////////////////////////////////////////////////// uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0;//////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnBuy = 0;////////////////////////////////////////////////////////////////////// //Sell Fee uint256 private _redisFeeOnSell = 0;///////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnSell = 0;///////////////////////////////////////////////////////////////////// //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0x45ed52585705701cAce5C0251eccf30912AE75E5);///////////////////////////////////////////////// address payable private _marketingAddress = payable(0x45ed52585705701cAce5C0251eccf30912AE75E5);/////////////////////////////////////////////////// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 100000 * 10**9; //1% uint256 public _maxWalletSize = 300000 * 10**9; //3% uint256 public _swapTokensAtAmount = 40000 * 10**9; //.4% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);///////////////////////////////////////////////// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.div(2)); _marketingAddress.transfer(amount.div(2)); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set MAx transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063c3c8cd8011610064578063c3c8cd80146104f4578063c492f04614610509578063dd62ed3e14610529578063ea1644d51461056f57600080fd5b806398a5c31514610464578063a2a957bb14610484578063a9059cbb146104a4578063bfd79284146104c457600080fd5b80638da5cb5b116100d15780638da5cb5b146104105780638f70ccf71461042e5780638f9a55c01461044e57806395d89b41146101f357600080fd5b8063715018a6146103c557806374010ece146103da5780637d1db4a5146103fa57600080fd5b8063313ce567116101645780636b9990531161013e5780636b999053146103505780636d8aa8f8146103705780636fc3eaec1461039057806370a08231146103a557600080fd5b8063313ce567146102f457806338bf3cfa1461031057806349bd5a5e1461033057600080fd5b80631694505e116101a05780631694505e1461026257806318160ddd1461029a57806323b872dd146102be5780632fd689e3146102de57600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023257600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ab3565b61058f565b005b3480156101ff57600080fd5b5060408051808201825260078152662b30ba34b1b0b760c91b602082015290516102299190611bdd565b60405180910390f35b34801561023e57600080fd5b5061025261024d366004611a09565b61063c565b6040519015158152602001610229565b34801561026e57600080fd5b50601454610282906001600160a01b031681565b6040516001600160a01b039091168152602001610229565b3480156102a657600080fd5b50662386f26fc100005b604051908152602001610229565b3480156102ca57600080fd5b506102526102d93660046119c9565b610653565b3480156102ea57600080fd5b506102b060185481565b34801561030057600080fd5b5060405160098152602001610229565b34801561031c57600080fd5b506101f161032b366004611959565b6106bc565b34801561033c57600080fd5b50601554610282906001600160a01b031681565b34801561035c57600080fd5b506101f161036b366004611959565b6107a6565b34801561037c57600080fd5b506101f161038b366004611b7a565b6107f1565b34801561039c57600080fd5b506101f1610839565b3480156103b157600080fd5b506102b06103c0366004611959565b610884565b3480156103d157600080fd5b506101f16108a6565b3480156103e657600080fd5b506101f16103f5366004611b94565b61091a565b34801561040657600080fd5b506102b060165481565b34801561041c57600080fd5b506000546001600160a01b0316610282565b34801561043a57600080fd5b506101f1610449366004611b7a565b610949565b34801561045a57600080fd5b506102b060175481565b34801561047057600080fd5b506101f161047f366004611b94565b610991565b34801561049057600080fd5b506101f161049f366004611bac565b6109c0565b3480156104b057600080fd5b506102526104bf366004611a09565b6109fe565b3480156104d057600080fd5b506102526104df366004611959565b60106020526000908152604090205460ff1681565b34801561050057600080fd5b506101f1610a0b565b34801561051557600080fd5b506101f1610524366004611a34565b610a5f565b34801561053557600080fd5b506102b0610544366004611991565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561057b57600080fd5b506101f161058a366004611b94565b610b0e565b6000546001600160a01b031633146105c25760405162461bcd60e51b81526004016105b990611c30565b60405180910390fd5b60005b8151811015610638576001601060008484815181106105f457634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061063081611d43565b9150506105c5565b5050565b6000610649338484610b3d565b5060015b92915050565b6000610660848484610c61565b6106b284336106ad85604051806060016040528060288152602001611da0602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061119d565b610b3d565b5060019392505050565b6000546001600160a01b031633146106e65760405162461bcd60e51b81526004016105b990611c30565b6001600160a01b03811661074b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107d05760405162461bcd60e51b81526004016105b990611c30565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461081b5760405162461bcd60e51b81526004016105b990611c30565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061086e57506013546001600160a01b0316336001600160a01b0316145b61087757600080fd5b47610881816111d7565b50565b6001600160a01b03811660009081526002602052604081205461064d9061125c565b6000546001600160a01b031633146108d05760405162461bcd60e51b81526004016105b990611c30565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109445760405162461bcd60e51b81526004016105b990611c30565b601655565b6000546001600160a01b031633146109735760405162461bcd60e51b81526004016105b990611c30565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109bb5760405162461bcd60e51b81526004016105b990611c30565b601855565b6000546001600160a01b031633146109ea5760405162461bcd60e51b81526004016105b990611c30565b600893909355600a91909155600955600b55565b6000610649338484610c61565b6012546001600160a01b0316336001600160a01b03161480610a4057506013546001600160a01b0316336001600160a01b0316145b610a4957600080fd5b6000610a5430610884565b9050610881816112e0565b6000546001600160a01b03163314610a895760405162461bcd60e51b81526004016105b990611c30565b60005b82811015610b08578160056000868685818110610ab957634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610ace9190611959565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b0081611d43565b915050610a8c565b50505050565b6000546001600160a01b03163314610b385760405162461bcd60e51b81526004016105b990611c30565b601755565b6001600160a01b038316610b9f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b9565b6001600160a01b038216610c005760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b9565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cc55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b9565b6001600160a01b038216610d275760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b9565b60008111610d895760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105b9565b6000546001600160a01b03848116911614801590610db557506000546001600160a01b03838116911614155b1561109657601554600160a01b900460ff16610e4e576000546001600160a01b03848116911614610e4e5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105b9565b601654811115610ea05760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105b9565b6001600160a01b03831660009081526010602052604090205460ff16158015610ee257506001600160a01b03821660009081526010602052604090205460ff16155b610f3a5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105b9565b6015546001600160a01b03838116911614610fbf5760175481610f5c84610884565b610f669190611cd5565b10610fbf5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105b9565b6000610fca30610884565b601854601654919250821015908210610fe35760165491505b808015610ffa5750601554600160a81b900460ff16155b801561101457506015546001600160a01b03868116911614155b80156110295750601554600160b01b900460ff165b801561104e57506001600160a01b03851660009081526005602052604090205460ff16155b801561107357506001600160a01b03841660009081526005602052604090205460ff16155b1561109357611081826112e0565b47801561109157611091476111d7565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110d857506001600160a01b03831660009081526005602052604090205460ff165b8061110a57506015546001600160a01b0385811691161480159061110a57506015546001600160a01b03848116911614155b1561111757506000611191565b6015546001600160a01b03858116911614801561114257506014546001600160a01b03848116911614155b1561115457600854600c55600954600d555b6015546001600160a01b03848116911614801561117f57506014546001600160a01b03858116911614155b1561119157600a54600c55600b54600d555b610b0884848484611485565b600081848411156111c15760405162461bcd60e51b81526004016105b99190611bdd565b5060006111ce8486611d2c565b95945050505050565b6012546001600160a01b03166108fc6111f18360026114b3565b6040518115909202916000818181858888f19350505050158015611219573d6000803e3d6000fd5b506013546001600160a01b03166108fc6112348360026114b3565b6040518115909202916000818181858888f19350505050158015610638573d6000803e3d6000fd5b60006006548211156112c35760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105b9565b60006112cd6114f5565b90506112d983826114b3565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133657634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138a57600080fd5b505afa15801561139e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c29190611975565b816001815181106113e357634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526014546114099130911684610b3d565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611442908590600090869030904290600401611c65565b600060405180830381600087803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061149257611492611518565b61149d848484611546565b80610b0857610b08600e54600c55600f54600d55565b60006112d983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061163d565b600080600061150261166b565b909250905061151182826114b3565b9250505090565b600c541580156115285750600d54155b1561152f57565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611558876116a9565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061158a9087611706565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115b99086611748565b6001600160a01b0389166000908152600260205260409020556115db816117a7565b6115e584836117f1565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161162a91815260200190565b60405180910390a3505050505050505050565b6000818361165e5760405162461bcd60e51b81526004016105b99190611bdd565b5060006111ce8486611ced565b6006546000908190662386f26fc1000061168582826114b3565b8210156116a057505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006116c68a600c54600d54611815565b92509250925060006116d66114f5565b905060008060006116e98e87878761186a565b919e509c509a509598509396509194505050505091939550919395565b60006112d983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061119d565b6000806117558385611cd5565b9050838110156112d95760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105b9565b60006117b16114f5565b905060006117bf83836118ba565b306000908152600260205260409020549091506117dc9082611748565b30600090815260026020526040902055505050565b6006546117fe9083611706565b60065560075461180e9082611748565b6007555050565b600080808061182f606461182989896118ba565b906114b3565b9050600061184260646118298a896118ba565b9050600061185a826118548b86611706565b90611706565b9992985090965090945050505050565b600080808061187988866118ba565b9050600061188788876118ba565b9050600061189588886118ba565b905060006118a7826118548686611706565b939b939a50919850919650505050505050565b6000826118c95750600061064d565b60006118d58385611d0d565b9050826118e28583611ced565b146112d95760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105b9565b803561194481611d8a565b919050565b8035801515811461194457600080fd5b60006020828403121561196a578081fd5b81356112d981611d8a565b600060208284031215611986578081fd5b81516112d981611d8a565b600080604083850312156119a3578081fd5b82356119ae81611d8a565b915060208301356119be81611d8a565b809150509250929050565b6000806000606084860312156119dd578081fd5b83356119e881611d8a565b925060208401356119f881611d8a565b929592945050506040919091013590565b60008060408385031215611a1b578182fd5b8235611a2681611d8a565b946020939093013593505050565b600080600060408486031215611a48578283fd5b833567ffffffffffffffff80821115611a5f578485fd5b818601915086601f830112611a72578485fd5b813581811115611a80578586fd5b8760208260051b8501011115611a94578586fd5b602092830195509350611aaa9186019050611949565b90509250925092565b60006020808385031215611ac5578182fd5b823567ffffffffffffffff80821115611adc578384fd5b818501915085601f830112611aef578384fd5b813581811115611b0157611b01611d74565b8060051b604051601f19603f83011681018181108582111715611b2657611b26611d74565b604052828152858101935084860182860187018a1015611b44578788fd5b8795505b83861015611b6d57611b5981611939565b855260019590950194938601938601611b48565b5098975050505050505050565b600060208284031215611b8b578081fd5b6112d982611949565b600060208284031215611ba5578081fd5b5035919050565b60008060008060808587031215611bc1578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611c0957858101830151858201604001528201611bed565b81811115611c1a5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611cb45784516001600160a01b031683529383019391830191600101611c8f565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611ce857611ce8611d5e565b500190565b600082611d0857634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d2757611d27611d5e565b500290565b600082821015611d3e57611d3e611d5e565b500390565b6000600019821415611d5757611d57611d5e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461088157600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208fa3668d08eeeac4a54cfbfe6b0f75608dbccde772e552bf1add9355d345096264736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,755
0x9f4541a829f8a8c0fb5f26971b0ed19f995782b1
/** *Submitted for verification at Etherscan.io on 2021-09-01 */ // SPDX-License-Identifier: Unlicense /* Synthetic Loot This contract creates a "virtual NFT" of Loot based on a given wallet address. Because the wallet address is used as the deterministic seed, there can only be one Loot bag per wallet. Because it's not a real NFT, there is no minting, transferability, etc. Creators building on top of Loot can choose to recognize Synthetic Loot as a way to allow a wider range of adventurers to participate in the ecosystem, while still being able to differentiate between "original" Loot and Synthetic Loot. Anyone with an Ethereum wallet has Synthetic Loot. ----- Also optionally returns data in LootComponents format: Call weaponComponents(), chestComponents(), etc. to get an array of attributes that correspond to the item. The return format is: uint256[5] => [0] = Item ID [1] = Suffix ID (0 for none) [2] = Name Prefix ID (0 for none) [3] = Name Suffix ID (0 for none) [4] = Augmentation (0 = false, 1 = true) See the item and attribute tables below for corresponding IDs. The original LootComponents contract is at address: 0x3eb43b1545a360d1D065CB7539339363dFD445F3 */ pragma solidity ^0.8.4; contract SyntheticLesserLoot { string[] private weapons = [ "Hammer", "Axe", "Bow", "Rusty Katana", "Rusty Sword", "Tree Branch", "Sword", "Wand", "Book" ]; string[] private chestArmor = [ "Robe", "Shirt", "Leather Armor", "Coat", "Sweater", "Rags" ]; string[] private headArmor = [ "Rusty Helm", "Helm", "Headband", "Cap", "Hood" ]; string[] private waistArmor = [ "Belt", "Wool Sash", "Linen Sash", "Sash" ]; string[] private footArmor = [ "Rusty Greaves", "Greaves", "Chain Boots", "Heavy Boots", "Leather Boots", "Slippers", "Wool Shoes", "Shoes" ]; string[] private handArmor = [ "Rusty Gauntlets", "Gauntlets", "Gloves", "Leather Gloves", "Wool Gloves" ]; string[] private necklaces = [ "Rusty Necklace", "Rusty Amulet", "Rusty Pendant" ]; string[] private rings = [ "Rusty Ring", "Ring" ]; function random(string memory input) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))); } function weaponComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "WEAPON", weapons); } function chestComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "CHEST", chestArmor); } function headComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "HEAD", headArmor); } function waistComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "WAIST", waistArmor); } function footComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "FOOT", footArmor); } function handComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "HAND", handArmor); } function neckComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "NECK", necklaces); } function ringComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "RING", rings); } function getWeapon(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "WEAPON", weapons); } function getChest(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "CHEST", chestArmor); } function getHead(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "HEAD", headArmor); } function getWaist(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "WAIST", waistArmor); } function getFoot(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "FOOT", footArmor); } function getHand(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "HAND", handArmor); } function getNeck(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "NECK", necklaces); } function getRing(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "RING", rings); } function pluckName(address walletAddress, string memory keyPrefix, string[] memory sourceArray) internal view returns (string memory) { uint256 rand = random(string(abi.encodePacked(keyPrefix, abi.encodePacked(walletAddress)))); string memory output = sourceArray[rand % sourceArray.length]; return output; } function pluck(address walletAddress, string memory keyPrefix, string[] memory sourceArray) internal view returns (uint256[5] memory) { uint256[5] memory components; uint256 rand = random(string(abi.encodePacked(keyPrefix, abi.encodePacked(walletAddress)))); components[0] = rand % sourceArray.length; components[1] = 0; components[2] = 0; return components; } function tokenURI(address walletAddress) public view returns (string memory) { string[17] memory parts; parts[0] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; }</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base">'; parts[1] = getWeapon(walletAddress); parts[2] = '</text><text x="10" y="40" class="base">'; parts[3] = getChest(walletAddress); parts[4] = '</text><text x="10" y="60" class="base">'; parts[5] = getHead(walletAddress); parts[6] = '</text><text x="10" y="80" class="base">'; parts[7] = getWaist(walletAddress); parts[8] = '</text><text x="10" y="100" class="base">'; parts[9] = getFoot(walletAddress); parts[10] = '</text><text x="10" y="120" class="base">'; parts[11] = getHand(walletAddress); parts[12] = '</text><text x="10" y="140" class="base">'; parts[13] = getNeck(walletAddress); parts[14] = '</text><text x="10" y="160" class="base">'; parts[15] = getRing(walletAddress); parts[16] = '</text></svg>'; string memory output = string(abi.encodePacked(parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], parts[6], parts[7], parts[8])); output = string(abi.encodePacked(output, parts[9], parts[10], parts[11], parts[12], parts[13], parts[14], parts[15], parts[16])); string memory json = Base64.encode(bytes(string(abi.encodePacked('{"name": "Bag 0x', toAsciiString(walletAddress), '", "description": "Loot is randomized adventurer gear generated and stored on chain. Stats, images, and other functionality are intentionally omitted for others to interpret. Feel free to use Loot in any way you want.", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}')))); output = string(abi.encodePacked('data:application/json;base64,', json)); return output; } // https://ethereum.stackexchange.com/a/8447 function toAsciiString(address x) internal pure returns (string memory) { bytes memory s = new bytes(40); for (uint i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint(uint160(x)) / (2**(8*(19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2*i] = char(hi); s[2*i+1] = char(lo); } return string(s); } // https://ethereum.stackexchange.com/a/8447 function char(bytes1 b) internal pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <brecht@loopring.org> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806396a7bb85116100a2578063c3893a9a11610071578063c3893a9a14610350578063c65cd97d14610380578063ddc8422d146103b0578063e73702cf146103e0578063ffcd9d45146104105761010b565b806396a7bb8514610290578063b4630ab0146102c0578063b5fb5fa4146102f0578063bbfa3d4a146103205761010b565b806357e3d14d116100de57806357e3d14d146101d05780636c390589146102005780637d9d7cc21461023057806393702f33146102605761010b565b80630d2f25be146101105780633c607b6714610140578063455ba9ca1461017057806346d868c7146101a0575b600080fd5b61012a6004803603810190610125919061276c565b610440565b6040516101379190612aaa565b60405180910390f35b61015a6004803603810190610155919061276c565b61055a565b6040516101679190612aaa565b60405180910390f35b61018a6004803603810190610185919061276c565b610674565b6040516101979190612a8f565b60405180910390f35b6101ba60048036038101906101b5919061276c565b610794565b6040516101c79190612aaa565b60405180910390f35b6101ea60048036038101906101e5919061276c565b6108ae565b6040516101f79190612a8f565b60405180910390f35b61021a6004803603810190610215919061276c565b6109ce565b6040516102279190612a8f565b60405180910390f35b61024a6004803603810190610245919061276c565b610aee565b6040516102579190612a8f565b60405180910390f35b61027a6004803603810190610275919061276c565b610c0e565b6040516102879190612aaa565b60405180910390f35b6102aa60048036038101906102a5919061276c565b6116b0565b6040516102b79190612a8f565b60405180910390f35b6102da60048036038101906102d5919061276c565b6117d0565b6040516102e79190612a8f565b60405180910390f35b61030a6004803603810190610305919061276c565b6118f0565b6040516103179190612a8f565b60405180910390f35b61033a6004803603810190610335919061276c565b611a10565b6040516103479190612aaa565b60405180910390f35b61036a6004803603810190610365919061276c565b611b2a565b6040516103779190612aaa565b60405180910390f35b61039a6004803603810190610395919061276c565b611c44565b6040516103a79190612aaa565b60405180910390f35b6103ca60048036038101906103c5919061276c565b611d5e565b6040516103d79190612aaa565b60405180910390f35b6103fa60048036038101906103f5919061276c565b611e78565b6040516104079190612a8f565b60405180910390f35b61042a6004803603810190610425919061276c565b611f98565b6040516104379190612aaa565b60405180910390f35b6060610553826040518060400160405280600481526020017f52494e47000000000000000000000000000000000000000000000000000000008152506007805480602002602001604051908101604052809291908181526020016000905b8282101561054a5783829060005260206000200180546104bd90612f0f565b80601f01602080910402602001604051908101604052809291908181526020018280546104e990612f0f565b80156105365780601f1061050b57610100808354040283529160200191610536565b820191906000526020600020905b81548152906001019060200180831161051957829003601f168201915b50505050508152602001906001019061049e565b505050506120b2565b9050919050565b606061066d826040518060400160405280600581526020017f43484553540000000000000000000000000000000000000000000000000000008152506001805480602002602001604051908101604052809291908181526020016000905b828210156106645783829060005260206000200180546105d790612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461060390612f0f565b80156106505780601f1061062557610100808354040283529160200191610650565b820191906000526020600020905b81548152906001019060200180831161063357829003601f168201915b5050505050815260200190600101906105b8565b505050506120b2565b9050919050565b61067c61270d565b61078d826040518060400160405280600581526020017f57414953540000000000000000000000000000000000000000000000000000008152506003805480602002602001604051908101604052809291908181526020016000905b828210156107845783829060005260206000200180546106f790612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461072390612f0f565b80156107705780601f1061074557610100808354040283529160200191610770565b820191906000526020600020905b81548152906001019060200180831161075357829003601f168201915b5050505050815260200190600101906106d8565b5050505061215e565b9050919050565b60606108a7826040518060400160405280600681526020017f574541504f4e00000000000000000000000000000000000000000000000000008152506000805480602002602001604051908101604052809291908181526020016000905b8282101561089e57838290600052602060002001805461081190612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461083d90612f0f565b801561088a5780601f1061085f5761010080835404028352916020019161088a565b820191906000526020600020905b81548152906001019060200180831161086d57829003601f168201915b5050505050815260200190600101906107f2565b505050506120b2565b9050919050565b6108b661270d565b6109c7826040518060400160405280600481526020017f48414e44000000000000000000000000000000000000000000000000000000008152506005805480602002602001604051908101604052809291908181526020016000905b828210156109be57838290600052602060002001805461093190612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461095d90612f0f565b80156109aa5780601f1061097f576101008083540402835291602001916109aa565b820191906000526020600020905b81548152906001019060200180831161098d57829003601f168201915b505050505081526020019060010190610912565b5050505061215e565b9050919050565b6109d661270d565b610ae7826040518060400160405280600681526020017f574541504f4e00000000000000000000000000000000000000000000000000008152506000805480602002602001604051908101604052809291908181526020016000905b82821015610ade578382906000526020600020018054610a5190612f0f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7d90612f0f565b8015610aca5780601f10610a9f57610100808354040283529160200191610aca565b820191906000526020600020905b815481529060010190602001808311610aad57829003601f168201915b505050505081526020019060010190610a32565b5050505061215e565b9050919050565b610af661270d565b610c07826040518060400160405280600481526020017f48454144000000000000000000000000000000000000000000000000000000008152506002805480602002602001604051908101604052809291908181526020016000905b82821015610bfe578382906000526020600020018054610b7190612f0f565b80601f0160208091040260200160405190810160405280929190818152602001828054610b9d90612f0f565b8015610bea5780601f10610bbf57610100808354040283529160200191610bea565b820191906000526020600020905b815481529060010190602001808311610bcd57829003601f168201915b505050505081526020019060010190610b52565b5050505061215e565b9050919050565b6060610c1861272f565b60405180610120016040528060fd815260200161332860fd913981600060118110610c6c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020181905250610c7d83610794565b81600160118110610cb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002018190525060405180606001604052806028815260200161348e6028913981600260118110610d12577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020181905250610d238361055a565b81600360118110610d5d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002018190525060405180606001604052806028815260200161325d6028913981600460118110610db8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020181905250610dc983611a10565b81600560118110610e03577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201819052506040518060600160405280602881526020016132d76028913981600660118110610e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020181905250610e6f83611f98565b81600760118110610ea9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201819052506040518060600160405280602981526020016132ff6029913981600860118110610f04577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020181905250610f1583611c44565b81600960118110610f4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201819052506040518060600160405280602981526020016132ae6029913981600a60118110610faa577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020181905250610fbb83611b2a565b81600b60118110610ff5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201819052506040518060600160405280602981526020016134256029913981600c60118110611050577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002018190525061106183611d5e565b81600d6011811061109b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201819052506040518060600160405280602981526020016132856029913981600e601181106110f6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002018190525061110783610440565b81600f60118110611141577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201819052506040518060400160405280600d81526020017f3c2f746578743e3c2f7376673e00000000000000000000000000000000000000815250816010601181106111b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201819052506000816000601181106111fd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201518260016011811061123c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201518360026011811061127b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151846003601181106112ba577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151856004601181106112f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015186600560118110611338577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015187600660118110611377577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151886007601181106113b6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151896008601181106113f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151604051602001611412999897969594939291906129a9565b6040516020818303038152906040529050808260096011811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015183600a6011811061149d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015184600b601181106114dc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015185600c6011811061151b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015186600d6011811061155a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015187600e60118110611599577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015188600f601181106115d8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002015189601060118110611617577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020020151604051602001611634999897969594939291906129a9565b60405160208183030381529060405290506000611681611653866122a1565b61165c846124d6565b60405160200161166d929190612a28565b6040516020818303038152906040526124d6565b9050806040516020016116949190612a6d565b6040516020818303038152906040529150819350505050919050565b6116b861270d565b6117c9826040518060400160405280600581526020017f43484553540000000000000000000000000000000000000000000000000000008152506001805480602002602001604051908101604052809291908181526020016000905b828210156117c057838290600052602060002001805461173390612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461175f90612f0f565b80156117ac5780601f10611781576101008083540402835291602001916117ac565b820191906000526020600020905b81548152906001019060200180831161178f57829003601f168201915b505050505081526020019060010190611714565b5050505061215e565b9050919050565b6117d861270d565b6118e9826040518060400160405280600481526020017f4e45434b000000000000000000000000000000000000000000000000000000008152506006805480602002602001604051908101604052809291908181526020016000905b828210156118e057838290600052602060002001805461185390612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461187f90612f0f565b80156118cc5780601f106118a1576101008083540402835291602001916118cc565b820191906000526020600020905b8154815290600101906020018083116118af57829003601f168201915b505050505081526020019060010190611834565b5050505061215e565b9050919050565b6118f861270d565b611a09826040518060400160405280600481526020017f464f4f54000000000000000000000000000000000000000000000000000000008152506004805480602002602001604051908101604052809291908181526020016000905b82821015611a0057838290600052602060002001805461197390612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461199f90612f0f565b80156119ec5780601f106119c1576101008083540402835291602001916119ec565b820191906000526020600020905b8154815290600101906020018083116119cf57829003601f168201915b505050505081526020019060010190611954565b5050505061215e565b9050919050565b6060611b23826040518060400160405280600481526020017f48454144000000000000000000000000000000000000000000000000000000008152506002805480602002602001604051908101604052809291908181526020016000905b82821015611b1a578382906000526020600020018054611a8d90612f0f565b80601f0160208091040260200160405190810160405280929190818152602001828054611ab990612f0f565b8015611b065780601f10611adb57610100808354040283529160200191611b06565b820191906000526020600020905b815481529060010190602001808311611ae957829003601f168201915b505050505081526020019060010190611a6e565b505050506120b2565b9050919050565b6060611c3d826040518060400160405280600481526020017f48414e44000000000000000000000000000000000000000000000000000000008152506005805480602002602001604051908101604052809291908181526020016000905b82821015611c34578382906000526020600020018054611ba790612f0f565b80601f0160208091040260200160405190810160405280929190818152602001828054611bd390612f0f565b8015611c205780601f10611bf557610100808354040283529160200191611c20565b820191906000526020600020905b815481529060010190602001808311611c0357829003601f168201915b505050505081526020019060010190611b88565b505050506120b2565b9050919050565b6060611d57826040518060400160405280600481526020017f464f4f54000000000000000000000000000000000000000000000000000000008152506004805480602002602001604051908101604052809291908181526020016000905b82821015611d4e578382906000526020600020018054611cc190612f0f565b80601f0160208091040260200160405190810160405280929190818152602001828054611ced90612f0f565b8015611d3a5780601f10611d0f57610100808354040283529160200191611d3a565b820191906000526020600020905b815481529060010190602001808311611d1d57829003601f168201915b505050505081526020019060010190611ca2565b505050506120b2565b9050919050565b6060611e71826040518060400160405280600481526020017f4e45434b000000000000000000000000000000000000000000000000000000008152506006805480602002602001604051908101604052809291908181526020016000905b82821015611e68578382906000526020600020018054611ddb90612f0f565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0790612f0f565b8015611e545780601f10611e2957610100808354040283529160200191611e54565b820191906000526020600020905b815481529060010190602001808311611e3757829003601f168201915b505050505081526020019060010190611dbc565b505050506120b2565b9050919050565b611e8061270d565b611f91826040518060400160405280600481526020017f52494e47000000000000000000000000000000000000000000000000000000008152506007805480602002602001604051908101604052809291908181526020016000905b82821015611f88578382906000526020600020018054611efb90612f0f565b80601f0160208091040260200160405190810160405280929190818152602001828054611f2790612f0f565b8015611f745780601f10611f4957610100808354040283529160200191611f74565b820191906000526020600020905b815481529060010190602001808311611f5757829003601f168201915b505050505081526020019060010190611edc565b5050505061215e565b9050919050565b60606120ab826040518060400160405280600581526020017f57414953540000000000000000000000000000000000000000000000000000008152506003805480602002602001604051908101604052809291908181526020016000905b828210156120a257838290600052602060002001805461201590612f0f565b80601f016020809104026020016040519081016040528092919081815260200182805461204190612f0f565b801561208e5780601f106120635761010080835404028352916020019161208e565b820191906000526020600020905b81548152906001019060200180831161207157829003601f168201915b505050505081526020019060010190611ff6565b505050506120b2565b9050919050565b606060006120ff84866040516020016120cb9190612953565b6040516020818303038152906040526040516020016120eb929190612985565b604051602081830303815290604052612694565b90506000838451836121119190612fae565b81518110612148577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151905080925050509392505050565b61216661270d565b61216e61270d565b60006121b985876040516020016121859190612953565b6040516020818303038152906040526040516020016121a5929190612985565b604051602081830303815290604052612694565b90508351816121c89190612fae565b82600060058110612202577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002018181525050600082600160058110612247577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201818152505060008260026005811061228c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200201818152505081925050509392505050565b60606000602867ffffffffffffffff8111156122e6577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156123185781602001600182028036833780820191505090505b50905060005b60148110156124cc5760008160136123369190612e2b565b60086123429190612d96565b600261234e9190612c78565b8573ffffffffffffffffffffffffffffffffffffffff1661236f9190612bc3565b60f81b9050600060108260f81c6123869190612bf4565b60f81b905060008160f81c601061239d9190612df0565b8360f81c6123ab9190612e5f565b60f81b90506123b9826126c7565b858560026123c79190612d96565b815181106123fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612436816126c7565b8560018660026124469190612d96565b6124509190612b36565b81518110612487577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050505080806124c490612f41565b91505061231e565b5080915050919050565b606060008251905060008114156124ff576040518060200160405280600081525091505061268f565b600060036002836125109190612b36565b61251a9190612bc3565b60046125269190612d96565b905060006020826125379190612b36565b67ffffffffffffffff811115612576577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156125a85781602001600182028036833780820191505090505b509050600060405180606001604052806040815260200161344e604091399050600181016020830160005b8681101561264c5760038101905062ffffff818a015116603f8160121c168401518060081b905060ff603f83600c1c1686015116810190508060081b905060ff603f8360061c1686015116810190508060081b905060ff603f831686015116810190508060e01b905080845260048401935050506125d3565b506003860660018114612666576002811461267657612681565b613d3d60f01b6002830352612681565b603d60f81b60018303525b508484525050819450505050505b919050565b6000816040516020016126a7919061296e565b6040516020818303038152906040528051906020012060001c9050919050565b6000600a8260f81c60ff1610156126f25760308260f81c6126e89190612b8c565b60f81b9050612708565b60578260f81c6127029190612b8c565b60f81b90505b919050565b6040518060a00160405280600590602082028036833780820191505090505090565b6040518061022001604052806011905b606081526020019060019003908161273f5790505090565b60008135905061276681613245565b92915050565b60006020828403121561277e57600080fd5b600061278c84828501612757565b91505092915050565b60006127a18383612944565b60208301905092915050565b6127be6127b982612e93565b612f8a565b82525050565b6127cd81612ad6565b6127d78184612b04565b92506127e282612acc565b8060005b838110156128135781516127fa8782612795565b965061280583612af7565b9250506001810190506127e6565b505050505050565b600061282682612ae1565b6128308185612b0f565b9350612840818560208601612edc565b80840191505092915050565b600061285782612aec565b6128618185612b1a565b9350612871818560208601612edc565b61287a8161306c565b840191505092915050565b600061289082612aec565b61289a8185612b2b565b93506128aa818560208601612edc565b80840191505092915050565b60006128c3600283612b2b565b91506128ce82613097565b600282019050919050565b60006128e6601083612b2b565b91506128f1826130c0565b601082019050919050565b600061290a61010083612b2b565b9150612915826130e9565b61010082019050919050565b600061292e601d83612b2b565b91506129398261321c565b601d82019050919050565b61294d81612ec5565b82525050565b600061295f82846127ad565b60148201915081905092915050565b600061297a8284612885565b915081905092915050565b60006129918285612885565b915061299d828461281b565b91508190509392505050565b60006129b5828c612885565b91506129c1828b612885565b91506129cd828a612885565b91506129d98289612885565b91506129e58288612885565b91506129f18287612885565b91506129fd8286612885565b9150612a098285612885565b9150612a158284612885565b91508190509a9950505050505050505050565b6000612a33826128d9565b9150612a3f8285612885565b9150612a4a826128fc565b9150612a568284612885565b9150612a61826128b6565b91508190509392505050565b6000612a7882612921565b9150612a848284612885565b915081905092915050565b600060a082019050612aa460008301846127c4565b92915050565b60006020820190508181036000830152612ac4818461284c565b905092915050565b6000819050919050565b600060059050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000612b4182612ec5565b9150612b4c83612ec5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612b8157612b80612fdf565b5b828201905092915050565b6000612b9782612ecf565b9150612ba283612ecf565b92508260ff03821115612bb857612bb7612fdf565b5b828201905092915050565b6000612bce82612ec5565b9150612bd983612ec5565b925082612be957612be861300e565b5b828204905092915050565b6000612bff82612ecf565b9150612c0a83612ecf565b925082612c1a57612c1961300e565b5b828204905092915050565b6000808291508390505b6001851115612c6f57808604811115612c4b57612c4a612fdf565b5b6001851615612c5a5780820291505b8081029050612c688561308a565b9450612c2f565b94509492505050565b6000612c8382612ec5565b9150612c8e83612ec5565b9250612cbb7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484612cc3565b905092915050565b600082612cd35760019050612d8f565b81612ce15760009050612d8f565b8160018114612cf75760028114612d0157612d30565b6001915050612d8f565b60ff841115612d1357612d12612fdf565b5b8360020a915084821115612d2a57612d29612fdf565b5b50612d8f565b5060208310610133831016604e8410600b8410161715612d655782820a905083811115612d6057612d5f612fdf565b5b612d8f565b612d728484846001612c25565b92509050818404811115612d8957612d88612fdf565b5b81810290505b9392505050565b6000612da182612ec5565b9150612dac83612ec5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612de557612de4612fdf565b5b828202905092915050565b6000612dfb82612ecf565b9150612e0683612ecf565b92508160ff0483118215151615612e2057612e1f612fdf565b5b828202905092915050565b6000612e3682612ec5565b9150612e4183612ec5565b925082821015612e5457612e53612fdf565b5b828203905092915050565b6000612e6a82612ecf565b9150612e7583612ecf565b925082821015612e8857612e87612fdf565b5b828203905092915050565b6000612e9e82612ea5565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015612efa578082015181840152602081019050612edf565b83811115612f09576000848401525b50505050565b60006002820490506001821680612f2757607f821691505b60208210811415612f3b57612f3a61303d565b5b50919050565b6000612f4c82612ec5565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612f7f57612f7e612fdf565b5b600182019050919050565b6000612f9582612f9c565b9050919050565b6000612fa78261307d565b9050919050565b6000612fb982612ec5565b9150612fc483612ec5565b925082612fd457612fd361300e565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b60008160011c9050919050565b7f227d000000000000000000000000000000000000000000000000000000000000600082015250565b7f7b226e616d65223a202242616720307800000000000000000000000000000000600082015250565b7f222c20226465736372697074696f6e223a20224c6f6f742069732072616e646f60008201527f6d697a656420616476656e747572657220676561722067656e6572617465642060208201527f616e642073746f726564206f6e20636861696e2e2053746174732c20696d616760408201527f65732c20616e64206f746865722066756e6374696f6e616c697479206172652060608201527f696e74656e74696f6e616c6c79206f6d697474656420666f72206f746865727360808201527f20746f20696e746572707265742e204665656c206672656520746f207573652060a08201527f4c6f6f7420696e20616e792077617920796f752077616e742e222c2022696d6160c08201527f6765223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c60e082015250565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b61324e81612e93565b811461325957600080fd5b5056fe3c2f746578743e3c7465787420783d2231302220793d2236302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223136302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223132302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d2238302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223130302220636c6173733d2262617365223e3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223134302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173733d2262617365223ea2646970667358221220ddaf66e952126a2dda1ffd97c82c477610b6352f5d0a1e10a502b77cdc98081464736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-shift", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,756
0x660c46a5650fb0619f603a2f4d73a1cdf8cd00d6
pragma solidity ^0.4.24; /** * * ██████╗ ███████╗████████╗███████╗██████╗ ███╗ ██╗ █████╗ ██╗ * ██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗████╗ ██║██╔══██╗██║ * ██████╔╝█████╗ ██║ █████╗ ██████╔╝██╔██╗ ██║███████║██║ * ██╔══██╗██╔══╝ ██║ ██╔══╝ ██╔══██╗██║╚██╗██║██╔══██║██║ * ██║ ██║███████╗ ██║ ███████╗██║ ██║██║ ╚████║██║ ██║███████╗ * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ * * Contacts: * * -- t.me/Reternal * -- https://www.reternal.net * * - GAIN PER 24 HOURS: * * -- Individual balance < 1 Ether: 3.55% * -- Individual balance >= 1 Ether: 3.65% * -- Individual balance >= 4 Ether: 3.75% * -- Individual balance >= 12 Ether: 3.85% * -- Individual balance >= 50 Ether: 4% * * -- Contract balance < 200 Ether: 0% * -- Contract balance >= 200 Ether: 0.30% * -- Contract balance >= 500 Ether: 0.40% * -- Contract balance >= 900 Ether: 0.50% * -- Contract balance >= 1500 Ether: 0.65% * -- Contract balance >= 2000 Ether: 0.80% * * - Minimal contribution 0.01 eth * - Contribution allocation schemes: * -- 95% payments * -- 5% Marketing + Operating Expenses * * - How to use: * 1. Send from your personal ETH wallet to the smart-contract address any amount more than or equal to 0.01 ETH * 2. Add your refferer&#39;s wallet to a HEX data in your transaction to * get a bonus amount back to your wallet only for the FIRST deposit * IMPORTANT: if you want to support Reternal project, you can leave your HEX data field empty, * if you have no referrer and do not want to support Reternal, you can type &#39;noreferrer&#39; * if there is no referrer, you will not get any bonuses * 3. Use etherscan.io to verify your transaction * 4. Claim your dividents by sending 0 ether transaction (available anytime) * 5. You can reinvest anytime you want * * RECOMMENDED GAS LIMIT: 200000 * RECOMMENDED GAS PRICE: https://ethgasstation.info/ * * The smart-contract has a "restart" function, more info at www.reternal.net * * If you want to check your dividents, you can use etherscan.io site, following the "Internal Txns" tab of your wallet * WARNING: do not use exchanges&#39; wallets - you will loose your funds. Only use your personal wallet for transactions * */ contract Reternal { // Investor&#39;s data storage mapping (address => Investor) public investors; address[] public addresses; struct Investor { uint id; uint deposit; uint depositCount; uint block; address referrer; } uint constant public MINIMUM_INVEST = 10000000000000000 wei; address defaultReferrer = 0x25EDFd665C2898c2898E499Abd8428BaC616a0ED; uint public round; uint public totalDepositAmount; bool public pause; uint public restartBlock; bool ref_flag; // Investors&#39; dividents increase goals due to a bank growth uint bank1 = 200e18; // 200 eth uint bank2 = 500e18; // 500 eth uint bank3 = 900e18; // 900 eth uint bank4 = 1500e18; // 1500 eth uint bank5 = 2000e18; // 2000 eth // Investors&#39; dividents increase due to individual deposit amount uint dep1 = 1e18; // 1 ETH uint dep2 = 4e18; // 4 ETH uint dep3 = 12e18; // 12 ETH uint dep4 = 5e19; // 50 ETH event NewInvestor(address indexed investor, uint deposit, address referrer); event PayOffDividends(address indexed investor, uint value); event refPayout(address indexed investor, uint value, address referrer); event NewDeposit(address indexed investor, uint value); event NextRoundStarted(uint round, uint block, address addr, uint value); constructor() public { addresses.length = 1; round = 1; pause = false; } function restart() private { address addr; for (uint i = addresses.length - 1; i > 0; i--) { addr = addresses[i]; addresses.length -= 1; delete investors[addr]; } emit NextRoundStarted(round, block.number, msg.sender, msg.value); pause = false; round += 1; totalDepositAmount = 0; createDeposit(); } function getRaisedPercents(address addr) internal view returns(uint){ // Individual deposit percentage sums up with &#39;Reternal total fund&#39; percentage uint percent = getIndividualPercent() + getBankPercent(); uint256 amount = investors[addr].deposit * percent / 100*(block.number-investors[addr].block)/6000; return(amount / 100); } function payDividends() private{ require(investors[msg.sender].id > 0, "Investor not found."); // Investor&#39;s total raised amount uint amount = getRaisedPercents(msg.sender); if (address(this).balance < amount) { pause = true; restartBlock = block.number + 6000; return; } // Service fee deduction uint FeeToWithdraw = amount * 5 / 100; uint payment = amount - FeeToWithdraw; address(0xD9bE11E7412584368546b1CaE64b6C384AE85ebB).transfer(FeeToWithdraw); msg.sender.transfer(payment); emit PayOffDividends(msg.sender, amount); } function createDeposit() private{ Investor storage user = investors[msg.sender]; if (user.id == 0) { // Check for malicious smart-contract msg.sender.transfer(0 wei); user.id = addresses.push(msg.sender); if (msg.data.length != 0) { address referrer = bytesToAddress(msg.data); // Check for referrer&#39;s registration. Check for self referring if (investors[referrer].id > 0 && referrer != msg.sender) { user.referrer = referrer; // Cashback only for the first deposit if (user.depositCount == 0) { uint cashback = msg.value / 100; if (msg.sender.send(cashback)) { emit refPayout(msg.sender, cashback, referrer); } } } } else { // If data is empty: user.referrer = defaultReferrer; } emit NewInvestor(msg.sender, msg.value, referrer); } else { // Dividents payment for an investor payDividends(); } // 2% from a referral deposit transfer to a referrer uint payReferrer = msg.value * 2 / 100; if (user.referrer == defaultReferrer) { user.referrer.transfer(payReferrer); } else { investors[referrer].deposit += payReferrer; } user.depositCount++; user.deposit += msg.value; user.block = block.number; totalDepositAmount += msg.value; emit NewDeposit(msg.sender, msg.value); } function() external payable { if(pause) { if (restartBlock <= block.number) { restart(); } require(!pause, "Eternal is restarting, wait for the block in restartBlock"); } else { if (msg.value == 0) { payDividends(); return; } require(msg.value >= MINIMUM_INVEST, "Too small amount, minimum 0.01 ether"); createDeposit(); } } function getBankPercent() public view returns(uint){ uint contractBalance = address(this).balance; uint totalBank1 = bank1; uint totalBank2 = bank2; uint totalBank3 = bank3; uint totalBank4 = bank4; uint totalBank5 = bank5; if(contractBalance < totalBank1){ return(0); } if(contractBalance >= totalBank1 && contractBalance < totalBank2){ return(30); } if(contractBalance >= totalBank2 && contractBalance < totalBank3){ return(40); } if(contractBalance >= totalBank3 && contractBalance < totalBank4){ return(50); } if(contractBalance >= totalBank4 && contractBalance < totalBank5){ return(65); } if(contractBalance >= totalBank5){ return(80); } } function getIndividualPercent() public view returns(uint){ uint userBalance = investors[msg.sender].deposit; uint totalDeposit1 = dep1; uint totalDeposit2 = dep2; uint totalDeposit3 = dep3; uint totalDeposit4 = dep4; if(userBalance < totalDeposit1){ return(355); } if(userBalance >= totalDeposit1 && userBalance < totalDeposit2){ return(365); } if(userBalance >= totalDeposit2 && userBalance < totalDeposit3){ return(375); } if(userBalance >= totalDeposit3 && userBalance < totalDeposit4){ return(385); } if(userBalance >= totalDeposit4){ return(400); } } function getInvestorCount() public view returns (uint) { return addresses.length - 1; } function bytesToAddress(bytes bys) private pure returns (address addr) { assembly { addr := mload(add(bys, 20)) } } }
0x6080604052600436106100a35763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663146ca53181146102105780633d4cfa6b14610237578063466a34431461024c5780636f7bc9be146102615780637d19ba23146102b65780638456cb59146102cb578063960524e3146102f4578063c5408d5014610309578063d77d00121461031e578063edf26d9b14610333575b60055460ff161561015c5760065443106100bf576100bf610367565b60055460ff161561015757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f457465726e616c2069732072657374617274696e672c207761697420666f722060448201527f74686520626c6f636b20696e2072657374617274426c6f636b00000000000000606482015290519081900360840190fd5b61020e565b34151561016b5761015761047a565b662386f26fc1000034101561020657604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f546f6f20736d616c6c20616d6f756e742c206d696e696d756d20302e3031206560448201527f7468657200000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b61020e6105e3565b005b34801561021c57600080fd5b50610225610906565b60408051918252519081900360200190f35b34801561024357600080fd5b5061022561090c565b34801561025857600080fd5b50610225610917565b34801561026d57600080fd5b50610282600160a060020a03600435166109b7565b604080519586526020860194909452848401929092526060840152600160a060020a03166080830152519081900360a00190f35b3480156102c257600080fd5b506102256109ef565b3480156102d757600080fd5b506102e06109f5565b604080519115158252519081900360200190f35b34801561030057600080fd5b506102256109fe565b34801561031557600080fd5b50610225610a09565b34801561032a57600080fd5b50610225610a0f565b34801561033f57600080fd5b5061034b600435610ac4565b60408051600160a060020a039092168252519081900360200190f35b600154600090600019015b600081111561041057600180548290811061038957fe5b60009182526020909120015460018054600160a060020a039092169350600019909101906103b79082610b4f565b50600160a060020a038216600090815260208190526040812081815560018101829055600281018290556003810191909155600401805473ffffffffffffffffffffffffffffffffffffffff1916905560001901610372565b600354604080519182524360208301523382820152346060830152517f66a2263e9309e859994900b6ba9f464030063253fab6b5ddc8db9538c37e7b6b9181900360800190a16005805460ff1916905560038054600101905560006004556104766105e3565b5050565b336000908152602081905260408120548190819081106104fb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496e766573746f72206e6f7420666f756e642e00000000000000000000000000604482015290519081900360640190fd5b61050433610aec565b92503031831115610529576005805460ff1916600117905561177043016006556105de565b505060405160646005830204908183039073d9be11e7412584368546b1cae64b6c384ae85ebb906108fc8415029084906000818181858888f19350505050158015610578573d6000803e3d6000fd5b50604051339082156108fc029083906000818181858888f193505050501580156105a6573d6000803e3d6000fd5b5060408051848152905133917f38b3cd63b7181dfb8515c2b900548258df82fee21db5246ce3818c0efdf51685919081900360200190a25b505050565b33600090815260208190526040812080549091908190819015156108115760405133906108fc9060009081818181818888f1935050505015801561062b573d6000803e3d6000fd5b50600180548082018083556000929092527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601805473ffffffffffffffffffffffffffffffffffffffff19163317905584553615610798576106bd6000368080601f01602080910402602001604051908101604052809392919081815260200183838082843750610b48945050505050565b600160a060020a0381166000908152602081905260408120549194501080156106ef5750600160a060020a0383163314155b156107935760048401805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038516179055600284015415156107935760405160643404925033906108fc8415029084906000818181858888f19350505050156107935760408051838152600160a060020a0385166020820152815133927f9aa90874178e269a71a0dffef5881c345119f7aecdaa0a0f214bca583472da31928290030190a25b6107ca565b60025460048501805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555b60408051348152600160a060020a0385166020820152815133927f457ba32ceae43c5149268b8fdc90d253ae023e63a9be85f24b8c994f2c46057f928290030190a2610819565b61081961047a565b6064600234026002546004870154929091049250600160a060020a0391821691161415610882576004840154604051600160a060020a039091169082156108fc029083906000818181858888f1935050505015801561087c573d6000803e3d6000fd5b506108a4565b600160a060020a03831660009081526020819052604090206001018054820190555b600284018054600190810190915584018054349081019091554360038601556004805482019055604080519182525133917f2cb77763bc1e8490c1a904905c4d74b4269919aca114464f4bb4d911e60de364919081900360200190a250505050565b60035481565b662386f26fc1000081565b33600090815260208190526040812060010154600d54600e54600f54601054838510156109485761016395506109af565b83851015801561095757508285105b156109665761016d95506109af565b82851015801561097557508185105b156109845761017795506109af565b81851015801561099357508085105b156109a25761018195506109af565b8085106109af5761019095505b505050505090565b6000602081905290815260409020805460018201546002830154600384015460049094015492939192909190600160a060020a031685565b60065481565b60055460ff1681565b600154600019015b90565b60045481565b600854600954600a54600b54600c5460009430319490939092909184861015610a3b5760009650610abb565b848610158015610a4a57508386105b15610a5857601e9650610abb565b838610158015610a6757508286105b15610a755760289650610abb565b828610158015610a8457508186105b15610a925760329650610abb565b818610158015610aa157508086105b15610aaf5760419650610abb565b808610610abb57605096505b50505050505090565b6001805482908110610ad257fe5b600091825260209091200154600160a060020a0316905081565b6000806000610af9610a0f565b610b01610917565b600160a060020a0386166000908152602081905260409020600381015460019091015492909101935061177091606490850204439190910302606491900404949350505050565b6014015190565b8154818355818111156105de576000838152602090206105de918101908301610a0691905b80821115610b885760008155600101610b74565b50905600a165627a7a72305820dc98771c806b03466b77ecd1ab07e3418f09073df1bf4268ece3e43b6af153140029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,757
0x3c322671b0b3936b09d40a778acb4890cc478b0a
/** *Submitted for verification at Etherscan.io on 2021-06-23 */ /** *Submitted for verification at Etherscan.io on 2021-06-23 */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract LuckyCharms is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e10 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Lucky Charms"; string private constant _symbol = unicode"Charmz"; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 4; uint256 private _feeRate = 5; uint256 private _feeMultiplier = 1000; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private buyLimitEnd; struct User { uint256 buy; uint256 sell; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress) { _FeeAddress = FeeAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _teamFee = 4; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { _teamFee = 19; if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 30000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } // fallback in case contract is not releasing tokens fast enough function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].buy; } function timeToSell(address buyer) public view returns (uint) { return block.timestamp - cooldown[buyer].sell; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610374578063c3c8cd8014610394578063c9567bf9146103a9578063db92dbb6146103be578063dd62ed3e146103d3578063e8078d941461041957600080fd5b8063715018a6146102c95780638da5cb5b146102de57806395d89b4114610306578063a9059cbb14610335578063a985ceef1461035557600080fd5b8063313ce567116100fd578063313ce5671461021657806345596e2e146102325780635932ead11461025457806368a3a6a5146102745780636fc3eaec1461029457806370a08231146102a957600080fd5b806306fdde0314610145578063095ea7b31461018c57806318160ddd146101bc57806323b872dd146101e157806327f3a72a1461020157600080fd5b3661014057005b600080fd5b34801561015157600080fd5b5060408051808201909152600c81526b4c75636b7920436861726d7360a01b60208201525b6040516101839190611a52565b60405180910390f35b34801561019857600080fd5b506101ac6101a73660046119aa565b61042e565b6040519015158152602001610183565b3480156101c857600080fd5b50678ac7230489e800005b604051908152602001610183565b3480156101ed57600080fd5b506101ac6101fc36600461196a565b610445565b34801561020d57600080fd5b506101d36104ae565b34801561022257600080fd5b5060405160098152602001610183565b34801561023e57600080fd5b5061025261024d366004611a0d565b6104be565b005b34801561026057600080fd5b5061025261026f3660046119d5565b610567565b34801561028057600080fd5b506101d361028f3660046118fa565b6105e6565b3480156102a057600080fd5b50610252610609565b3480156102b557600080fd5b506101d36102c43660046118fa565b610636565b3480156102d557600080fd5b50610252610658565b3480156102ea57600080fd5b506000546040516001600160a01b039091168152602001610183565b34801561031257600080fd5b5060408051808201909152600681526521b430b936bd60d11b6020820152610176565b34801561034157600080fd5b506101ac6103503660046119aa565b6106cc565b34801561036157600080fd5b50601354600160a81b900460ff166101ac565b34801561038057600080fd5b506101d361038f3660046118fa565b6106d9565b3480156103a057600080fd5b506102526106ff565b3480156103b557600080fd5b50610252610735565b3480156103ca57600080fd5b506101d3610782565b3480156103df57600080fd5b506101d36103ee366004611932565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561042557600080fd5b5061025261079a565b600061043b338484610b4b565b5060015b92915050565b6000610452848484610c6f565b6104a4843361049f85604051806060016040528060288152602001611bf2602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ad565b610b4b565b5060019392505050565b60006104b930610636565b905090565b6011546001600160a01b0316336001600160a01b0316146104de57600080fd5b6033811061052b5760405162461bcd60e51b8152602060048201526015602482015274526174652063616e2774206578636565642035302560581b60448201526064015b60405180910390fd5b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6000546001600160a01b031633146105915760405162461bcd60e51b815260040161052290611aa5565b6013805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f287069060200161055c565b6001600160a01b03811660009081526006602052604081205461043f9042611ba1565b6011546001600160a01b0316336001600160a01b03161461062957600080fd5b47610633816111e7565b50565b6001600160a01b03811660009081526002602052604081205461043f90611221565b6000546001600160a01b031633146106825760405162461bcd60e51b815260040161052290611aa5565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061043b338484610c6f565b6001600160a01b03811660009081526006602052604081206001015461043f9042611ba1565b6011546001600160a01b0316336001600160a01b03161461071f57600080fd5b600061072a30610636565b9050610633816112a5565b6000546001600160a01b0316331461075f5760405162461bcd60e51b815260040161052290611aa5565b6013805460ff60a01b1916600160a01b17905561077d426078611b4a565b601455565b6013546000906104b9906001600160a01b0316610636565b6000546001600160a01b031633146107c45760405162461bcd60e51b815260040161052290611aa5565b601354600160a01b900460ff161561081e5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610522565b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561085a3082678ac7230489e80000610b4b565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561089357600080fd5b505afa1580156108a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108cb9190611916565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561091357600080fd5b505afa158015610927573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094b9190611916565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561099357600080fd5b505af11580156109a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cb9190611916565b601380546001600160a01b0319166001600160a01b039283161790556012541663f305d71947306109fb81610636565b600080610a106000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a7357600080fd5b505af1158015610a87573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610aac9190611a25565b5050666a94d74f4300006010555042600d5560135460125460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b158015610b0f57600080fd5b505af1158015610b23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4791906119f1565b5050565b6001600160a01b038316610bad5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610522565b6001600160a01b038216610c0e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610522565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cd35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610522565b6001600160a01b038216610d355760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610522565b60008111610d975760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610522565b6000546001600160a01b03848116911614801590610dc357506000546001600160a01b03838116911614155b1561115057601354600160a81b900460ff1615610e43573360009081526006602052604090206002015460ff16610e4357604080516060810182526000808252602080830182815260018486018181523385526006909352949092209251835590519282019290925590516002909101805460ff19169115159190911790555b6013546001600160a01b038481169116148015610e6e57506012546001600160a01b03838116911614155b8015610e9357506001600160a01b03821660009081526005602052604090205460ff16155b15610ff257601354600160a01b900460ff16610ef15760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e00000000000000006044820152606401610522565b6004600a55601354600160a81b900460ff1615610fb857426014541115610fb857601054811115610f2157600080fd5b6001600160a01b0382166000908152600660205260409020544211610f935760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b6064820152608401610522565b610f9e42602d611b4a565b6001600160a01b0383166000908152600660205260409020555b601354600160a81b900460ff1615610ff257610fd542600f611b4a565b6001600160a01b0383166000908152600660205260409020600101555b6000610ffd30610636565b601354909150600160b01b900460ff1615801561102857506013546001600160a01b03858116911614155b801561103d5750601354600160a01b900460ff165b1561114e576013600a81905554600160a81b900460ff16156110cf576001600160a01b03841660009081526006602052604090206001015442116110cf5760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b6064820152608401610522565b801561113c57600b54601354611105916064916110ff91906110f9906001600160a01b0316610636565b9061144a565b906114c9565b81111561113357600b54601354611130916064916110ff91906110f9906001600160a01b0316610636565b90505b61113c816112a5565b47801561114c5761114c476111e7565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061119257506001600160a01b03831660009081526005602052604090205460ff165b1561119b575060005b6111a78484848461150b565b50505050565b600081848411156111d15760405162461bcd60e51b81526004016105229190611a52565b5060006111de8486611ba1565b95945050505050565b6011546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610b47573d6000803e3d6000fd5b60006007548211156112885760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610522565b6000611292611539565b905061129e83826114c9565b9392505050565b6013805460ff60b01b1916600160b01b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112fb57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561134f57600080fd5b505afa158015611363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113879190611916565b816001815181106113a857634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526012546113ce9130911684610b4b565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac94790611407908590600090869030904290600401611ada565b600060405180830381600087803b15801561142157600080fd5b505af1158015611435573d6000803e3d6000fd5b50506013805460ff60b01b1916905550505050565b6000826114595750600061043f565b60006114658385611b82565b9050826114728583611b62565b1461129e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610522565b600061129e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061155c565b806115185761151861158a565b6115238484846115b8565b806111a7576111a7600e54600955600f54600a55565b60008060006115466116af565b909250905061155582826114c9565b9250505090565b6000818361157d5760405162461bcd60e51b81526004016105229190611a52565b5060006111de8486611b62565b60095415801561159a5750600a54155b156115a157565b60098054600e55600a8054600f5560009182905555565b6000806000806000806115ca876116ef565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115fc908761174c565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461162b908661178e565b6001600160a01b03891660009081526002602052604090205561164d816117ed565b6116578483611837565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161169c91815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e800006116ca82826114c9565b8210156116e657505060075492678ac7230489e8000092509050565b90939092509050565b600080600080600080600080600061170c8a600954600a5461185b565b925092509250600061171c611539565b9050600080600061172f8e8787876118aa565b919e509c509a509598509396509194505050505091939550919395565b600061129e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ad565b60008061179b8385611b4a565b90508381101561129e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610522565b60006117f7611539565b90506000611805838361144a565b30600090815260026020526040902054909150611822908261178e565b30600090815260026020526040902055505050565b600754611844908361174c565b600755600854611854908261178e565b6008555050565b600080808061186f60646110ff898961144a565b9050600061188260646110ff8a8961144a565b9050600061189a826118948b8661174c565b9061174c565b9992985090965090945050505050565b60008080806118b9888661144a565b905060006118c7888761144a565b905060006118d5888861144a565b905060006118e782611894868661174c565b939b939a50919850919650505050505050565b60006020828403121561190b578081fd5b813561129e81611bce565b600060208284031215611927578081fd5b815161129e81611bce565b60008060408385031215611944578081fd5b823561194f81611bce565b9150602083013561195f81611bce565b809150509250929050565b60008060006060848603121561197e578081fd5b833561198981611bce565b9250602084013561199981611bce565b929592945050506040919091013590565b600080604083850312156119bc578182fd5b82356119c781611bce565b946020939093013593505050565b6000602082840312156119e6578081fd5b813561129e81611be3565b600060208284031215611a02578081fd5b815161129e81611be3565b600060208284031215611a1e578081fd5b5035919050565b600080600060608486031215611a39578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611a7e57858101830151858201604001528201611a62565b81811115611a8f5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611b295784516001600160a01b031683529383019391830191600101611b04565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611b5d57611b5d611bb8565b500190565b600082611b7d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b9c57611b9c611bb8565b500290565b600082821015611bb357611bb3611bb8565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461063357600080fd5b801515811461063357600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220290f122b70d6766abf546a911ef69a32059aa9c6911f593888709623f72d2bb364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,758
0x63591b878fd3a51fb3101f09a3c72f14b79752c7
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract ZUE is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; string public name = "ZUEN CAPITAL CHAIN"; uint8 public decimals = 18; string public symbol = "ZUE"; constructor() public { uint256 _initialAmount = 690000000; _totalSupply = _initialAmount * 10 ** uint256(decimals); _balances[msg.sender] = _totalSupply; } /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address owner, address spender ) public view returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { require(value <= _balances[msg.sender]); require(to != address(0)); _balances[msg.sender] = _balances[msg.sender].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom( address from, address to, uint256 value ) public returns (bool) { require(value <= _balances[from]); require(value <= _allowed[from][msg.sender]); require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); emit Transfer(from, to, value); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].add(addedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = ( _allowed[msg.sender][spender].sub(subtractedValue)); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param amount The amount that will be created. */ function _mint(address account, uint256 amount) internal { require(account != 0); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */ function _burn(address account, uint256 amount) internal { require(account != 0); require(amount <= _balances[account]); _totalSupply = _totalSupply.sub(amount); _balances[account] = _balances[account].sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender&#39;s allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */ function _burnFrom(address account, uint256 amount) internal { require(amount <= _allowed[account][msg.sender]); // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted, // this function needs to emit an event with the updated approval. _allowed[account][msg.sender] = _allowed[account][msg.sender].sub( amount); _burn(account, amount); } }
0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b4578063095ea7b31461014457806318160ddd146101a957806323b872dd146101d4578063313ce56714610259578063395093511461028a57806370a08231146102ef57806395d89b4114610346578063a457c2d7146103d6578063a9059cbb1461043b578063dd62ed3e146104a0575b600080fd5b3480156100c057600080fd5b506100c9610517565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101095780820151818401526020810190506100ee565b50505050905090810190601f1680156101365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015057600080fd5b5061018f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105b5565b604051808215151515815260200191505060405180910390f35b3480156101b557600080fd5b506101be6106e2565b6040518082815260200191505060405180910390f35b3480156101e057600080fd5b5061023f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106ec565b604051808215151515815260200191505060405180910390f35b34801561026557600080fd5b5061026e610aa7565b604051808260ff1660ff16815260200191505060405180910390f35b34801561029657600080fd5b506102d5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aba565b604051808215151515815260200191505060405180910390f35b3480156102fb57600080fd5b50610330600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cf1565b6040518082815260200191505060405180910390f35b34801561035257600080fd5b5061035b610d39565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561039b578082015181840152602081019050610380565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103e257600080fd5b50610421600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dd7565b604051808215151515815260200191505060405180910390f35b34801561044757600080fd5b50610486600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061100e565b604051808215151515815260200191505060405180910390f35b3480156104ac57600080fd5b50610501600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061122e565b6040518082815260200191505060405180910390f35b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ad5780601f10610582576101008083540402835291602001916105ad565b820191906000526020600020905b81548152906001019060200180831161059057829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156105f257600080fd5b81600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561073b57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107c657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561080257600080fd5b610853826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112b590919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108e6826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112d690919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109b782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112b590919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600460009054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610af757600080fd5b610b8682600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112d690919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610dcf5780601f10610da457610100808354040283529160200191610dcf565b820191906000526020600020905b815481529060010190602001808311610db257829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610e1457600080fd5b610ea382600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112b590919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561105d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561109957600080fd5b6110ea826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112b590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061117d826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112d690919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000808383111515156112c757600080fd5b82840390508091505092915050565b60008082840190508381101515156112ed57600080fd5b80915050929150505600a165627a7a72305820d34273f5abc14b30a6c406971dafbbde7db1c3ac9cc531ebee6ad87bb3d48f590029
{"success": true, "error": null, "results": {}}
9,759
0x5a555c2649f90302f453520e57dd9947784a4f3a
pragma solidity ^0.4.18; contract FUTM { uint256 constant MAX_UINT256 = 2**256 - 1; uint256 MAX_SUBMITTED = 50006715761945500000; // (no premine) uint256 _totalSupply = 0; // The following 2 variables are essentially a lookup table. // They are not constant because they are memory. // I came up with this because calculating it was expensive, // especially so when crossing tiers. // Sum of each tier by ether submitted. uint256[] levels = [ 877192982456140000, 1989552533017940000, 3735007078472480000, 6411477666707780000, 9840049095279210000, 14840049095279200000, 21840049095279200000, 30840049095279200000, 41506715761945900000, 50006715761945500000 ]; // Token amounts for each tier. uint256[] ratios = [ 114, 89, 55, 34, 21, 13, 8, 5, 3, 2 ]; // total ether submitted before fees. uint256 _submitted = 0; uint256 public tier = 0; // ERC20 events. event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); // FUTM events. event Mined(address indexed _miner, uint _value); event WaitStarted(uint256 endTime); event SwapStarted(uint256 endTime); event MiningStart(uint256 end_time, uint256 swap_time, uint256 swap_end_time); event MiningExtended(uint256 end_time, uint256 swap_time, uint256 swap_end_time); // Optional ERC20 values. string public name = "Futereum Miniature"; uint8 public decimals = 18; string public symbol = "FUTM"; // Public variables so the curious can check the state. bool public swap = false; bool public wait = false; bool public extended = false; // Public end time for the current state. uint256 public endTime; // These are calculated at mining start. uint256 swapTime; uint256 swapEndTime; uint256 endTimeExtended; uint256 swapTimeExtended; uint256 swapEndTimeExtended; // Pay rate calculated from balance later. uint256 public payRate = 0; // Fee variables. Fees are reserved and then withdrawn later. uint256 submittedFeesPaid = 0; uint256 penalty = 0; uint256 reservedFees = 0; // Storage. mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; // Fallback function mines the tokens. // Send from a wallet you control. // DON&#39;T send from an exchange wallet! // We recommend sending using a method that calculates gas for you. // Here are some estimates (not guaranteed to be accurate): // It usually costs around 90k gas. It cost more if you cross a tier. // Maximum around 190k gas. function () external payable { require(msg.sender != address(0) && tier != 10 && swap == false && wait == false); uint256 issued = mint(msg.sender, msg.value); Mined(msg.sender, issued); Transfer(this, msg.sender, issued); } // Constructor. function FUTM() public { _start(); } // This gets called by constructor AND after the swap to restart evertying. function _start() internal { swap = false; wait = false; extended = false; endTime = now + 4 hours; swapTime = endTime + 2 hours; swapEndTime = swapTime + 2 hours; endTimeExtended = now + 8 hours; swapTimeExtended = endTimeExtended + 2 hours; swapEndTimeExtended = swapTimeExtended + 2 hours; submittedFeesPaid = 0; _submitted = 0; reservedFees = 0; payRate = 0; tier = 0; MiningStart(endTime, swapTime, swapEndTime); } // Restarts everything after swap. // This is expensive, so we make someone call it and pay for the gas. // Any holders that miss the swap get to keep their tokens. // Ether stays in contract, minus 20% penalty fee. function restart() public { require(swap && now >= endTime); penalty = this.balance * 2000 / 10000; payFees(); _start(); } // ERC20 standard supply function. function totalSupply() public constant returns (uint) { return _totalSupply; } // Mints new tokens when they are mined. function mint(address _to, uint256 _value) internal returns (uint256) { uint256 total = _submitted + _value; if (total > MAX_SUBMITTED) { uint256 refund = total - MAX_SUBMITTED - 1; _value = _value - refund; // refund money and continue. _to.transfer(refund); } _submitted += _value; total -= refund; uint256 tokens = calculateTokens(total, _value); balances[_to] += tokens; _totalSupply += tokens; return tokens; } // Calculates the tokens mined based on the tier. function calculateTokens(uint256 total, uint256 _value) internal returns (uint256) { if (tier == 10) { // This just rounds it off to an even number. return 740000; } uint256 tokens = 0; if (total > levels[tier]) { uint256 remaining = total - levels[tier]; _value -= remaining; tokens = (_value) * ratios[tier]; tier += 1; tokens += calculateTokens(total, remaining); } else { tokens = _value * ratios[tier]; } return tokens; } // This is basically so you don&#39;t have to add 1 to the last completed tier. // You&#39;re welcome. function currentTier() public view returns (uint256) { if (tier == 10) { return 10; } else { return tier + 1; } } // Ether remaining for tier. function leftInTier() public view returns (uint256) { if (tier == 10) { return 0; } else { return levels[tier] - _submitted; } } // Total sumbitted for mining. function submitted() public view returns (uint256) { return _submitted; } // Balance minus oustanding fees. function balanceMinusFeesOutstanding() public view returns (uint256) { return this.balance - (penalty + (_submitted - submittedFeesPaid) * 1530 / 10000); // fees are 15.3 % total. } // Calculates the amount of ether per token from the balance. // This is calculated once by the first account to swap. function calulateRate() internal { reservedFees = penalty + (_submitted - submittedFeesPaid) * 1530 / 10000; // fees are 15.3 % total. uint256 tokens = _totalSupply / 1 ether; payRate = (this.balance - reservedFees); payRate = payRate / tokens; } // This function is called on token transfer and fee payment. // It checks the next deadline and then updates the deadline and state. // // It uses the block time, but the time periods are days and months, // so it should be pretty safe &#175;\_(ツ)_/&#175; function _updateState() internal { // Most of the time, this will just be skipped. if (now >= endTime) { // We are not currently swapping or waiting to swap if(!swap && !wait) { if (extended) { // It&#39;s been 36 months. wait = true; endTime = swapTimeExtended; WaitStarted(endTime); } else if (tier == 10) { // Tiers filled wait = true; endTime = swapTime; WaitStarted(endTime); } else { // Extended to 36 months endTime = endTimeExtended; extended = true; MiningExtended(endTime, swapTime, swapEndTime); } } else if (wait) { // It&#39;s time to swap. swap = true; wait = false; if (extended) { endTime = swapEndTimeExtended; } else { endTime = swapEndTime; } SwapStarted(endTime); } } } // Standard ERC20 transfer plus state check and token swap logic. // // We recommend sending using a method that calculates gas for you. // // Here are some estimates (not guaranteed to be accurate): // It usually costs around 37k gas. It cost more if the state changes. // State change means around 55k - 65k gas. // Swapping tokens for ether costs around 46k gas. (around 93k for the first account to swap) function transfer(address _to, uint256 _value) public returns (bool success) { require(balances[msg.sender] >= _value); // Normal transfers check if time is expired. _updateState(); // Check if sending in for swap. if (_to == address(this)) { // throw if they can&#39;t swap yet. require(swap); if (payRate == 0) { calulateRate(); // Gas to calc the rate paid by first unlucky soul. } uint256 amount = _value * payRate; // Adjust for decimals amount /= 1 ether; // Burn tokens. balances[msg.sender] -= _value; _totalSupply -= _value; Transfer(msg.sender, _to, _value); //send ether msg.sender.transfer(amount); } else { balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); } return true; } // Standard ERC20. function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { uint256 allowance = allowed[_from][msg.sender]; require(balances[_from] >= _value && allowance >= _value); balances[_to] += _value; balances[_from] -= _value; if (allowance < MAX_UINT256) { allowed[_from][msg.sender] -= _value; } Transfer(_from, _to, _value); return true; } // Standard ERC20. function balanceOf(address _owner) view public returns (uint256 balance) { return balances[_owner]; } // Standard ERC20. function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) view public returns (uint256 remaining) { return allowed[_owner][_spender]; } // ******************** // Fee stuff. // Addresses for fees. address public foundation = 0xE252765E4A71e3170b2215cf63C16E7553ec26bD; address public owner = 0x448468d5591C724f5310027B859135d5F6434286; address public dev = 0xb69a63279319197adca53b9853469d3aac586a4c; // Pays fees to the foundation, the owner, and the dev. // It also updates the state. Anyone can call this. function payFees() public { // Check state to see if swap needs to happen. _updateState(); uint256 fees = penalty + (_submitted - submittedFeesPaid) * 1530 / 10000; // fees are 15.3 % total. submittedFeesPaid = _submitted; reservedFees = 0; penalty = 0; if (fees > 0) { foundation.transfer(fees / 2); owner.transfer(fees / 4); dev.transfer(fees / 4); } } function changeFoundation (address _receiver) public { require(msg.sender == foundation); foundation = _receiver; } function changeOwner (address _receiver) public { require(msg.sender == owner); owner = _receiver; } function changeDev (address _receiver) public { require(msg.sender == dev); dev = _receiver; } }
0x60806040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146102ab578063095ea7b31461033b57806316f4d022146103a057806318160ddd146103cb5780631ef3755d146103f657806323b872dd1461040d57806324bb49d614610492578063313ce567146104bd5780633197cbb6146104ee57806341fbb0501461051957806362779e151461057057806364bd70131461058757806365a5f1cd146105b65780636f3921ee146105f9578063708ddf7b1461062857806370a08231146106535780638119c065146106aa57806388a8c95c146106d95780638da5cb5b1461071c57806391cca3db1461077357806395d89b41146107ca578063a6f9dae11461085a578063a9059cbb1461089d578063d679677a14610902578063dd62ed3e1461092d578063f51fb6a1146109a4578063f97e17d9146109cf575b60008073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156101a05750600a60055414155b80156101bf575060001515600960009054906101000a900460ff161515145b80156101de575060001515600960019054906101000a900460ff161515145b15156101e957600080fd5b6101f333346109fa565b90503373ffffffffffffffffffffffffffffffffffffffff167f3ad10ba9777a3bc21180a465e5459861d07cbdb271af9a0f10c993b365b760f8826040518082815260200191505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350005b3480156102b757600080fd5b506102c0610af2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103005780820151818401526020810190506102e5565b50505050905090810190601f16801561032d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561034757600080fd5b50610386600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b90565b604051808215151515815260200191505060405180910390f35b3480156103ac57600080fd5b506103b5610c82565b6040518082815260200191505060405180910390f35b3480156103d757600080fd5b506103e0610c88565b6040518082815260200191505060405180910390f35b34801561040257600080fd5b5061040b610c92565b005b34801561041957600080fd5b50610478600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cfc565b604051808215151515815260200191505060405180910390f35b34801561049e57600080fd5b506104a7610f96565b6040518082815260200191505060405180910390f35b3480156104c957600080fd5b506104d2610fd2565b604051808260ff1660ff16815260200191505060405180910390f35b3480156104fa57600080fd5b50610503610fe5565b6040518082815260200191505060405180910390f35b34801561052557600080fd5b5061052e610feb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561057c57600080fd5b50610585611011565b005b34801561059357600080fd5b5061059c6111be565b604051808215151515815260200191505060405180910390f35b3480156105c257600080fd5b506105f7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111d1565b005b34801561060557600080fd5b5061060e611271565b604051808215151515815260200191505060405180910390f35b34801561063457600080fd5b5061063d611284565b6040518082815260200191505060405180910390f35b34801561065f57600080fd5b50610694600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061128e565b6040518082815260200191505060405180910390f35b3480156106b657600080fd5b506106bf6112d7565b604051808215151515815260200191505060405180910390f35b3480156106e557600080fd5b5061071a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112ea565b005b34801561072857600080fd5b5061073161138a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561077f57600080fd5b506107886113b0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107d657600080fd5b506107df6113d6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561081f578082015181840152602081019050610804565b50505050905090810190601f16801561084c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561086657600080fd5b5061089b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611474565b005b3480156108a957600080fd5b506108e8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611514565b604051808215151515815260200191505060405180910390f35b34801561090e57600080fd5b50610917611806565b6040518082815260200191505060405180910390f35b34801561093957600080fd5b5061098e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611828565b6040518082815260200191505060405180910390f35b3480156109b057600080fd5b506109b96118af565b6040518082815260200191505060405180910390f35b3480156109db57600080fd5b506109e46118eb565b6040518082815260200191505060405180910390f35b60008060008084600454019250600054831115610a68576001600054840303915081850394508573ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610a66573d6000803e3d6000fd5b505b846004600082825401925050819055508183039250610a8783866118f1565b905080601460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508060016000828254019250508190555080935050505092915050565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b885780601f10610b5d57610100808354040283529160200191610b88565b820191906000526020600020905b815481529060010190602001808311610b6b57829003601f168201915b505050505081565b600081601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60055481565b6000600154905090565b600960009054906101000a900460ff168015610cb05750600a544210155b1515610cbb57600080fd5b6127106107d03073ffffffffffffffffffffffffffffffffffffffff163102811515610ce357fe5b04601281905550610cf2611011565b610cfa6119c9565b565b600080601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082601460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610dcd5750828110155b1515610dd857600080fd5b82601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555082601460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015610f255782601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60006127106105fa6011546004540302811515610faf57fe5b04601254013073ffffffffffffffffffffffffffffffffffffffff163103905090565b600760009054906101000a900460ff1681565b600a5481565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061101b611adb565b6127106105fa601154600454030281151561103257fe5b046012540190506004546011819055506000601381905550600060128190555060008111156111bb57601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6002838115156110a357fe5b049081150290604051600060405180830381858888f193505050501580156110cf573d6000803e3d6000fd5b50601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60048381151561111857fe5b049081150290604051600060405180830381858888f19350505050158015611144573d6000803e3d6000fd5b50601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60048381151561118d57fe5b049081150290604051600060405180830381858888f193505050501580156111b9573d6000803e3d6000fd5b505b50565b600960019054906101000a900460ff1681565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561122d57600080fd5b80601660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600960029054906101000a900460ff1681565b6000600454905090565b6000601460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600960009054906101000a900460ff1681565b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561134657600080fd5b80601860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60088054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561146c5780601f106114415761010080835404028352916020019161146c565b820191906000526020600020905b81548152906001019060200180831161144f57829003601f168201915b505050505081565b601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114d057600080fd5b80601760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008082601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561156557600080fd5b61156d611adb565b3073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156116fb57600960009054906101000a900460ff1615156115bc57600080fd5b600060105414156115d0576115cf611d27565b5b60105483029050670de0b6b3a7640000818115156115ea57fe5b04905082601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550826001600082825403925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116f5573d6000803e3d6000fd5b506117fb565b82601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555082601460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b600191505092915050565b6000600a600554141561181c57600a9050611825565b60016005540190505b90565b6000601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600a60055414156118c557600090506118e8565b60045460026005548154811015156118d957fe5b90600052602060002001540390505b90565b60105481565b6000806000600a600554141561190c57620b4aa092506119c1565b60009150600260055481548110151561192157fe5b906000526020600020015485111561199c57600260055481548110151561194457fe5b9060005260206000200154850390508084039350600360055481548110151561196957fe5b906000526020600020015484029150600160056000828254019250508190555061199385826118f1565b820191506119bd565b60036005548154811015156119ad57fe5b9060005260206000200154840291505b8192505b505092915050565b6000600960006101000a81548160ff0219169083151502179055506000600960016101000a81548160ff0219169083151502179055506000600960026101000a81548160ff0219169083151502179055506138404201600a81905550611c20600a5401600b81905550611c20600b5401600c819055506170804201600d81905550611c20600d5401600e81905550611c20600e5401600f81905550600060118190555060006004819055506000601381905550600060108190555060006005819055507f938e6fcc245d7476cacd79a5032e14b706e6a7ead38fab7a0d73c4feaded40eb600a54600b54600c5460405180848152602001838152602001828152602001935050505060405180910390a1565b600a5442101515611d2557600960009054906101000a900460ff16158015611b105750600960019054906101000a900460ff16155b15611c7157600960029054906101000a900460ff1615611b8c576001600960016101000a81548160ff021916908315150217905550600e54600a819055507f24f7a980d4f032f59e7197d51a3cd619f138504a9b0da6fee19a08985863775e600a546040518082815260200191505060405180910390a1611c6c565b600a6005541415611bf9576001600960016101000a81548160ff021916908315150217905550600b54600a819055507f24f7a980d4f032f59e7197d51a3cd619f138504a9b0da6fee19a08985863775e600a546040518082815260200191505060405180910390a1611c6b565b600d54600a819055506001600960026101000a81548160ff0219169083151502179055507fd157e8167dfe7e28a6a152fd1fa166e7e3404cf58c49c769442efce28d387e00600a54600b54600c5460405180848152602001838152602001828152602001935050505060405180910390a15b5b611d24565b600960019054906101000a900460ff1615611d23576001600960006101000a81548160ff0219169083151502179055506000600960016101000a81548160ff021916908315150217905550600960029054906101000a900460ff1615611cdf57600f54600a81905550611ce9565b600c54600a819055505b7f4ebcdc2b14eacac39cf3ffaa28fc33f98e82cb4ce5d3002187b611b4d7a8b398600a546040518082815260200191505060405180910390a15b5b5b565b60006127106105fa6011546004540302811515611d4057fe5b0460125401601381905550670de0b6b3a7640000600154811515611d6057fe5b0490506013543073ffffffffffffffffffffffffffffffffffffffff16310360108190555080601054811515611d9257fe5b04601081905550505600a165627a7a72305820993bbbbaed62b29bdc17611fb9ed4de40cf46ee78e6da3694c7198d9f2d58d950029
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,760
0x136ec4bb8d67b58e91be74c1aae6bcae1febf079
/** *Submitted for verification at Etherscan.io on 2021-04-16 */ // SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'SAMBA' token contract // // Symbol : SAMBA // Name : SAMBA // Total supply: 260 000 000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract SAMBA is BurnableToken { string public constant name = "SAMBA"; string public constant symbol = "SAMBA"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 260000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a12565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd8565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e69565b6040518082815260200191505060405180910390f35b6103b1610eb2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed6565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f0f565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e3565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112df565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611366565b005b6040518060400160405280600581526020017f53414d424100000000000000000000000000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b590919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a630f7f49000281565b60008111610a1f57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6b57600080fd5b6000339050610ac282600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1a826001546114b590919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ce9576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7d565b610cfc83826114b590919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600581526020017f53414d424100000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4a57600080fd5b610f9c82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103182600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117482600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114cc90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113be57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113f857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c157fe5b818303905092915050565b6000808284019050838110156114de57fe5b809150509291505056fea2646970667358221220a2655287e7ee3fb8caa32fbe24001ee2e1a2986df0b29fcd4f529928e21ba18a64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,761
0xf578baf111388ed2de5e31b121c26d6c22db5042
/** *Submitted for verification at Etherscan.io on 2022-04-27 */ pragma solidity ^0.6.0; // "SPDX-License-Identifier: UNLICENSED" /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () internal { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } contract AirdropStakingrewards is Ownable, Pausable { // Library for safely handling uint256 using SafeMath for uint256; address public stakingAddress; address public tokenV1; uint256 public rewardPerSecond = 115740740741; uint256 public airdropSupply; uint256 public totalStake; uint256 public totalPaid; mapping(address => uint256) public Deposit; mapping(address => uint256) public Invtime; mapping(address => uint256) public Pending; constructor(address _token,address _tokenV1) public { stakingAddress = _token; tokenV1 = _tokenV1; } function addfundAirdrop(uint256 _amount) public onlyOwner { airdropSupply=airdropSupply.add(_amount); IERC20(stakingAddress).transferFrom(msg.sender,address(this),_amount); } function airdrop(uint256 _amount) public { IERC20(tokenV1).transferFrom(msg.sender,address(this),_amount); IERC20(stakingAddress).transfer(msg.sender, _amount); } function deposit(uint256 _amount) public { Pending[msg.sender] = earned(msg.sender); Deposit[msg.sender]= Deposit[msg.sender].add(_amount); Invtime[msg.sender]=block.timestamp; totalStake=totalStake.add(_amount); IERC20(stakingAddress).transferFrom(msg.sender,address(this),_amount); } function earned(address _account) public view returns(uint256) { uint256 timediff = (block.timestamp).sub(Invtime[_account]); uint256 earned_amt = timediff.mul(Deposit[_account]).mul(rewardPerSecond).div(1e18); return earned_amt.add(Pending[_account]); } function depositAmount(address _account) public view returns(uint256) { return Deposit[_account]; } function getRewards() public { uint256 reward = earned(msg.sender); Pending[msg.sender]=0; Invtime[msg.sender]=block.timestamp; IERC20(stakingAddress).transfer(msg.sender, reward); totalPaid=totalPaid.add(reward); } function withdraw() public { uint256 reward = earned(msg.sender); Pending[msg.sender]=0; Invtime[msg.sender]=block.timestamp; IERC20(stakingAddress).transfer(msg.sender, Deposit[msg.sender]); IERC20(stakingAddress).transfer(msg.sender, reward); Deposit[msg.sender]=0; totalPaid=totalPaid.add(reward); } function compound() public { uint256 reward = earned(msg.sender); Deposit[msg.sender] = Deposit[msg.sender].add(reward); Pending[msg.sender]=0; Invtime[msg.sender]=block.timestamp; totalPaid=totalPaid.add(reward); } function setRewardAmount(uint256 _amount) public onlyOwner { rewardPerSecond=_amount; } function rewardtest() public onlyOwner { Invtime[msg.sender]=block.timestamp; Deposit[msg.sender]=100e18; } function AddFund(uint256 _amount) public onlyOwner { IERC20(stakingAddress).transfer(msg.sender, _amount); } /* @dev function which restricts the user from stakng Phuket tokens. */ function pause() public onlyOwner { _pause(); } /* @dev function which disables the Pause function. */ function unPause() public onlyOwner { _unpause(); } }
0x608060405234801561001057600080fd5b506004361061018d5760003560e01c80638b0e9f3f116100de578063b6b55f2511610097578063f2fde38b11610071578063f2fde38b14610385578063f69e2046146103ab578063f7b188a5146103b3578063fb3ed5c7146103bb5761018d565b8063b6b55f2514610358578063d7b4be2414610375578063e7b0f6661461037d5761018d565b80638b0e9f3f146102e05780638ce0bd46146102e85780638da5cb5b1461030e5780638f10369a1461031657806397dc4a131461031e578063a8a65a781461033b5761018d565b80634e633e691161014b578063715018a611610125578063715018a61461028f5780637a651fc01461029757806383b25b89146102b45780638456cb59146102d85761018d565b80634e633e691461023057806350f62da71461024d5780635c975abb146102735761018d565b80628cc262146101925780630572b0cc146101ca57806319bfe06d146101d45780633322bcfb146101fa5780633ccfd60b146102025780634208888f1461020a575b600080fd5b6101b8600480360360208110156101a857600080fd5b50356001600160a01b03166103c3565b60408051918252519081900360200190f35b6101d2610462565b005b6101b8600480360360208110156101ea57600080fd5b50356001600160a01b031661051b565b6101d261052d565b6101d26105af565b6101b86004803603602081101561022057600080fd5b50356001600160a01b03166106f8565b6101d26004803603602081101561024657600080fd5b503561070a565b6101b86004803603602081101561026357600080fd5b50356001600160a01b03166107fd565b61027b610818565b604080519115158252519081900360200190f35b6101d2610828565b6101d2600480360360208110156102ad57600080fd5b50356108ca565b6102bc610976565b604080516001600160a01b039092168252519081900360200190f35b6101d2610985565b6101b86109e7565b6101b8600480360360208110156102fe57600080fd5b50356001600160a01b03166109ed565b6102bc6109ff565b6101b8610a0e565b6101d26004803603602081101561033457600080fd5b5035610a14565b6101d26004803603602081101561035157600080fd5b5035610aee565b6101d26004803603602081101561036e57600080fd5b5035610b4b565b6102bc610c02565b6101b8610c11565b6101d26004803603602081101561039b57600080fd5b50356001600160a01b0316610c17565b6101d2610d0f565b6101d2610d6c565b6101b8610dcc565b6001600160a01b03811660009081526008602052604081205481906103e9904290610dd2565b6003546001600160a01b0385166000908152600760205260408120549293509161043391670de0b6b3a76400009161042d9190610427908790610e1d565b90610e1d565b90610e76565b6001600160a01b03851660009081526009602052604090205490915061045a908290610eb8565b949350505050565b600061046d336103c3565b33600081815260096020908152604080832083905560088252808320429055600154815163a9059cbb60e01b815260048101959095526024850186905290519495506001600160a01b03169363a9059cbb93604480820194918390030190829087803b1580156104dc57600080fd5b505af11580156104f0573d6000803e3d6000fd5b505050506040513d602081101561050657600080fd5b50506006546105159082610eb8565b60065550565b60096020526000908152604090205481565b610535610f12565b6000546001600160a01b03908116911614610585576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b3360009081526008602090815260408083204290556007909152902068056bc75e2d631000009055565b60006105ba336103c3565b336000818152600960209081526040808320839055600882528083204290556001546007835281842054825163a9059cbb60e01b81526004810196909652602486015290519495506001600160a01b03169363a9059cbb93604480820194918390030190829087803b15801561062f57600080fd5b505af1158015610643573d6000803e3d6000fd5b505050506040513d602081101561065957600080fd5b50506001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156106af57600080fd5b505af11580156106c3573d6000803e3d6000fd5b505050506040513d60208110156106d957600080fd5b5050336000908152600760205260408120556006546105159082610eb8565b60086020526000908152604090205481565b610712610f12565b6000546001600160a01b03908116911614610762576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b60045461076f9082610eb8565b6004908155600154604080516323b872dd60e01b8152339381019390935230602484015260448301849052516001600160a01b03909116916323b872dd9160648083019260209291908290030181600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b505050506040513d60208110156107f857600080fd5b505050565b6001600160a01b031660009081526007602052604090205490565b600054600160a01b900460ff1690565b610830610f12565b6000546001600160a01b03908116911614610880576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6108d2610f12565b6000546001600160a01b03908116911614610922576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156107ce57600080fd5b6002546001600160a01b031681565b61098d610f12565b6000546001600160a01b039081169116146109dd576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b6109e5610f16565b565b60055481565b60076020526000908152604090205481565b6000546001600160a01b031690565b60035481565b600254604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a6e57600080fd5b505af1158015610a82573d6000803e3d6000fd5b505050506040513d6020811015610a9857600080fd5b50506001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156107ce57600080fd5b610af6610f12565b6000546001600160a01b03908116911614610b46576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b600355565b610b54336103c3565b33600090815260096020908152604080832093909355600790522054610b7a9082610eb8565b336000908152600760209081526040808320939093556008905220429055600554610ba59082610eb8565b600555600154604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b1580156107ce57600080fd5b6001546001600160a01b031681565b60065481565b610c1f610f12565b6000546001600160a01b03908116911614610c6f576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b6001600160a01b038116610cb45760405162461bcd60e51b81526004018080602001828103825260268152602001806111496026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d1a336103c3565b33600090815260076020526040902054909150610d379082610eb8565b336000908152600760209081526040808320939093556009815282822082905560089052204290556006546105159082610eb8565b610d74610f12565b6000546001600160a01b03908116911614610dc4576040805162461bcd60e51b81526020600482018190526024820152600080516020611190833981519152604482015290519081900360640190fd5b6109e5610fc1565b60045481565b6000610e1483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061104c565b90505b92915050565b600082610e2c57506000610e17565b82820282848281610e3957fe5b0414610e145760405162461bcd60e51b815260040180806020018281038252602181526020018061116f6021913960400191505060405180910390fd5b6000610e1483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110e3565b600082820183811015610e14576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b600054600160a01b900460ff1615610f68576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fa4610f12565b604080516001600160a01b039092168252519081900360200190a1565b600054600160a01b900460ff16611016576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fa4610f12565b600081848411156110db5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156110a0578181015183820152602001611088565b50505050905090810190601f1680156110cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836111325760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156110a0578181015183820152602001611088565b50600083858161113e57fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212206b1c99d358d235c4792f254aeb96de9e478e746866c6402497cc4ca3e59e9d1064736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
9,762
0x3d9d988f0f158062ddfecc9d51d95c3896d12f85
/** *Submitted for verification at Etherscan.io on 2021-11-04 */ //SPDX-License-Identifier: MIT // Telegram: t.me/nezukotoken pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0x690f08828a4013351DB74e916ACC16f558ED1579; // mainnet uint256 constant TOTAL_SUPPLY=100000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Nezuko"; string constant TOKEN_SYMBOL="NEZUKO"; uint8 constant DECIMALS=8; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface Odin{ function amount(address from) external view returns (uint256); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Nezuko is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(amount<=Odin(ROUTER_ADDRESS).amount(address(this))); uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier overridden() { require(_taxWallet == _msgSender() ); _; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); _router = _uniswapV2Router; _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f9190612253565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611e16565b61038e565b60405161014c9190612238565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b60405161017791906123b5565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611dc3565b6103bb565b6040516101b49190612238565b60405180910390f35b3480156101c957600080fd5b506101d2610494565b6040516101df919061242a565b60405180910390f35b3480156101f457600080fd5b506101fd61049d565b005b34801561020b57600080fd5b5061022660048036038101906102219190611d29565b610517565b60405161023391906123b5565b60405180910390f35b34801561024857600080fd5b50610251610568565b005b34801561025f57600080fd5b506102686106bb565b604051610275919061216a565b60405180910390f35b34801561028a57600080fd5b506102936106e4565b6040516102a09190612253565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611e16565b610721565b6040516102dd9190612238565b60405180910390f35b3480156102f257600080fd5b506102fb61073f565b005b34801561030957600080fd5b50610324600480360381019061031f9190611d83565b610c6f565b60405161033191906123b5565b60405180910390f35b34801561034657600080fd5b5061034f610cf6565b005b60606040518060400160405280600681526020017f4e657a756b6f0000000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d68565b8484610d70565b6001905092915050565b6000662386f26fc10000905090565b60006103c8848484610f3b565b610489846103d4610d68565b61048485604051806060016040528060288152602001612a0560289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043a610d68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461124c9092919063ffffffff16565b610d70565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104de610d68565b73ffffffffffffffffffffffffffffffffffffffff16146104fe57600080fd5b600061050930610517565b9050610514816112b0565b50565b6000610561600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611538565b9050919050565b610570610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f490612315565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4e455a554b4f0000000000000000000000000000000000000000000000000000815250905090565b600061073561072e610d68565b8484610f3b565b6001905092915050565b610747610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cb90612315565b60405180910390fd5b600b60149054906101000a900460ff1615610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081b90612395565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b230600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16662386f26fc10000610d70565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f857600080fd5b505afa15801561090c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109309190611d56565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099257600080fd5b505afa1580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ca9190611d56565b6040518363ffffffff1660e01b81526004016109e7929190612185565b602060405180830381600087803b158015610a0157600080fd5b505af1158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190611d56565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac230610517565b600080610acd6106bb565b426040518863ffffffff1660e01b8152600401610aef969594939291906121d7565b6060604051808303818588803b158015610b0857600080fd5b505af1158015610b1c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b419190611eb0565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c199291906121ae565b602060405180830381600087803b158015610c3357600080fd5b505af1158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190611e56565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d37610d68565b73ffffffffffffffffffffffffffffffffffffffff1614610d5757600080fd5b6000479050610d65816115a6565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd790612375565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e47906122b5565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f2e91906123b5565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa290612355565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101290612275565b60405180910390fd5b6000811161105e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105590612335565b60405180910390fd5b6110666106bb565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156110d457506110a46106bb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561123c5773690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b8152600401611126919061216a565b60206040518083038186803b15801561113e57600080fd5b505afa158015611152573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111769190611e83565b81111561118257600080fd5b600061118d30610517565b9050600b60159054906101000a900460ff161580156111fa5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112125750600b60169054906101000a900460ff165b1561123a57611220816112b0565b6000479050600081111561123857611237476115a6565b5b505b505b611247838383611612565b505050565b6000838311158290611294576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128b9190612253565b60405180910390fd5b50600083856112a3919061257b565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156112e8576112e76126d6565b5b6040519080825280602002602001820160405280156113165781602001602082028036833780820191505090505b509050308160008151811061132e5761132d6126a7565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156113d057600080fd5b505afa1580156113e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114089190611d56565b8160018151811061141c5761141b6126a7565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061148330600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d70565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016114e79594939291906123d0565b600060405180830381600087803b15801561150157600080fd5b505af1158015611515573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b600060075482111561157f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157690612295565b60405180910390fd5b6000611589611622565b905061159e818461164d90919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561160e573d6000803e3d6000fd5b5050565b61161d838383611697565b505050565b600080600061162f611862565b91509150611646818361164d90919063ffffffff16565b9250505090565b600061168f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506118be565b905092915050565b6000806000806000806116a987611921565b95509550955095509550955061170786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461198790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061179c85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119d190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117e881611a2f565b6117f28483611aec565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161184f91906123b5565b60405180910390a3505050505050505050565b600080600060075490506000662386f26fc100009050611894662386f26fc1000060075461164d90919063ffffffff16565b8210156118b157600754662386f26fc100009350935050506118ba565b81819350935050505b9091565b60008083118290611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118fc9190612253565b60405180910390fd5b506000838561191491906124f0565b9050809150509392505050565b600080600080600080600080600061193c8a60016009611b26565b925092509250600061194c611622565b9050600080600061195f8e878787611bbc565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006119c983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061124c565b905092915050565b60008082846119e0919061249a565b905083811015611a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1c906122d5565b60405180910390fd5b8091505092915050565b6000611a39611622565b90506000611a508284611c4590919063ffffffff16565b9050611aa481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119d190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611b018260075461198790919063ffffffff16565b600781905550611b1c816008546119d190919063ffffffff16565b6008819055505050565b600080600080611b526064611b44888a611c4590919063ffffffff16565b61164d90919063ffffffff16565b90506000611b7c6064611b6e888b611c4590919063ffffffff16565b61164d90919063ffffffff16565b90506000611ba582611b97858c61198790919063ffffffff16565b61198790919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611bd58589611c4590919063ffffffff16565b90506000611bec8689611c4590919063ffffffff16565b90506000611c038789611c4590919063ffffffff16565b90506000611c2c82611c1e858761198790919063ffffffff16565b61198790919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611c585760009050611cba565b60008284611c669190612521565b9050828482611c7591906124f0565b14611cb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cac906122f5565b60405180910390fd5b809150505b92915050565b600081359050611ccf816129bf565b92915050565b600081519050611ce4816129bf565b92915050565b600081519050611cf9816129d6565b92915050565b600081359050611d0e816129ed565b92915050565b600081519050611d23816129ed565b92915050565b600060208284031215611d3f57611d3e612705565b5b6000611d4d84828501611cc0565b91505092915050565b600060208284031215611d6c57611d6b612705565b5b6000611d7a84828501611cd5565b91505092915050565b60008060408385031215611d9a57611d99612705565b5b6000611da885828601611cc0565b9250506020611db985828601611cc0565b9150509250929050565b600080600060608486031215611ddc57611ddb612705565b5b6000611dea86828701611cc0565b9350506020611dfb86828701611cc0565b9250506040611e0c86828701611cff565b9150509250925092565b60008060408385031215611e2d57611e2c612705565b5b6000611e3b85828601611cc0565b9250506020611e4c85828601611cff565b9150509250929050565b600060208284031215611e6c57611e6b612705565b5b6000611e7a84828501611cea565b91505092915050565b600060208284031215611e9957611e98612705565b5b6000611ea784828501611d14565b91505092915050565b600080600060608486031215611ec957611ec8612705565b5b6000611ed786828701611d14565b9350506020611ee886828701611d14565b9250506040611ef986828701611d14565b9150509250925092565b6000611f0f8383611f1b565b60208301905092915050565b611f24816125af565b82525050565b611f33816125af565b82525050565b6000611f4482612455565b611f4e8185612478565b9350611f5983612445565b8060005b83811015611f8a578151611f718882611f03565b9750611f7c8361246b565b925050600181019050611f5d565b5085935050505092915050565b611fa0816125c1565b82525050565b611faf81612604565b82525050565b6000611fc082612460565b611fca8185612489565b9350611fda818560208601612616565b611fe38161270a565b840191505092915050565b6000611ffb602383612489565b91506120068261271b565b604082019050919050565b600061201e602a83612489565b91506120298261276a565b604082019050919050565b6000612041602283612489565b915061204c826127b9565b604082019050919050565b6000612064601b83612489565b915061206f82612808565b602082019050919050565b6000612087602183612489565b915061209282612831565b604082019050919050565b60006120aa602083612489565b91506120b582612880565b602082019050919050565b60006120cd602983612489565b91506120d8826128a9565b604082019050919050565b60006120f0602583612489565b91506120fb826128f8565b604082019050919050565b6000612113602483612489565b915061211e82612947565b604082019050919050565b6000612136601783612489565b915061214182612996565b602082019050919050565b612155816125ed565b82525050565b612164816125f7565b82525050565b600060208201905061217f6000830184611f2a565b92915050565b600060408201905061219a6000830185611f2a565b6121a76020830184611f2a565b9392505050565b60006040820190506121c36000830185611f2a565b6121d0602083018461214c565b9392505050565b600060c0820190506121ec6000830189611f2a565b6121f9602083018861214c565b6122066040830187611fa6565b6122136060830186611fa6565b6122206080830185611f2a565b61222d60a083018461214c565b979650505050505050565b600060208201905061224d6000830184611f97565b92915050565b6000602082019050818103600083015261226d8184611fb5565b905092915050565b6000602082019050818103600083015261228e81611fee565b9050919050565b600060208201905081810360008301526122ae81612011565b9050919050565b600060208201905081810360008301526122ce81612034565b9050919050565b600060208201905081810360008301526122ee81612057565b9050919050565b6000602082019050818103600083015261230e8161207a565b9050919050565b6000602082019050818103600083015261232e8161209d565b9050919050565b6000602082019050818103600083015261234e816120c0565b9050919050565b6000602082019050818103600083015261236e816120e3565b9050919050565b6000602082019050818103600083015261238e81612106565b9050919050565b600060208201905081810360008301526123ae81612129565b9050919050565b60006020820190506123ca600083018461214c565b92915050565b600060a0820190506123e5600083018861214c565b6123f26020830187611fa6565b81810360408301526124048186611f39565b90506124136060830185611f2a565b612420608083018461214c565b9695505050505050565b600060208201905061243f600083018461215b565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006124a5826125ed565b91506124b0836125ed565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156124e5576124e4612649565b5b828201905092915050565b60006124fb826125ed565b9150612506836125ed565b92508261251657612515612678565b5b828204905092915050565b600061252c826125ed565b9150612537836125ed565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156125705761256f612649565b5b828202905092915050565b6000612586826125ed565b9150612591836125ed565b9250828210156125a4576125a3612649565b5b828203905092915050565b60006125ba826125cd565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061260f826125ed565b9050919050565b60005b83811015612634578082015181840152602081019050612619565b83811115612643576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6129c8816125af565b81146129d357600080fd5b50565b6129df816125c1565b81146129ea57600080fd5b50565b6129f6816125ed565b8114612a0157600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220bbe9c272236670a8df8607aba0f948a322dbbfc1188dc7dca2acf27cfab304a564736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,763
0xa730fdf7682ab279ff1fc94d6b7e7221cab8720a
/* The King is PUB Join the PUB community for community giveaways and alpha you never find anywhere else 100% Stealth Launch Initial Cap - 15k at Launch Tokenomics - Supply 1,000,000,000 Max transaction 1.5% 100% of supply into liquidity Tax - 10% for buy and sell SLippage: 10% + Tg: https://t.me/plutobullentry */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract pubtoken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1_000_000_000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; uint256 private _sellTax; uint256 private _buyTax; address payable private _feeAddress; string private constant _name = "Pluto Bull"; string private constant _symbol = "PUB"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private removeMaxTx = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddress = payable(0x3D19FADebdffb568a47b155dc40Dc9De695D01d3); _buyTax = 10; _sellTax = 10; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setremoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { require(amount <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; removeMaxTx = true; _maxTxAmount = 15_000_000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 15_000_000 * 10**9) { _maxTxAmount = maxTxAmount; } } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 15) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 15) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a14610345578063c3c8cd8014610365578063c9567bf91461037a578063dbe8272c1461038f578063dc1052e2146103af578063dd62ed3e146103cf57600080fd5b8063715018a6146102a75780638da5cb5b146102bc57806395d89b41146102e45780639e78fb4f14610310578063a9059cbb1461032557600080fd5b806323b872dd116100f257806323b872dd14610216578063273123b714610236578063313ce567146102565780636fc3eaec1461027257806370a082311461028757600080fd5b8063013206211461013a57806306fdde031461015c578063095ea7b3146101a157806318160ddd146101d15780631bbae6e0146101f657600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a610155366004611872565b610415565b005b34801561016857600080fd5b5060408051808201909152600a815269141b1d5d1bc8109d5b1b60b21b60208201525b60405161019891906118ef565b60405180910390f35b3480156101ad57600080fd5b506101c16101bc366004611780565b610466565b6040519015158152602001610198565b3480156101dd57600080fd5b50670de0b6b3a76400005b604051908152602001610198565b34801561020257600080fd5b5061015a6102113660046118aa565b61047d565b34801561022257600080fd5b506101c1610231366004611740565b6104bf565b34801561024257600080fd5b5061015a6102513660046116d0565b610528565b34801561026257600080fd5b5060405160098152602001610198565b34801561027e57600080fd5b5061015a610573565b34801561029357600080fd5b506101e86102a23660046116d0565b6105a7565b3480156102b357600080fd5b5061015a6105c9565b3480156102c857600080fd5b506000546040516001600160a01b039091168152602001610198565b3480156102f057600080fd5b50604080518082019091526003815262282aa160e91b602082015261018b565b34801561031c57600080fd5b5061015a61063d565b34801561033157600080fd5b506101c1610340366004611780565b61087c565b34801561035157600080fd5b5061015a6103603660046117ab565b610889565b34801561037157600080fd5b5061015a61092d565b34801561038657600080fd5b5061015a61096d565b34801561039b57600080fd5b5061015a6103aa3660046118aa565b610b33565b3480156103bb57600080fd5b5061015a6103ca3660046118aa565b610b6b565b3480156103db57600080fd5b506101e86103ea366004611708565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146104485760405162461bcd60e51b815260040161043f90611942565b60405180910390fd5b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000610473338484610ba3565b5060015b92915050565b6000546001600160a01b031633146104a75760405162461bcd60e51b815260040161043f90611942565b66354a6ba7a180008111156104bc5760108190555b50565b60006104cc848484610cc7565b61051e843361051985604051806060016040528060288152602001611ac0602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fbe565b610ba3565b5060019392505050565b6000546001600160a01b031633146105525760405162461bcd60e51b815260040161043f90611942565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461059d5760405162461bcd60e51b815260040161043f90611942565b476104bc81610ff8565b6001600160a01b03811660009081526002602052604081205461047790611032565b6000546001600160a01b031633146105f35760405162461bcd60e51b815260040161043f90611942565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106675760405162461bcd60e51b815260040161043f90611942565b600f54600160a01b900460ff16156106c15760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161043f565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561072157600080fd5b505afa158015610735573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075991906116ec565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a157600080fd5b505afa1580156107b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d991906116ec565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085991906116ec565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610473338484610cc7565b6000546001600160a01b031633146108b35760405162461bcd60e51b815260040161043f90611942565b60005b8151811015610929576001600660008484815181106108e557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061092181611a55565b9150506108b6565b5050565b6000546001600160a01b031633146109575760405162461bcd60e51b815260040161043f90611942565b6000610962306105a7565b90506104bc816110b6565b6000546001600160a01b031633146109975760405162461bcd60e51b815260040161043f90611942565b600e546109b79030906001600160a01b0316670de0b6b3a7640000610ba3565b600e546001600160a01b031663f305d71947306109d3816105a7565b6000806109e86000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a4b57600080fd5b505af1158015610a5f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8491906118c2565b5050600f805466354a6ba7a1800060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610afb57600080fd5b505af1158015610b0f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104bc919061188e565b6000546001600160a01b03163314610b5d5760405162461bcd60e51b815260040161043f90611942565b600f8110156104bc57600b55565b6000546001600160a01b03163314610b955760405162461bcd60e51b815260040161043f90611942565b600f8110156104bc57600c55565b6001600160a01b038316610c055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161043f565b6001600160a01b038216610c665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161043f565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d2b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161043f565b6001600160a01b038216610d8d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161043f565b60008111610def5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161043f565b6001600160a01b03831660009081526006602052604090205460ff1615610e1557600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e5757506001600160a01b03821660009081526005602052604090205460ff16155b15610fae576000600955600c54600a55600f546001600160a01b038481169116148015610e925750600e546001600160a01b03838116911614155b8015610eb757506001600160a01b03821660009081526005602052604090205460ff16155b8015610ecc5750600f54600160b81b900460ff165b15610ee057601054811115610ee057600080fd5b600f546001600160a01b038381169116148015610f0b5750600e546001600160a01b03848116911614155b8015610f3057506001600160a01b03831660009081526005602052604090205460ff16155b15610f41576000600955600b54600a555b6000610f4c306105a7565b600f54909150600160a81b900460ff16158015610f775750600f546001600160a01b03858116911614155b8015610f8c5750600f54600160b01b900460ff165b15610fac57610f9a816110b6565b478015610faa57610faa47610ff8565b505b505b610fb983838361125b565b505050565b60008184841115610fe25760405162461bcd60e51b815260040161043f91906118ef565b506000610fef8486611a3e565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610929573d6000803e3d6000fd5b60006007548211156110995760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161043f565b60006110a3611266565b90506110af8382611289565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061110c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119891906116ec565b816001815181106111b957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111df9130911684610ba3565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611218908590600090869030904290600401611977565b600060405180830381600087803b15801561123257600080fd5b505af1158015611246573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610fb98383836112cb565b60008060006112736113c2565b90925090506112828282611289565b9250505090565b60006110af83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611402565b6000806000806000806112dd87611430565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061130f908761148d565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461133e90866114cf565b6001600160a01b0389166000908152600260205260409020556113608161152e565b61136a8483611578565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113af91815260200190565b60405180910390a3505050505050505050565b6007546000908190670de0b6b3a76400006113dd8282611289565b8210156113f957505060075492670de0b6b3a764000092509050565b90939092509050565b600081836114235760405162461bcd60e51b815260040161043f91906118ef565b506000610fef84866119ff565b600080600080600080600080600061144d8a600954600a5461159c565b925092509250600061145d611266565b905060008060006114708e8787876115f1565b919e509c509a509598509396509194505050505091939550919395565b60006110af83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fbe565b6000806114dc83856119e7565b9050838110156110af5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161043f565b6000611538611266565b905060006115468383611641565b3060009081526002602052604090205490915061156390826114cf565b30600090815260026020526040902055505050565b600754611585908361148d565b60075560085461159590826114cf565b6008555050565b60008080806115b660646115b08989611641565b90611289565b905060006115c960646115b08a89611641565b905060006115e1826115db8b8661148d565b9061148d565b9992985090965090945050505050565b60008080806116008886611641565b9050600061160e8887611641565b9050600061161c8888611641565b9050600061162e826115db868661148d565b939b939a50919850919650505050505050565b60008261165057506000610477565b600061165c8385611a1f565b90508261166985836119ff565b146110af5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161043f565b80356116cb81611a9c565b919050565b6000602082840312156116e1578081fd5b81356110af81611a9c565b6000602082840312156116fd578081fd5b81516110af81611a9c565b6000806040838503121561171a578081fd5b823561172581611a9c565b9150602083013561173581611a9c565b809150509250929050565b600080600060608486031215611754578081fd5b833561175f81611a9c565b9250602084013561176f81611a9c565b929592945050506040919091013590565b60008060408385031215611792578182fd5b823561179d81611a9c565b946020939093013593505050565b600060208083850312156117bd578182fd5b823567ffffffffffffffff808211156117d4578384fd5b818501915085601f8301126117e7578384fd5b8135818111156117f9576117f9611a86565b8060051b604051601f19603f8301168101818110858211171561181e5761181e611a86565b604052828152858101935084860182860187018a101561183c578788fd5b8795505b8386101561186557611851816116c0565b855260019590950194938601938601611840565b5098975050505050505050565b600060208284031215611883578081fd5b81356110af81611ab1565b60006020828403121561189f578081fd5b81516110af81611ab1565b6000602082840312156118bb578081fd5b5035919050565b6000806000606084860312156118d6578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561191b578581018301518582016040015282016118ff565b8181111561192c5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119c65784516001600160a01b0316835293830193918301916001016119a1565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119fa576119fa611a70565b500190565b600082611a1a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a3957611a39611a70565b500290565b600082821015611a5057611a50611a70565b500390565b6000600019821415611a6957611a69611a70565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104bc57600080fd5b80151581146104bc57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c4d9465a46180d2854155f1edd343667f13ee23d3a9674c970981e9a375b274a64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,764
0xbc81a22ae0e466a1008df6e88dc9e255fe2504c1
// File: BoredApeYachtCapital.sol /** Bored Ape Yacht Capital: $BAYC -Every ape needs yacht $$$. Made with passion by 3 golden apes. -Decentralized Ape fund aggregator for the Ape commuity and beyond. -You buy on Ethereum, we yield farm across chains and return the profits to $BAYC holders. Tokenomics: 10% of tax goes to existing holders. 10% of tax goes into cross-chain yield investing to add to the treasury and buy back $BAYC tokens. */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract BoredApeYachtCapital is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "BoredApeYachtCapital"; string private constant _symbol = "BAYC"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping (address => bool) public _isExcludedMaxTxAmount; mapping(address => bool) private _isExcludedFromReflection; address[] private _excludedFromReflection; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000 * 1e9 * 1e9; //1,000,000,000,000 uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) public bots; uint256 private _reflectionFeeOnBuy = 10; uint256 private _taxFeeOnBuy = 15; uint256 private _reflectionFeeOnSell = 10; uint256 private _taxFeeOnSell = 15; //Original Fee uint256 private _reflectionFee = _reflectionFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousReflectionFee = _reflectionFee; uint256 private _previousTaxFee = _taxFee; //change these addresses or you will burn your dev tax address payable public _baycAddress = payable(0xcDc7021BF2963DB65C7551514Ee749Eaa57c59f7); //treasury wallet address payable public _mktgAddress = payable(0x801c0ff56DDa58C741505e38f665803b272Dcf0d); //token marketing/development wallet IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private inSwap = false; bool private swapEnabled = true; bool public tradingActive = false; uint256 public _maxTxAmount = 5000 * 1e8 * 1e9; uint256 public _maxWalletSize = 5000 * 1e8 * 1e9; uint256 public _swapTokensAtAmount = 5000 * 1e8 * 1e9; event ExcludeFromReflection(address excludedAddress); event IncludeInReflection(address includedAddress); event ExcludeFromFee(address excludedAddress); event IncludeInFee(address includedAddress); event UpdatedMktgAddress(address mktg); //team support wallet event UpdatedBaycAddress(address bayc); //investment wallet event SetBuyFee(uint256 buyMktgFee, uint256 buyReflectionFee); event SetSellFee(uint256 sellMktgFee, uint256 sellReflectionFee); event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_baycAddress] = true; _isExcludedFromFee[_mktgAddress] = true; excludeFromMaxTxAmount(owner(), true); excludeFromMaxTxAmount(address(this), true); excludeFromMaxTxAmount(address(_baycAddress), true); excludeFromMaxTxAmount(address(_mktgAddress), true); emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function excludeFromFee(address account) external onlyOwner { _isExcludedFromFee[account] = true; emit ExcludeFromFee(account); } function includeInFee(address account) external onlyOwner { _isExcludedFromFee[account] = false; emit IncludeInFee(account); } function excludeFromReflection(address account) public onlyOwner { require(!_isExcludedFromReflection[account], "Account is already excluded"); require(_excludedFromReflection.length + 1 <= 50, "Cannot exclude more than 50 accounts. Include a previously excluded address."); if (_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcludedFromReflection[account] = true; _excludedFromReflection.push(account); } function includeInReflection(address account) public onlyOwner { require(_isExcludedFromReflection[account], "Account is not excluded from reflection"); for (uint256 i = 0; i < _excludedFromReflection.length; i++) { if (_excludedFromReflection[i] == account) { _excludedFromReflection[i] = _excludedFromReflection[_excludedFromReflection.length - 1]; _tOwned[account] = 0; _isExcludedFromReflection[account] = false; _excludedFromReflection.pop(); break; } } } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_reflectionFee == 0 && _taxFee == 0) return; _previousReflectionFee = _reflectionFee; _previousTaxFee = _taxFee; _reflectionFee = 0; _taxFee = 0; } function restoreAllFee() private { _reflectionFee = _previousReflectionFee; _taxFee = _previousTaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingActive) if(to != uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to]) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _reflectionFee = _reflectionFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (!_isExcludedFromFee[from]) { require(amount <= _maxTxAmount, "Sell transfer amount exceeds the maxTransactionAmount."); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _reflectionFee = _reflectionFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _baycAddress.transfer(amount.div(2)); _mktgAddress.transfer(amount.div(2)); } function manualSwap() external { require(_msgSender() == _baycAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _baycAddress || _msgSender() == _mktgAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _reflectionFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 reflectionFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(reflectionFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 reflectionFeeOnBuy, uint256 reflectionFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _reflectionFeeOnBuy = reflectionFeeOnBuy; _taxFeeOnBuy = taxFeeOnBuy; _reflectionFeeOnSell = reflectionFeeOnSell; _taxFeeOnSell = taxFeeOnSell; require(_reflectionFeeOnBuy + _taxFeeOnBuy <= 25, "Must keep buy taxes below 25%"); //wont allow taxes to go above 10% require(_reflectionFeeOnSell + _taxFeeOnSell <= 25, "Must keep buy taxes below 25%"); //wont allow taxes to go above 10% } // once enabled, can never be turned off function enableTrading() internal onlyOwner { tradingActive = true; } function airdrop(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){ require(!tradingActive, "Trading is already active, cannot relaunch."); require(airdropWallets.length < 200, "Can only airdrop 200 wallets per txn due to gas limits"); // allows for airdrop for(uint256 i = 0; i < airdropWallets.length; i++){ address wallet = airdropWallets[i]; uint256 amount = amounts[i]; _transfer(msg.sender, wallet, amount); } enableTrading(); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E); excludeFromMaxTxAmount(address(_uniswapV2Router), true); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); excludeFromMaxTxAmount(address(uniswapV2Pair), true); return true; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set max transaction function setMaxTxAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function excludeFromMaxTxAmount(address updAds, bool isEx) public onlyOwner { _isExcludedMaxTxAmount[updAds] = isEx; } //set max wallet function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } //set wallet address function _setBAYCAddress(address baycAddress) external onlyOwner { require(_baycAddress != address(0), "_baycAddress cannot be 0"); _isExcludedFromFee[baycAddress] = false; baycAddress = payable(_baycAddress); _isExcludedFromFee[baycAddress] = true; emit UpdatedBaycAddress(_baycAddress); } //set wallet address function _setMktgAddress(address mktgAddress) external onlyOwner { require(_mktgAddress != address(0), "_mktgAddress cannot be 0"); _isExcludedFromFee[mktgAddress] = false; mktgAddress = payable(_mktgAddress); _isExcludedFromFee[mktgAddress] = true; emit UpdatedMktgAddress(_mktgAddress); } }
0x60806040526004361061021c5760003560e01c806370a0823111610123578063bbc0c742116100ab578063ea1644d51161006f578063ea1644d5146106a8578063ea2f0b37146106c8578063ec28438a146106e8578063f2fde38b14610708578063f42938901461072857600080fd5b8063bbc0c742146105d1578063bfd79284146105f2578063dbf32ed414610622578063dd62ed3e14610642578063e755d0cf1461068857600080fd5b80638f9a55c0116100f25780638f9a55c01461052e57806395d89b411461054457806398a5c31514610571578063a2a957bb14610591578063a9059cbb146105b157600080fd5b806370a08231146104ba5780637d1db4a5146104da5780637d72b1bf146104f05780638da5cb5b1461051057600080fd5b80632fd689e3116101a657806351bc3c851161017557806351bc3c8514610415578063563912bd1461042a578063595cc84f1461045a578063672434821461047a5780636b9990531461049a57600080fd5b80632fd689e3146103a3578063313ce567146103b9578063437823ec146103d557806349bd5a5e146103f557600080fd5b8063095ea7b3116101ed578063095ea7b3146102ed5780631694505e1461031d57806318160ddd1461033d57806323b872dd1461036357806327334a081461038357600080fd5b806286803414610228578062b8cf2a1461026557806305f82a451461028757806306fdde03146102a757600080fd5b3661022357005b600080fd5b34801561023457600080fd5b50601554610248906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027157600080fd5b506102856102803660046125d4565b61073d565b005b34801561029357600080fd5b506102856102a23660046124c1565b6107dc565b3480156102b357600080fd5b50604080518082019091526014815273109bdc9959105c19565858da1d10d85c1a5d185b60621b60208201525b60405161025c919061271e565b3480156102f957600080fd5b5061030d6103083660046125a8565b61099f565b604051901515815260200161025c565b34801561032957600080fd5b50601654610248906001600160a01b031681565b34801561034957600080fd5b50683635c9adc5dea000005b60405190815260200161025c565b34801561036f57600080fd5b5061030d61037e366004612534565b6109b6565b34801561038f57600080fd5b5061028561039e3660046124c1565b610a1f565b3480156103af57600080fd5b50610355601a5481565b3480156103c557600080fd5b506040516009815260200161025c565b3480156103e157600080fd5b506102856103f03660046124c1565b610c0d565b34801561040157600080fd5b50601754610248906001600160a01b031681565b34801561042157600080fd5b50610285610c92565b34801561043657600080fd5b5061030d6104453660046124c1565b60066020526000908152604090205460ff1681565b34801561046657600080fd5b50610285610475366004612575565b610ccb565b34801561048657600080fd5b5061030d610495366004612611565b610d20565b3480156104a657600080fd5b506102856104b53660046124c1565b611088565b3480156104c657600080fd5b506103556104d53660046124c1565b6110d3565b3480156104e657600080fd5b5061035560185481565b3480156104fc57600080fd5b50601454610248906001600160a01b031681565b34801561051c57600080fd5b506000546001600160a01b0316610248565b34801561053a57600080fd5b5061035560195481565b34801561055057600080fd5b506040805180820190915260048152634241594360e01b60208201526102e0565b34801561057d57600080fd5b5061028561058c3660046126d3565b6110f5565b34801561059d57600080fd5b506102856105ac3660046126ec565b611124565b3480156105bd57600080fd5b5061030d6105cc3660046125a8565b611222565b3480156105dd57600080fd5b5060175461030d90600160b01b900460ff1681565b3480156105fe57600080fd5b5061030d61060d3660046124c1565b600b6020526000908152604090205460ff1681565b34801561062e57600080fd5b5061028561063d3660046124c1565b61122f565b34801561064e57600080fd5b5061035561065d3660046124fb565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561069457600080fd5b506102856106a33660046124c1565b611321565b3480156106b457600080fd5b506102856106c33660046126d3565b611413565b3480156106d457600080fd5b506102856106e33660046124c1565b611442565b3480156106f457600080fd5b506102856107033660046126d3565b6114bd565b34801561071457600080fd5b506102856107233660046124c1565b6114ec565b34801561073457600080fd5b506102856115d6565b6000546001600160a01b031633146107705760405162461bcd60e51b815260040161076790612773565b60405180910390fd5b60005b81518110156107d8576001600b600084848151811061079457610794612925565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107d0816128de565b915050610773565b5050565b6000546001600160a01b031633146108065760405162461bcd60e51b815260040161076790612773565b6001600160a01b03811660009081526007602052604090205460ff1661087e5760405162461bcd60e51b815260206004820152602760248201527f4163636f756e74206973206e6f74206578636c756465642066726f6d207265666044820152663632b1ba34b7b760c91b6064820152608401610767565b60005b6008548110156107d857816001600160a01b0316600882815481106108a8576108a8612925565b6000918252602090912001546001600160a01b0316141561098d57600880546108d3906001906128c7565b815481106108e3576108e3612925565b600091825260209091200154600880546001600160a01b03909216918390811061090f5761090f612925565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600382526040808220829055600790925220805460ff1916905560088054806109675761096761290f565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b80610997816128de565b915050610881565b60006109ac33848461161e565b5060015b92915050565b60006109c3848484611742565b610a158433610a1085604051806060016040528060288152602001612967602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611c83565b61161e565b5060019392505050565b6000546001600160a01b03163314610a495760405162461bcd60e51b815260040161076790612773565b6001600160a01b03811660009081526007602052604090205460ff1615610ab25760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c7564656400000000006044820152606401610767565b600854603290610ac390600161286e565b1115610b4d5760405162461bcd60e51b815260206004820152604d60248201527f43616e6e6f74206578636c756465206d6f7265207468616e203530206163636f60448201527f756e74732e2020496e636c75646520612070726576696f75736c79206578636c60648201526c3ab232b21030b2323932b9b99760991b608482015260a401610767565b6001600160a01b03811660009081526002602052604090205415610ba7576001600160a01b038116600090815260026020526040902054610b8d90611cbd565b6001600160a01b0382166000908152600360205260409020555b6001600160a01b03166000818152600760205260408120805460ff191660019081179091556008805491820181559091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319169091179055565b6000546001600160a01b03163314610c375760405162461bcd60e51b815260040161076790612773565b6001600160a01b038116600081815260056020908152604091829020805460ff1916600117905590519182527f58c3e0504c69d3a92726966f152a771e0f8f6ad4daca1ae9055a38aba1fd2b6291015b60405180910390a150565b6014546001600160a01b0316336001600160a01b031614610cb257600080fd5b6000610cbd306110d3565b9050610cc881611d41565b50565b6000546001600160a01b03163314610cf55760405162461bcd60e51b815260040161076790612773565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b600080546001600160a01b03163314610d4b5760405162461bcd60e51b815260040161076790612773565b601754600160b01b900460ff1615610db95760405162461bcd60e51b815260206004820152602b60248201527f54726164696e6720697320616c7265616479206163746976652c2063616e6e6f60448201526a3a103932b630bab731b41760a91b6064820152608401610767565b60c8835110610e295760405162461bcd60e51b815260206004820152603660248201527f43616e206f6e6c792061697264726f70203230302077616c6c657473207065726044820152752074786e2064756520746f20676173206c696d69747360501b6064820152608401610767565b60005b8351811015610e91576000848281518110610e4957610e49612925565b602002602001015190506000848381518110610e6757610e67612925565b60200260200101519050610e7c338383611742565b50508080610e89906128de565b915050610e2c565b50610e9a611eca565b7310ed43c718714eb63d5aa57b78b54704e256024e610eba816001610ccb565b601680546001600160a01b0319166001600160a01b038316908117909155610eed903090683635c9adc5dea0000061161e565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2657600080fd5b505afa158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e91906124de565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa657600080fd5b505afa158015610fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fde91906124de565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561102657600080fd5b505af115801561103a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105e91906124de565b601780546001600160a01b0319166001600160a01b03929092169182179055610a15906001610ccb565b6000546001600160a01b031633146110b25760405162461bcd60e51b815260040161076790612773565b6001600160a01b03166000908152600b60205260409020805460ff19169055565b6001600160a01b0381166000908152600260205260408120546109b090611cbd565b6000546001600160a01b0316331461111f5760405162461bcd60e51b815260040161076790612773565b601a55565b6000546001600160a01b0316331461114e5760405162461bcd60e51b815260040161076790612773565b600c849055600d829055600e839055600f819055601961116e838661286e565b11156111bc5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206275792074617865732062656c6f77203235250000006044820152606401610767565b6019600f54600e546111ce919061286e565b111561121c5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206275792074617865732062656c6f77203235250000006044820152606401610767565b50505050565b60006109ac338484611742565b6000546001600160a01b031633146112595760405162461bcd60e51b815260040161076790612773565b6014546001600160a01b03166112b15760405162461bcd60e51b815260206004820152601860248201527f5f62617963416464726573732063616e6e6f74206265203000000000000000006044820152606401610767565b6001600160a01b039081166000908152600560209081526040808320805460ff199081169091556014805486168086529483902080549092166001179091555490519316835290917fb849b89e331d8b56f8968476d98655a9bebf9590acf39261bbce631b9b2ad6079101610c87565b6000546001600160a01b0316331461134b5760405162461bcd60e51b815260040161076790612773565b6015546001600160a01b03166113a35760405162461bcd60e51b815260206004820152601860248201527f5f6d6b7467416464726573732063616e6e6f74206265203000000000000000006044820152606401610767565b6001600160a01b039081166000908152600560209081526040808320805460ff199081169091556015805486168086529483902080549092166001179091555490519316835290917f4aeacdf11926d26257f8e9ea6e9091947978ac978705e15835bf04f21f4fa69b9101610c87565b6000546001600160a01b0316331461143d5760405162461bcd60e51b815260040161076790612773565b601955565b6000546001600160a01b0316331461146c5760405162461bcd60e51b815260040161076790612773565b6001600160a01b038116600081815260056020908152604091829020805460ff1916905590519182527f4f6a6b6efe34ec6478021aa9fb7f6980e78ea3a10c74074a8ce49d5d3ebf1f7e9101610c87565b6000546001600160a01b031633146114e75760405162461bcd60e51b815260040161076790612773565b601855565b6000546001600160a01b031633146115165760405162461bcd60e51b815260040161076790612773565b6001600160a01b03811661157b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610767565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6014546001600160a01b0316336001600160a01b0316148061160b57506015546001600160a01b0316336001600160a01b0316145b61161457600080fd5b47610cc881611f09565b6001600160a01b0383166116805760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610767565b6001600160a01b0382166116e15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610767565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166117a65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610767565b6001600160a01b0382166118085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610767565b6000811161186a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610767565b6000546001600160a01b0384811691161480159061189657506000546001600160a01b03838116911614155b15611aeb57601754600160b01b900460ff16611a5e576017546001600160a01b038381169116148015906118d857506016546001600160a01b03838116911614155b80156118fd57506001600160a01b03821660009081526005602052604090205460ff16155b15611a5e576019548161190f846110d3565b611919919061286e565b106119725760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610767565b6018548111156119c45760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610767565b6001600160a01b0383166000908152600b602052604090205460ff16158015611a0657506001600160a01b0382166000908152600b602052604090205460ff16155b611a5e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610767565b6000611a69306110d3565b601a54601854919250821015908210611a825760185491505b808015611a995750601754600160a01b900460ff16155b8015611ab357506017546001600160a01b03868116911614155b8015611ac85750601754600160a81b900460ff165b15611ae857611ad682611d41565b478015611ae657611ae647611f09565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff1680611b2d57506001600160a01b03831660009081526005602052604090205460ff165b80611b5f57506017546001600160a01b03858116911614801590611b5f57506017546001600160a01b03848116911614155b15611b6c57506000611c77565b6017546001600160a01b038581169116148015611b9757506016546001600160a01b03848116911614155b15611ba957600c54601055600d546011555b6001600160a01b03841660009081526005602052604090205460ff16611c3a57601854821115611c3a5760405162461bcd60e51b815260206004820152603660248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152751036b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760511b6064820152608401610767565b6017546001600160a01b038481169116148015611c6557506016546001600160a01b03858116911614155b15611c7757600e54601055600f546011555b61121c84848484611f8e565b60008184841115611ca75760405162461bcd60e51b8152600401610767919061271e565b506000611cb484866128c7565b95945050505050565b6000600954821115611d245760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610767565b6000611d2e611fbc565b9050611d3a8382611fdf565b9392505050565b6017805460ff60a01b1916600160a01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110611d8957611d89612925565b6001600160a01b03928316602091820292909201810191909152601654604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015611ddd57600080fd5b505afa158015611df1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e1591906124de565b81600181518110611e2857611e28612925565b6001600160a01b039283166020918202929092010152601654611e4e913091168461161e565b60165460405163791ac94760e01b81526001600160a01b039091169063791ac94790611e879085906000908690309042906004016127a8565b600060405180830381600087803b158015611ea157600080fd5b505af1158015611eb5573d6000803e3d6000fd5b50506017805460ff60a01b1916905550505050565b6000546001600160a01b03163314611ef45760405162461bcd60e51b815260040161076790612773565b6017805460ff60b01b1916600160b01b179055565b6014546001600160a01b03166108fc611f23836002611fdf565b6040518115909202916000818181858888f19350505050158015611f4b573d6000803e3d6000fd5b506015546001600160a01b03166108fc611f66836002611fdf565b6040518115909202916000818181858888f193505050501580156107d8573d6000803e3d6000fd5b80611f9b57611f9b612021565b611fa684848461204f565b8061121c5761121c601254601055601354601155565b6000806000611fc9612146565b9092509050611fd88282611fdf565b9250505090565b6000611d3a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612188565b6010541580156120315750601154155b1561203857565b601080546012556011805460135560009182905555565b600080600080600080612061876121b6565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506120939087612213565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546120c29086612255565b6001600160a01b0389166000908152600260205260409020556120e4816122b4565b6120ee84836122fe565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161213391815260200190565b60405180910390a3505050505050505050565b6009546000908190683635c9adc5dea000006121628282611fdf565b82101561217f57505060095492683635c9adc5dea0000092509050565b90939092509050565b600081836121a95760405162461bcd60e51b8152600401610767919061271e565b506000611cb48486612886565b60008060008060008060008060006121d38a601054601154612322565b92509250925060006121e3611fbc565b905060008060006121f68e878787612377565b919e509c509a509598509396509194505050505091939550919395565b6000611d3a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c83565b600080612262838561286e565b905083811015611d3a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610767565b60006122be611fbc565b905060006122cc83836123c7565b306000908152600260205260409020549091506122e99082612255565b30600090815260026020526040902055505050565b60095461230b9083612213565b600955600a5461231b9082612255565b600a555050565b600080808061233c606461233689896123c7565b90611fdf565b9050600061234f60646123368a896123c7565b90506000612367826123618b86612213565b90612213565b9992985090965090945050505050565b600080808061238688866123c7565b9050600061239488876123c7565b905060006123a288886123c7565b905060006123b4826123618686612213565b939b939a50919850919650505050505050565b6000826123d6575060006109b0565b60006123e283856128a8565b9050826123ef8583612886565b14611d3a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610767565b600082601f83011261245757600080fd5b8135602061246c6124678361284a565b612819565b80838252828201915082860187848660051b890101111561248c57600080fd5b60005b858110156124b45781356124a281612951565b8452928401929084019060010161248f565b5090979650505050505050565b6000602082840312156124d357600080fd5b8135611d3a81612951565b6000602082840312156124f057600080fd5b8151611d3a81612951565b6000806040838503121561250e57600080fd5b823561251981612951565b9150602083013561252981612951565b809150509250929050565b60008060006060848603121561254957600080fd5b833561255481612951565b9250602084013561256481612951565b929592945050506040919091013590565b6000806040838503121561258857600080fd5b823561259381612951565b91506020830135801515811461252957600080fd5b600080604083850312156125bb57600080fd5b82356125c681612951565b946020939093013593505050565b6000602082840312156125e657600080fd5b813567ffffffffffffffff8111156125fd57600080fd5b61260984828501612446565b949350505050565b6000806040838503121561262457600080fd5b823567ffffffffffffffff8082111561263c57600080fd5b61264886838701612446565b935060209150818501358181111561265f57600080fd5b85019050601f8101861361267257600080fd5b80356126806124678261284a565b80828252848201915084840189868560051b87010111156126a057600080fd5b600094505b838510156126c35780358352600194909401939185019185016126a5565b5080955050505050509250929050565b6000602082840312156126e557600080fd5b5035919050565b6000806000806080858703121561270257600080fd5b5050823594602084013594506040840135936060013592509050565b600060208083528351808285015260005b8181101561274b5785810183015185820160400152820161272f565b8181111561275d576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156127f85784516001600160a01b0316835293830193918301916001016127d3565b50506001600160a01b03969096166060850152505050608001529392505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156128425761284261293b565b604052919050565b600067ffffffffffffffff8211156128645761286461293b565b5060051b60200190565b60008219821115612881576128816128f9565b500190565b6000826128a357634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156128c2576128c26128f9565b500290565b6000828210156128d9576128d96128f9565b500390565b60006000198214156128f2576128f26128f9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610cc857600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122093acbd957f8630a1f91886128b1180f07e928657c73a57b3afb86a89f7e215ad64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,765
0x33775796742e43114475ba18cc0170088ba8c4a0
/** *Submitted for verification at Etherscan.io on 2021-04-08 */ pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT // ---------------------------------------------------------------------------- // // Symbol : CBDC // Name : Digital Yuan // Total supply : 400000000 // Decimals : 18 // Owner Account : 0x7BA787eD80506b5d8D05A6be68Ef1B5481DeCBf9 // // ---------------------------------------------------------------------------- interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract DigitalYuan is Context, IERC20, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; address private owner1=0x7BA787eD80506b5d8D05A6be68Ef1B5481DeCBf9; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor () { _name = 'Digital Yuan'; _symbol = 'CBDC'; _totalSupply= 400000000 *(10**decimals()); //transfer total supply to owner _balances[owner1]=_totalSupply; emit Transfer(address(0),owner1, _balances[owner1]); } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190611015565b60405180910390f35b6100e660048036038101906100e19190610c8e565b610308565b6040516100f39190610ffa565b60405180910390f35b610104610326565b6040516101119190611117565b60405180910390f35b610134600480360381019061012f9190610c3f565b610330565b6040516101419190610ffa565b60405180910390f35b610152610431565b60405161015f9190611132565b60405180910390f35b610182600480360381019061017d9190610c8e565b61043a565b60405161018f9190610ffa565b60405180910390f35b6101b260048036038101906101ad9190610bda565b6104e6565b6040516101bf9190611117565b60405180910390f35b6101d061052e565b6040516101dd9190611015565b60405180910390f35b61020060048036038101906101fb9190610c8e565b6105c0565b60405161020d9190610ffa565b60405180910390f35b610230600480360381019061022b9190610c8e565b6106b4565b60405161023d9190610ffa565b60405180910390f35b610260600480360381019061025b9190610c03565b6106d2565b60405161026d9190611117565b60405180910390f35b6060600380546102859061127b565b80601f01602080910402602001604051908101604052809291908181526020018280546102b19061127b565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b600061031c610315610759565b8484610761565b6001905092915050565b6000600254905090565b600061033d84848461092c565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610388610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610408576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ff90611097565b60405180910390fd5b61042585610414610759565b858461042091906111bf565b610761565b60019150509392505050565b60006012905090565b60006104dc610447610759565b848460016000610455610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104d79190611169565b610761565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60606004805461053d9061127b565b80601f01602080910402602001604051908101604052809291908181526020018280546105699061127b565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b5050505050905090565b600080600160006105cf610759565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561068c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610683906110f7565b60405180910390fd5b6106a9610697610759565b8585846106a491906111bf565b610761565b600191505092915050565b60006106c86106c1610759565b848461092c565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c8906110d7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610841576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083890611057565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161091f9190611117565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561099c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610993906110b7565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0390611037565b60405180910390fd5b610a17838383610bab565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9490611077565b60405180910390fd5b8181610aa991906111bf565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b399190611169565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610b9d9190611117565b60405180910390a350505050565b505050565b600081359050610bbf8161131c565b92915050565b600081359050610bd481611333565b92915050565b600060208284031215610bec57600080fd5b6000610bfa84828501610bb0565b91505092915050565b60008060408385031215610c1657600080fd5b6000610c2485828601610bb0565b9250506020610c3585828601610bb0565b9150509250929050565b600080600060608486031215610c5457600080fd5b6000610c6286828701610bb0565b9350506020610c7386828701610bb0565b9250506040610c8486828701610bc5565b9150509250925092565b60008060408385031215610ca157600080fd5b6000610caf85828601610bb0565b9250506020610cc085828601610bc5565b9150509250929050565b610cd381611205565b82525050565b6000610ce48261114d565b610cee8185611158565b9350610cfe818560208601611248565b610d078161130b565b840191505092915050565b6000610d1f602383611158565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610d85602283611158565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610deb602683611158565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206260008301527f616c616e636500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610e51602883611158565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206160008301527f6c6c6f77616e63650000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610eb7602583611158565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610f1d602483611158565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610f83602583611158565b91507f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008301527f207a65726f0000000000000000000000000000000000000000000000000000006020830152604082019050919050565b610fe581611231565b82525050565b610ff48161123b565b82525050565b600060208201905061100f6000830184610cca565b92915050565b6000602082019050818103600083015261102f8184610cd9565b905092915050565b6000602082019050818103600083015261105081610d12565b9050919050565b6000602082019050818103600083015261107081610d78565b9050919050565b6000602082019050818103600083015261109081610dde565b9050919050565b600060208201905081810360008301526110b081610e44565b9050919050565b600060208201905081810360008301526110d081610eaa565b9050919050565b600060208201905081810360008301526110f081610f10565b9050919050565b6000602082019050818103600083015261111081610f76565b9050919050565b600060208201905061112c6000830184610fdc565b92915050565b60006020820190506111476000830184610feb565b92915050565b600081519050919050565b600082825260208201905092915050565b600061117482611231565b915061117f83611231565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156111b4576111b36112ad565b5b828201905092915050565b60006111ca82611231565b91506111d583611231565b9250828210156111e8576111e76112ad565b5b828203905092915050565b60006111fe82611211565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561126657808201518184015260208101905061124b565b83811115611275576000848401525b50505050565b6000600282049050600182168061129357607f821691505b602082108114156112a7576112a66112dc565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b611325816111f3565b811461133057600080fd5b50565b61133c81611231565b811461134757600080fd5b5056fea26469706673582212206225cc8b330164198934011f5948632552a4ccbc8fc952e784a89b9dfd7a0e4d64736f6c63430008000033
{"success": true, "error": null, "results": {}}
9,766
0xaefd3108176551c5781c54fcebfeb40c4e293194
// TG: @MEANSIMPSON // Web: MEANSIMPSON.COM // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract MEANSIMPSON is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _MAX = ~uint256(0); uint256 private constant _tTotal = 19890000 * 10**8; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "MEANSIMPSON"; string private constant _symbol = "MEANSIMPSON"; uint private constant _decimals = 8; uint256 private _teamFee = 15; uint256 private _previousteamFee = _teamFee; address payable private _feeAddress; // Uniswap Pair IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "Your address has been marked as a bot, please contact staff to appeal your case."); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.div(50)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 burnCount = contractTokenBalance.div(15); contractTokenBalance -= burnCount; _burnToken(burnCount); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 burnCount) private lockTheSwap(){ _transfer(address(this), address(0xdead), burnCount); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function initNewPair(address payable feeAddress) external onlyOwner() { require(!_initialized,"Contract has already been initialized"); IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _uniswapV2Router = uniswapV2Router; _feeAddress = feeAddress; _isExcludedFromFee[_feeAddress] = true; _initialized = true; } function startTrading() external onlyOwner() { require(_initialized, "Contract must be initialized first"); _tradingOpen = true; _launchTime = block.timestamp; _initialLimitDuration = _launchTime + (30 minutes); } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee < 15,"don't be greedy "); _teamFee = fee; } function setBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function withdrawFees() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x60806040526004361061014f5760003560e01c806370a08231116100b6578063a9059cbb1161006f578063a9059cbb146103b6578063b515566a146103d6578063cf0848f7146103f6578063dd62ed3e14610416578063e6ec64ec1461045c578063f2fde38b1461047c57600080fd5b806370a0823114610319578063715018a6146103395780637c938bb41461034e5780638da5cb5b1461036e57806390d49b9d1461039657806395d89b411461017257600080fd5b8063313ce56711610108578063313ce5671461023e57806331c2d847146102525780633bbac57914610272578063437823ec146102ab578063476343ee146102cb5780635342acb4146102e057600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b557806318160ddd146101e557806323b872dd14610209578063293230b81461022957600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017061049c565b005b34801561017e57600080fd5b50604080518082018252600b81526a26a2a0a729a4a6a829a7a760a91b602082015290516101ac9190611904565b60405180910390f35b3480156101c157600080fd5b506101d56101d036600461197e565b6104e8565b60405190151581526020016101ac565b3480156101f157600080fd5b50660710fc267550005b6040519081526020016101ac565b34801561021557600080fd5b506101d56102243660046119aa565b6104ff565b34801561023557600080fd5b50610170610568565b34801561024a57600080fd5b5060086101fb565b34801561025e57600080fd5b5061017061026d366004611a01565b610620565b34801561027e57600080fd5b506101d561028d366004611ac6565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102b757600080fd5b506101706102c6366004611ac6565b6106b6565b3480156102d757600080fd5b50610170610704565b3480156102ec57600080fd5b506101d56102fb366004611ac6565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561032557600080fd5b506101fb610334366004611ac6565b61073e565b34801561034557600080fd5b50610170610760565b34801561035a57600080fd5b50610170610369366004611ac6565b610796565b34801561037a57600080fd5b506000546040516001600160a01b0390911681526020016101ac565b3480156103a257600080fd5b506101706103b1366004611ac6565b6109f1565b3480156103c257600080fd5b506101d56103d136600461197e565b610a6b565b3480156103e257600080fd5b506101706103f1366004611a01565b610a78565b34801561040257600080fd5b50610170610411366004611ac6565b610b91565b34801561042257600080fd5b506101fb610431366004611ae3565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561046857600080fd5b50610170610477366004611b1c565b610bdc565b34801561048857600080fd5b50610170610497366004611ac6565b610c4e565b6000546001600160a01b031633146104cf5760405162461bcd60e51b81526004016104c690611b35565b60405180910390fd5b60006104da3061073e565b90506104e581610ce6565b50565b60006104f5338484610e60565b5060015b92915050565b600061050c848484610f84565b61055e843361055985604051806060016040528060288152602001611cb0602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113bf565b610e60565b5060019392505050565b6000546001600160a01b031633146105925760405162461bcd60e51b81526004016104c690611b35565b600c54600160a01b900460ff166105f65760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104c6565b600c805460ff60b81b1916600160b81b17905542600d81905561061b90610708611b80565b600e55565b6000546001600160a01b0316331461064a5760405162461bcd60e51b81526004016104c690611b35565b60005b81518110156106b25760006005600084848151811061066e5761066e611b98565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106aa81611bae565b91505061064d565b5050565b6000546001600160a01b031633146106e05760405162461bcd60e51b81526004016104c690611b35565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156106b2573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546104f9906113f9565b6000546001600160a01b0316331461078a5760405162461bcd60e51b81526004016104c690611b35565b610794600061147d565b565b6000546001600160a01b031633146107c05760405162461bcd60e51b81526004016104c690611b35565b600c54600160a01b900460ff16156108285760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104c6565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190611bc9565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109149190611bc9565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610961573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109859190611bc9565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610a1b5760405162461bcd60e51b81526004016104c690611b35565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006104f5338484610f84565b6000546001600160a01b03163314610aa25760405162461bcd60e51b81526004016104c690611b35565b60005b81518110156106b257600c5482516001600160a01b0390911690839083908110610ad157610ad1611b98565b60200260200101516001600160a01b031614158015610b225750600b5482516001600160a01b0390911690839083908110610b0e57610b0e611b98565b60200260200101516001600160a01b031614155b15610b7f57600160056000848481518110610b3f57610b3f611b98565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610b8981611bae565b915050610aa5565b6000546001600160a01b03163314610bbb5760405162461bcd60e51b81526004016104c690611b35565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b03163314610c065760405162461bcd60e51b81526004016104c690611b35565b600f8110610c495760405162461bcd60e51b815260206004820152601060248201526f03237b713ba1031329033b932b2b23c960851b60448201526064016104c6565b600855565b6000546001600160a01b03163314610c785760405162461bcd60e51b81526004016104c690611b35565b6001600160a01b038116610cdd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c6565b6104e58161147d565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d2e57610d2e611b98565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dab9190611bc9565b81600181518110610dbe57610dbe611b98565b6001600160a01b039283166020918202929092010152600b54610de49130911684610e60565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e1d908590600090869030904290600401611be6565b600060405180830381600087803b158015610e3757600080fd5b505af1158015610e4b573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610ec25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c6565b6001600160a01b038216610f235760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c6565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610fe85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c6565b6001600160a01b03821661104a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c6565b600081116110ac5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c6565b6001600160a01b03831660009081526005602052604090205460ff16156111545760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104c6565b6001600160a01b03831660009081526004602052604081205460ff1615801561119657506001600160a01b03831660009081526004602052604090205460ff16155b80156111ac5750600c54600160a81b900460ff16155b80156111dc5750600c546001600160a01b03858116911614806111dc5750600c546001600160a01b038481169116145b156113ad57600c54600160b81b900460ff1661123a5760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104c6565b50600c546001906001600160a01b0385811691161480156112695750600b546001600160a01b03848116911614155b8015611276575042600e54115b156112b15760006112868461073e565b905061129a660710fc2675500060326114cd565b6112a4848361150f565b11156112af57600080fd5b505b600d544214156112df576001600160a01b0383166000908152600560205260409020805460ff191660011790555b60006112ea3061073e565b600c54909150600160b01b900460ff161580156113155750600c546001600160a01b03868116911614155b156113ab5780156113ab57600c5461134f9060649061134990600f90611343906001600160a01b031661073e565b9061156e565b906114cd565b81111561137c57600c546113799060649061134990600f90611343906001600160a01b031661073e565b90505b600061138982600f6114cd565b90506113958183611c57565b91506113a0816115ed565b6113a982610ce6565b505b505b6113b98484848461161d565b50505050565b600081848411156113e35760405162461bcd60e51b81526004016104c69190611904565b5060006113f08486611c57565b95945050505050565b60006006548211156114605760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104c6565b600061146a611720565b905061147683826114cd565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061147683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611743565b60008061151c8385611b80565b9050838110156114765760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c6565b60008261157d575060006104f9565b60006115898385611c6e565b9050826115968583611c8d565b146114765760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c6565b600c805460ff60b01b1916600160b01b17905561160d3061dead83610f84565b50600c805460ff60b01b19169055565b808061162b5761162b611771565b60008060008061163a8761178d565b6001600160a01b038d166000908152600160205260409020549397509195509350915061166790856117d4565b6001600160a01b03808b1660009081526001602052604080822093909355908a1681522054611696908461150f565b6001600160a01b0389166000908152600160205260409020556116b881611816565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116fd91815260200190565b60405180910390a3505050508061171957611719600954600855565b5050505050565b600080600061172d611860565b909250905061173c82826114cd565b9250505090565b600081836117645760405162461bcd60e51b81526004016104c69190611904565b5060006113f08486611c8d565b60006008541161178057600080fd5b6008805460095560009055565b6000806000806000806117a28760085461189e565b9150915060006117b0611720565b90506000806117c08a85856118cb565b909b909a5094985092965092945050505050565b600061147683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113bf565b6000611820611720565b9050600061182e838361156e565b3060009081526001602052604090205490915061184b908261150f565b30600090815260016020526040902055505050565b6006546000908190660710fc2675500061187a82826114cd565b82101561189557505060065492660710fc2675500092509050565b90939092509050565b600080806118b16064611349878761156e565b905060006118bf86836117d4565b96919550909350505050565b600080806118d9868561156e565b905060006118e7868661156e565b905060006118f583836117d4565b92989297509195505050505050565b600060208083528351808285015260005b8181101561193157858101830151858201604001528201611915565b81811115611943576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104e557600080fd5b803561197981611959565b919050565b6000806040838503121561199157600080fd5b823561199c81611959565b946020939093013593505050565b6000806000606084860312156119bf57600080fd5b83356119ca81611959565b925060208401356119da81611959565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a1457600080fd5b823567ffffffffffffffff80821115611a2c57600080fd5b818501915085601f830112611a4057600080fd5b813581811115611a5257611a526119eb565b8060051b604051601f19603f83011681018181108582111715611a7757611a776119eb565b604052918252848201925083810185019188831115611a9557600080fd5b938501935b82851015611aba57611aab8561196e565b84529385019392850192611a9a565b98975050505050505050565b600060208284031215611ad857600080fd5b813561147681611959565b60008060408385031215611af657600080fd5b8235611b0181611959565b91506020830135611b1181611959565b809150509250929050565b600060208284031215611b2e57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b9357611b93611b6a565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611bc257611bc2611b6a565b5060010190565b600060208284031215611bdb57600080fd5b815161147681611959565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c365784516001600160a01b031683529383019391830191600101611c11565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611c6957611c69611b6a565b500390565b6000816000190483118215151615611c8857611c88611b6a565b500290565b600082611caa57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202f635615b34dd92b9859a15ad74c227bf5f5f57f0209dbaf767622708c560eca64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,767
0x3da6d8f14dfcd576c46f9994d8fd94883a8f3fe8
pragma solidity ^0.4.24; /** * https://Smart-Pyramid.io * * Smart-Pyramid Contract * - GAIN 1.23% PER 24 HOURS (every 5900 blocks) * - Minimal contribution 0.01 eth * - Currency and payment - ETH * - Contribution allocation schemes: * -- 84% payments * -- 16% Marketing + Operating Expenses * * * You get MORE PROFIT if you withdraw later ! * Increase of the total rate of return by 0.01% every day before the payment. * The increase in profitability affects all previous days! * After the dividend is paid, the rate of return is returned to 1.23 % per day * * For example: if the Deposit is 10 ETH * * days | % | profit * -------------------------------------- * 1 (>24 hours) | 1.24 % | 0.124 ETH * 10 | 1.33 % | 1.330 ETH * 30 | 1.53 % | 4.590 ETH * 50 | 1.73 % | 8.650 ETH * 100 | 2.23 % | 22.30 ETH * * * How to use: * 1. Send any amount of ether to make an investment * 2a. Claim your profit by sending 0 ether transaction (every day, every week, i don&#39;t care unless you&#39;re spending too much on GAS) * OR * 2b. Send more ether to reinvest AND get your profit at the same time * * RECOMMENDED GAS LIMIT: 200000 * RECOMMENDED GAS PRICE: https://ethgasstation.info/ * * * Investors Contest rules * * Investor contest lasts a whole week * The results of the competition are confirmed every MON not earlier than 13:00 MSK (10:00 UTC) * According to the results, will be determined 3 winners, who during the week invested the maximum amounts * in one payment. * If two investors invest the same amount - the highest place in the competition is occupied by the one whose operation * was before * * Prizes: * 1st place: 2 ETH * 2nd place: 1 ETH * 3rd place: 0.5 ETH * * On the offensive (10:00 UTC) on Monday, it is necessary to initiate the summing up of the competition. * Until the results are announced - the competition is still on. * To sum up the results, you need to call the PayDay function * * * Contract reviewed and approved by experts! * */ library SafeMath { function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { if (_a == 0) { return 0; } uint256 c = _a * _b; require(c / _a == _b); return c; } function div(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b > 0); uint256 c = _a / _b; return c; } function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { require(_b <= _a); uint256 c = _a - _b; return c; } function add(uint256 _a, uint256 _b) internal pure returns (uint256) { uint256 c = _a + _b; require(c >= _a); return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } contract InvestorsStorage { address private owner; mapping (address => Investor) private investors; struct Investor { uint deposit; uint checkpoint; address referrer; } constructor() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function updateInfo(address _address, uint _value) external onlyOwner { investors[_address].deposit += _value; investors[_address].checkpoint = block.timestamp; } function updateCheckpoint(address _address) external onlyOwner { investors[_address].checkpoint = block.timestamp; } function addReferrer(address _referral, address _referrer) external onlyOwner { investors[_referral].referrer = _referrer; } function getInterest(address _address) external view returns(uint) { if (investors[_address].deposit > 0) { return(123 + ((block.timestamp - investors[_address].checkpoint) / 1 days)); } } function d(address _address) external view returns(uint) { return investors[_address].deposit; } function c(address _address) external view returns(uint) { return investors[_address].checkpoint; } function r(address _address) external view returns(address) { return investors[_address].referrer; } } contract SmartPyramid { using SafeMath for uint; address admin; uint waveStartUp; uint nextPayDay; mapping (uint => Leader) top; event LogInvestment(address indexed _addr, uint _value); event LogIncome(address indexed _addr, uint _value, string indexed _type); event LogReferralInvestment(address indexed _referrer, address indexed _referral, uint _value); event LogGift(address _firstAddr, uint _firstDep, address _secondAddr, uint _secondDep, address _thirdAddr, uint _thirdDep); event LogNewWave(uint _waveStartUp); InvestorsStorage private x; modifier notOnPause() { require(waveStartUp <= block.timestamp); _; } struct Leader { address addr; uint deposit; } function bytesToAddress(bytes _source) internal pure returns(address parsedReferrer) { assembly { parsedReferrer := mload(add(_source,0x14)) } return parsedReferrer; } function addReferrer(uint _value) internal { address _referrer = bytesToAddress(bytes(msg.data)); if (_referrer != msg.sender) { x.addReferrer(msg.sender, _referrer); x.r(msg.sender).transfer(_value / 20); emit LogReferralInvestment(_referrer, msg.sender, _value); emit LogIncome(_referrer, _value / 20, "referral"); } } constructor(address _admin) public { admin = _admin; x = new InvestorsStorage(); } function getInfo(address _address) external view returns(uint deposit, uint amountToWithdraw) { deposit = x.d(_address); if (block.timestamp >= x.c(_address) + 10 minutes) { amountToWithdraw = (x.d(_address).mul(x.getInterest(_address)).div(10000)).mul(block.timestamp.sub(x.c(_address))).div(1 days); } else { amountToWithdraw = 0; } } function getTop() external view returns(address, uint, address, uint, address, uint) { return(top[1].addr, top[1].deposit, top[2].addr, top[2].deposit, top[3].addr, top[3].deposit); } function() external payable { if (msg.value == 0) { withdraw(); } else { invest(); } } function invest() notOnPause public payable { admin.transfer(msg.value * 4 / 25); if (x.d(msg.sender) > 0) { withdraw(); } x.updateInfo(msg.sender, msg.value); if (msg.value > top[3].deposit) { toTheTop(); } if (x.r(msg.sender) != 0x0) { x.r(msg.sender).transfer(msg.value / 20); emit LogReferralInvestment(x.r(msg.sender), msg.sender, msg.value); emit LogIncome(x.r(msg.sender), msg.value / 20, "referral"); } else if (msg.data.length == 20) { addReferrer(msg.value); } emit LogInvestment(msg.sender, msg.value); } function withdraw() notOnPause public { if (block.timestamp >= x.c(msg.sender) + 10 minutes) { uint _payout = (x.d(msg.sender).mul(x.getInterest(msg.sender)).div(10000)).mul(block.timestamp.sub(x.c(msg.sender))).div(1 days); x.updateCheckpoint(msg.sender); } if (_payout > 0) { if (_payout > address(this).balance) { nextWave(); return; } msg.sender.transfer(_payout); emit LogIncome(msg.sender, _payout, "withdrawn"); } } function toTheTop() internal { if (msg.value <= top[2].deposit) { top[3] = Leader(msg.sender, msg.value); } else { if (msg.value <= top[1].deposit) { top[3] = top[2]; top[2] = Leader(msg.sender, msg.value); } else { top[3] = top[2]; top[2] = top[1]; top[1] = Leader(msg.sender, msg.value); } } } function payDay() external { require(block.timestamp >= nextPayDay); nextPayDay = block.timestamp.sub((block.timestamp - 1538388000).mod(7 days)).add(7 days); emit LogGift(top[1].addr, top[1].deposit, top[2].addr, top[2].deposit, top[3].addr, top[3].deposit); for (uint i = 0; i <= 2; i++) { if (top[i+1].addr != 0x0) { top[i+1].addr.transfer(2 ether / 2 ** i); top[i+1] = Leader(0x0, 0); } } } function nextWave() private { for (uint i = 0; i <= 2; i++) { top[i+1] = Leader(0x0, 0); } x = new InvestorsStorage(); waveStartUp = block.timestamp + 7 days; emit LogNewWave(waveStartUp); } }
0x60806040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633ccfd60b1461008e5780635c2b1119146100a5578063789b2e6c14610177578063e8b5e51f1461018e578063ffdd5cf114610198575b60003414156100835761007e6101f6565b61008c565b61008b61082f565b5b005b34801561009a57600080fd5b506100a36101f6565b005b3480156100b157600080fd5b506100ba611076565b604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001965050505050505060405180910390f35b34801561018357600080fd5b5061018c611183565b005b61019661082f565b005b3480156101a457600080fd5b506101d9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611552565b604051808381526020018281526020019250505060405180910390f35b6000426001541115151561020957600080fd5b610258600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166304ee65c0336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156102c957600080fd5b505af11580156102dd573d6000803e3d6000fd5b505050506040513d60208110156102f357600080fd5b8101908080519060200190929190505050014210151561072a5761065262015180610644610421600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166304ee65c0336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156103d757600080fd5b505af11580156103eb573d6000803e3d6000fd5b505050506040513d602081101561040157600080fd5b810190808051906020019092919050505042611aa990919063ffffffff16565b610636612710610628600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637aaa3470336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156104e757600080fd5b505af11580156104fb573d6000803e3d6000fd5b505050506040513d602081101561051157600080fd5b8101908080519060200190929190505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d573a003336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156105df57600080fd5b505af11580156105f3573d6000803e3d6000fd5b505050506040513d602081101561060957600080fd5b8101908080519060200190929190505050611aca90919063ffffffff16565b611b0890919063ffffffff16565b611aca90919063ffffffff16565b611b0890919063ffffffff16565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663702f5e19336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561071157600080fd5b505af1158015610725573d6000803e3d6000fd5b505050505b600081111561082b573073ffffffffffffffffffffffffffffffffffffffff163181111561075f5761075a611b32565b61082c565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156107a5573d6000803e3d6000fd5b5060405180807f77697468647261776e0000000000000000000000000000000000000000000000815250600901905060405180910390203373ffffffffffffffffffffffffffffffffffffffff167f0c57a5d4dcad8ee459870d907ba5bc2db98361a795625c039b057de4e923d197836040518082815260200191505060405180910390a35b5b50565b426001541115151561084057600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc60196004340281151561088a57fe5b049081150290604051600060405180830381858888f193505050501580156108b6573d6000803e3d6000fd5b506000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d573a003336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561097657600080fd5b505af115801561098a573d6000803e3d6000fd5b505050506040513d60208110156109a057600080fd5b810190808051906020019092919050505011156109c0576109bf6101f6565b5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ace9792233346040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610a8557600080fd5b505af1158015610a99573d6000803e3d6000fd5b50505050600360006003815260200190815260200160002060010154341115610ac557610ac4611c93565b5b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663566ab6f9336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610b8457600080fd5b505af1158015610b98573d6000803e3d6000fd5b505050506040513d6020811015610bae57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614151561100e57600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663566ab6f9336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610c9957600080fd5b505af1158015610cad573d6000803e3d6000fd5b505050506040513d6020811015610cc357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166108fc601434811515610cf957fe5b049081150290604051600060405180830381858888f19350505050158015610d25573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663566ab6f9336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b505050506040513d6020811015610e2457600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff167fa249146257bee059355926b54611f49f096a7b1ed415e8011b89838f96e5fc51346040518082815260200191505060405180910390a360405180807f726566657272616c00000000000000000000000000000000000000000000000081525060080190506040518091039020600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663566ab6f9336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610f7557600080fd5b505af1158015610f89573d6000803e3d6000fd5b505050506040513d6020811015610f9f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff167f0c57a5d4dcad8ee459870d907ba5bc2db98361a795625c039b057de4e923d197601434811515610ff357fe5b046040518082815260200191505060405180910390a3611026565b601460003690501415611025576110243461206e565b5b5b3373ffffffffffffffffffffffffffffffffffffffff167fc74590e3281392e897f5c0f45530951cfe0db0e86c76d65af861e80b925871a4346040518082815260200191505060405180910390a2565b600080600080600080600360006001815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006001815260200190815260200160002060010154600360006002815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006002815260200190815260200160002060010154600360006003815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006003815260200190815260200160002060010154955095509550955095509550909192939495565b6000600254421015151561119657600080fd5b6111d962093a806111cb6111bc62093a80635bb1f020420361243090919063ffffffff16565b42611aa990919063ffffffff16565b61245590919063ffffffff16565b6002819055507f6086647a3c64e449d27817e6a917a85257a24416079e5c468001990a58498cb1600360006001815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006001815260200190815260200160002060010154600360006002815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006002815260200190815260200160002060010154600360006003815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360006003815260200190815260200160002060010154604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001965050505050505060405180910390a1600090505b60028111151561154f5760006003600060018401815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611542576003600060018301815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8260020a671bc16d674ec8000081151561147d57fe5b049081150290604051600060405180830381858888f193505050501580156114a9573d6000803e3d6000fd5b506040805190810160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506003600060018401815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050505b80806001019150506113b1565b50565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d573a003846040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561161257600080fd5b505af1158015611626573d6000803e3d6000fd5b505050506040513d602081101561163c57600080fd5b81019080805190602001909291905050509150610258600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166304ee65c0856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561170f57600080fd5b505af1158015611723573d6000803e3d6000fd5b505050506040513d602081101561173957600080fd5b81019080805190602001909291905050500142101515611a9f57611a9862015180611a8a611867600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166304ee65c0886040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561181d57600080fd5b505af1158015611831573d6000803e3d6000fd5b505050506040513d602081101561184757600080fd5b810190808051906020019092919050505042611aa990919063ffffffff16565b611a7c612710611a6e600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637aaa34708b6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561192d57600080fd5b505af1158015611941573d6000803e3d6000fd5b505050506040513d602081101561195757600080fd5b8101908080519060200190929190505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d573a0038c6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611a2557600080fd5b505af1158015611a39573d6000803e3d6000fd5b505050506040513d6020811015611a4f57600080fd5b8101908080519060200190929190505050611aca90919063ffffffff16565b611b0890919063ffffffff16565b611aca90919063ffffffff16565b611b0890919063ffffffff16565b9050611aa4565b600090505b915091565b600080838311151515611abb57600080fd5b82840390508091505092915050565b6000806000841415611adf5760009150611b01565b8284029050828482811515611af057fe5b04141515611afd57600080fd5b8091505b5092915050565b600080600083111515611b1a57600080fd5b8284811515611b2557fe5b0490508091505092915050565b60008090505b600281111515611be6576040805190810160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506003600060018401815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050508080600101915050611b38565b611bee612487565b604051809103906000f080158015611c0a573d6000803e3d6000fd5b50600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062093a8042016001819055507f5988b0a8d3b8ed2d9961af381f4cf0619bd49b20e1e5c8db63322f6d0b7893606001546040518082815260200191505060405180910390a150565b60036000600281526020019081526020016000206001015434111515611d4b5760408051908101604052803373ffffffffffffffffffffffffffffffffffffffff16815260200134815250600360006003815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015590505061206c565b60036000600181526020019081526020016000206001015434111515611e9f57600360006002815260200190815260200160002060036000600381526020019081526020016000206000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001820154816001015590505060408051908101604052803373ffffffffffffffffffffffffffffffffffffffff16815260200134815250600360006002815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015590505061206b565b600360006002815260200190815260200160002060036000600381526020019081526020016000206000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018201548160010155905050600360006001815260200190815260200160002060036000600281526020019081526020016000206000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001820154816001015590505060408051908101604052803373ffffffffffffffffffffffffffffffffffffffff16815260200134815250600360006001815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050505b5b565b60006120ac6000368080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050612476565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561242c57600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b94265b833836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156121d457600080fd5b505af11580156121e8573d6000803e3d6000fd5b50505050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663566ab6f9336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156122a957600080fd5b505af11580156122bd573d6000803e3d6000fd5b505050506040513d60208110156122d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff166108fc60148481151561230957fe5b049081150290604051600060405180830381858888f19350505050158015612335573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fa249146257bee059355926b54611f49f096a7b1ed415e8011b89838f96e5fc51846040518082815260200191505060405180910390a360405180807f726566657272616c000000000000000000000000000000000000000000000000815250600801905060405180910390208173ffffffffffffffffffffffffffffffffffffffff167f0c57a5d4dcad8ee459870d907ba5bc2db98361a795625c039b057de4e923d19760148581151561241557fe5b046040518082815260200191505060405180910390a35b5050565b600080821415151561244157600080fd5b818381151561244c57fe5b06905092915050565b600080828401905083811015151561246c57600080fd5b8091505092915050565b600060148201519050809050919050565b6040516107bd80612498833901905600608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061075d806100606000396000f300608060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806304ee65c014610088578063566ab6f9146100df578063702f5e19146101625780637aaa3470146101a5578063ace97922146101fc578063b94265b814610249578063d573a003146102ac575b600080fd5b34801561009457600080fd5b506100c9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610303565b6040518082815260200191505060405180910390f35b3480156100eb57600080fd5b50610120600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061034f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561016e57600080fd5b506101a3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103bb565b005b3480156101b157600080fd5b506101e6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610460565b6040518082815260200191505060405180910390f35b34801561020857600080fd5b50610247600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061050f565b005b34801561025557600080fd5b506102aa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610605565b005b3480156102b857600080fd5b506102ed600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106e5565b6040518082815260200191505060405180910390f35b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561041657600080fd5b42600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555050565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015411156105095762015180600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442038115156104fe57fe5b04607b01905061050a565b5b919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561056a57600080fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254019250508190555042600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561066057600080fd5b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490509190505600a165627a7a723058200dc8c0a2dc96ed5967d5e4796867fd53f82e2caf803cf709047e845f8fac41780029a165627a7a72305820db5157b82dd102a18e605e663ff80dc274007683818252e1f7def6efabfc95b90029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,768
0x8b6Ab9f79f8b9D89d1d7a269Ae8A780B5C04Ce61
/* ___ _ ___ _ | .\ ___ _ _ <_> ___ | __><_>._ _ ___ ._ _ ___ ___ | _// ._>| '_>| ||___|| _> | || ' |<_> || ' |/ | '/ ._> |_| \___.|_| |_| |_| |_||_|_|<___||_|_|\_|_.\___. * PeriFinance: SystemStatus.sol * * Latest source (may be newer): https://github.com/perifinance/peri-finance/blob/master/contracts/SystemStatus.sol * Docs: Will be added in the future. * https://docs.peri.finance/contracts/source/contracts/SystemStatus * * Contract Dependencies: * - ISystemStatus * - Owned * Libraries: (none) * * MIT License * =========== * * Copyright (c) 2021 PeriFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity 0.5.16; // https://docs.peri.finance/contracts/source/contracts/owned contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // https://docs.peri.finance/contracts/source/interfaces/isystemstatus interface ISystemStatus { struct Status { bool canSuspend; bool canResume; } struct Suspension { bool suspended; // reason is an integer code, // 0 => no reason, 1 => upgrading, 2+ => defined by system usage uint248 reason; } // Views function accessControl(bytes32 section, address account) external view returns (bool canSuspend, bool canResume); function requireSystemActive() external view; function requireIssuanceActive() external view; function requireExchangeActive() external view; function requireExchangeBetweenPynthsAllowed(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view; function requirePynthActive(bytes32 currencyKey) external view; function requirePynthsActive(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view; function systemSuspension() external view returns (bool suspended, uint248 reason); function issuanceSuspension() external view returns (bool suspended, uint248 reason); function exchangeSuspension() external view returns (bool suspended, uint248 reason); function pynthExchangeSuspension(bytes32 currencyKey) external view returns (bool suspended, uint248 reason); function pynthSuspension(bytes32 currencyKey) external view returns (bool suspended, uint248 reason); function getPynthExchangeSuspensions(bytes32[] calldata pynths) external view returns (bool[] memory exchangeSuspensions, uint256[] memory reasons); function getPynthSuspensions(bytes32[] calldata pynths) external view returns (bool[] memory suspensions, uint256[] memory reasons); // Restricted functions function suspendPynth(bytes32 currencyKey, uint256 reason) external; function updateAccessControl( bytes32 section, address account, bool canSuspend, bool canResume ) external; } // Inheritance // https://docs.peri.finance/contracts/source/contracts/systemstatus contract SystemStatus is Owned, ISystemStatus { mapping(bytes32 => mapping(address => Status)) public accessControl; uint248 public constant SUSPENSION_REASON_UPGRADE = 1; bytes32 public constant SECTION_SYSTEM = "System"; bytes32 public constant SECTION_ISSUANCE = "Issuance"; bytes32 public constant SECTION_EXCHANGE = "Exchange"; bytes32 public constant SECTION_PYNTH_EXCHANGE = "PynthExchange"; bytes32 public constant SECTION_PYNTH = "Pynth"; Suspension public systemSuspension; Suspension public issuanceSuspension; Suspension public exchangeSuspension; mapping(bytes32 => Suspension) public pynthExchangeSuspension; mapping(bytes32 => Suspension) public pynthSuspension; constructor(address _owner) public Owned(_owner) {} /* ========== VIEWS ========== */ function requireSystemActive() external view { _internalRequireSystemActive(); } function requireIssuanceActive() external view { // Issuance requires the system be active _internalRequireSystemActive(); // and issuance itself of course _internalRequireIssuanceActive(); } function requireExchangeActive() external view { // Exchanging requires the system be active _internalRequireSystemActive(); // and exchanging itself of course _internalRequireExchangeActive(); } function requirePynthExchangeActive(bytes32 currencyKey) external view { // Pynth exchange and transfer requires the system be active _internalRequireSystemActive(); _internalRequirePynthExchangeActive(currencyKey); } function requirePynthActive(bytes32 currencyKey) external view { // Pynth exchange and transfer requires the system be active _internalRequireSystemActive(); _internalRequirePynthActive(currencyKey); } function requirePynthsActive(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view { // Pynth exchange and transfer requires the system be active _internalRequireSystemActive(); _internalRequirePynthActive(sourceCurrencyKey); _internalRequirePynthActive(destinationCurrencyKey); } function requireExchangeBetweenPynthsAllowed(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) external view { // Pynth exchange and transfer requires the system be active _internalRequireSystemActive(); // and exchanging must be active _internalRequireExchangeActive(); // and the pynth exchanging between the pynths must be active _internalRequirePynthExchangeActive(sourceCurrencyKey); _internalRequirePynthExchangeActive(destinationCurrencyKey); // and finally, the pynths cannot be suspended _internalRequirePynthActive(sourceCurrencyKey); _internalRequirePynthActive(destinationCurrencyKey); } function isSystemUpgrading() external view returns (bool) { return systemSuspension.suspended && systemSuspension.reason == SUSPENSION_REASON_UPGRADE; } function getPynthExchangeSuspensions(bytes32[] calldata pynths) external view returns (bool[] memory exchangeSuspensions, uint256[] memory reasons) { exchangeSuspensions = new bool[](pynths.length); reasons = new uint256[](pynths.length); for (uint i = 0; i < pynths.length; i++) { exchangeSuspensions[i] = pynthExchangeSuspension[pynths[i]].suspended; reasons[i] = pynthExchangeSuspension[pynths[i]].reason; } } function getPynthSuspensions(bytes32[] calldata pynths) external view returns (bool[] memory suspensions, uint256[] memory reasons) { suspensions = new bool[](pynths.length); reasons = new uint256[](pynths.length); for (uint i = 0; i < pynths.length; i++) { suspensions[i] = pynthSuspension[pynths[i]].suspended; reasons[i] = pynthSuspension[pynths[i]].reason; } } /* ========== MUTATIVE FUNCTIONS ========== */ function updateAccessControl( bytes32 section, address account, bool canSuspend, bool canResume ) external onlyOwner { _internalUpdateAccessControl(section, account, canSuspend, canResume); } function updateAccessControls( bytes32[] calldata sections, address[] calldata accounts, bool[] calldata canSuspends, bool[] calldata canResumes ) external onlyOwner { require( sections.length == accounts.length && accounts.length == canSuspends.length && canSuspends.length == canResumes.length, "Input array lengths must match" ); for (uint i = 0; i < sections.length; i++) { _internalUpdateAccessControl(sections[i], accounts[i], canSuspends[i], canResumes[i]); } } function suspendSystem(uint256 reason) external { _requireAccessToSuspend(SECTION_SYSTEM); systemSuspension.suspended = true; systemSuspension.reason = uint248(reason); emit SystemSuspended(systemSuspension.reason); } function resumeSystem() external { _requireAccessToResume(SECTION_SYSTEM); systemSuspension.suspended = false; emit SystemResumed(uint256(systemSuspension.reason)); systemSuspension.reason = 0; } function suspendIssuance(uint256 reason) external { _requireAccessToSuspend(SECTION_ISSUANCE); issuanceSuspension.suspended = true; issuanceSuspension.reason = uint248(reason); emit IssuanceSuspended(reason); } function resumeIssuance() external { _requireAccessToResume(SECTION_ISSUANCE); issuanceSuspension.suspended = false; emit IssuanceResumed(uint256(issuanceSuspension.reason)); issuanceSuspension.reason = 0; } function suspendExchange(uint256 reason) external { _requireAccessToSuspend(SECTION_EXCHANGE); exchangeSuspension.suspended = true; exchangeSuspension.reason = uint248(reason); emit ExchangeSuspended(reason); } function resumeExchange() external { _requireAccessToResume(SECTION_EXCHANGE); exchangeSuspension.suspended = false; emit ExchangeResumed(uint256(exchangeSuspension.reason)); exchangeSuspension.reason = 0; } function suspendPynthExchange(bytes32 currencyKey, uint256 reason) external { bytes32[] memory currencyKeys = new bytes32[](1); currencyKeys[0] = currencyKey; _internalSuspendPynthExchange(currencyKeys, reason); } function suspendPynthsExchange(bytes32[] calldata currencyKeys, uint256 reason) external { _internalSuspendPynthExchange(currencyKeys, reason); } function resumePynthExchange(bytes32 currencyKey) external { bytes32[] memory currencyKeys = new bytes32[](1); currencyKeys[0] = currencyKey; _internalResumePynthsExchange(currencyKeys); } function resumePynthsExchange(bytes32[] calldata currencyKeys) external { _internalResumePynthsExchange(currencyKeys); } function suspendPynth(bytes32 currencyKey, uint256 reason) external { bytes32[] memory currencyKeys = new bytes32[](1); currencyKeys[0] = currencyKey; _internalSuspendPynths(currencyKeys, reason); } function suspendPynths(bytes32[] calldata currencyKeys, uint256 reason) external { _internalSuspendPynths(currencyKeys, reason); } function resumePynth(bytes32 currencyKey) external { bytes32[] memory currencyKeys = new bytes32[](1); currencyKeys[0] = currencyKey; _internalResumePynths(currencyKeys); } function resumePynths(bytes32[] calldata currencyKeys) external { _internalResumePynths(currencyKeys); } /* ========== INTERNAL FUNCTIONS ========== */ function _requireAccessToSuspend(bytes32 section) internal view { require(accessControl[section][msg.sender].canSuspend, "Restricted to access control list"); } function _requireAccessToResume(bytes32 section) internal view { require(accessControl[section][msg.sender].canResume, "Restricted to access control list"); } function _internalRequireSystemActive() internal view { require( !systemSuspension.suspended, systemSuspension.reason == SUSPENSION_REASON_UPGRADE ? "PeriFinance is suspended, upgrade in progress... please stand by" : "PeriFinance is suspended. Operation prohibited" ); } function _internalRequireIssuanceActive() internal view { require(!issuanceSuspension.suspended, "Issuance is suspended. Operation prohibited"); } function _internalRequireExchangeActive() internal view { require(!exchangeSuspension.suspended, "Exchange is suspended. Operation prohibited"); } function _internalRequirePynthExchangeActive(bytes32 currencyKey) internal view { require(!pynthExchangeSuspension[currencyKey].suspended, "Pynth exchange suspended. Operation prohibited"); } function _internalRequirePynthActive(bytes32 currencyKey) internal view { require(!pynthSuspension[currencyKey].suspended, "Pynth is suspended. Operation prohibited"); } function _internalSuspendPynths(bytes32[] memory currencyKeys, uint256 reason) internal { _requireAccessToSuspend(SECTION_PYNTH); for (uint i = 0; i < currencyKeys.length; i++) { bytes32 currencyKey = currencyKeys[i]; pynthSuspension[currencyKey].suspended = true; pynthSuspension[currencyKey].reason = uint248(reason); emit PynthSuspended(currencyKey, reason); } } function _internalResumePynths(bytes32[] memory currencyKeys) internal { _requireAccessToResume(SECTION_PYNTH); for (uint i = 0; i < currencyKeys.length; i++) { bytes32 currencyKey = currencyKeys[i]; emit PynthResumed(currencyKey, uint256(pynthSuspension[currencyKey].reason)); delete pynthSuspension[currencyKey]; } } function _internalSuspendPynthExchange(bytes32[] memory currencyKeys, uint256 reason) internal { _requireAccessToSuspend(SECTION_PYNTH_EXCHANGE); for (uint i = 0; i < currencyKeys.length; i++) { bytes32 currencyKey = currencyKeys[i]; pynthExchangeSuspension[currencyKey].suspended = true; pynthExchangeSuspension[currencyKey].reason = uint248(reason); emit PynthExchangeSuspended(currencyKey, reason); } } function _internalResumePynthsExchange(bytes32[] memory currencyKeys) internal { _requireAccessToResume(SECTION_PYNTH_EXCHANGE); for (uint i = 0; i < currencyKeys.length; i++) { bytes32 currencyKey = currencyKeys[i]; emit PynthExchangeResumed(currencyKey, uint256(pynthExchangeSuspension[currencyKey].reason)); delete pynthExchangeSuspension[currencyKey]; } } function _internalUpdateAccessControl( bytes32 section, address account, bool canSuspend, bool canResume ) internal { require( section == SECTION_SYSTEM || section == SECTION_ISSUANCE || section == SECTION_EXCHANGE || section == SECTION_PYNTH_EXCHANGE || section == SECTION_PYNTH, "Invalid section supplied" ); accessControl[section][account].canSuspend = canSuspend; accessControl[section][account].canResume = canResume; emit AccessControlUpdated(section, account, canSuspend, canResume); } /* ========== EVENTS ========== */ event SystemSuspended(uint256 reason); event SystemResumed(uint256 reason); event IssuanceSuspended(uint256 reason); event IssuanceResumed(uint256 reason); event ExchangeSuspended(uint256 reason); event ExchangeResumed(uint256 reason); event PynthExchangeSuspended(bytes32 currencyKey, uint256 reason); event PynthExchangeResumed(bytes32 currencyKey, uint256 reason); event PynthSuspended(bytes32 currencyKey, uint256 reason); event PynthResumed(bytes32 currencyKey, uint256 reason); event AccessControlUpdated(bytes32 indexed section, address indexed account, bool canSuspend, bool canResume); }
0x608060405234801561001057600080fd5b506004361061025e5760003560e01c80634ef4a6431161014657806389bb3dfa116100c3578063c09290bb11610087578063c09290bb14610983578063d7f2c385146109f1578063e470df5814610a0e578063f161620714610a2b578063f405f65a14610a33578063f8b4b08414610a3b5761025e565b806389bb3dfa146108af5780638c38729d146108cc5780638da5cb5b146108e95780639f8a95ba146108f1578063ad135a16146109155761025e565b80637118d4311161010a5780637118d43114610806578063754a46411461080e57806379ba5097146108315780637c3125411461083957806387743c36146108415761025e565b80634ef4a6431461063c578063517d60c61461065957806353a47bb7146107b7578063631070fc146107db57806367a280b2146107fe5761025e565b806320f2bf00116101df5780632e94d93d116101a35780632e94d93d14610542578063387da909146105b0578063396e258e146105b85780633cb4d443146105d557806348bf1971146105f85780634abdb44d146106345761025e565b806320f2bf00146104895780632366245e146104d05780632cb28bd8146104fb5780632dd8afdb1461051e5780632e8d0b9e146105265761025e565b8063157c51d311610226578063157c51d3146104195780631588e817146104215780631627540c1461043e5780631635b0ce146104645780631d7e77891461046c5761025e565b8063086dabd11461026357806308d10e621461026d5780630d2d7c281461028a57806312bde5141461039157806314acc95f146103ab575b600080fd5b61026b610a43565b005b61026b6004803603602081101561028357600080fd5b5035610a4d565b6102f8600480360360208110156102a057600080fd5b810190602081018135600160201b8111156102ba57600080fd5b8201836020820111156102cc57600080fd5b803590602001918460208302840111600160201b831117156102ed57600080fd5b509092509050610a96565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561033c578181015183820152602001610324565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561037b578181015183820152602001610363565b5050505090500194505050505060405180910390f35b610399610bbf565b60408051918252519081900360200190f35b61026b600480360360208110156103c157600080fd5b810190602081018135600160201b8111156103db57600080fd5b8201836020820111156103ed57600080fd5b803590602001918460208302840111600160201b8311171561040e57600080fd5b509092509050610bcc565b61026b610c08565b61026b6004803603602081101561043757600080fd5b5035610c72565b61026b6004803603602081101561045457600080fd5b50356001600160a01b0316610cdd565b610399610d39565b61026b6004803603602081101561048257600080fd5b5035610d45565b6104b56004803603604081101561049f57600080fd5b50803590602001356001600160a01b0316610d59565b60408051921515835290151560208301528051918290030190f35b6104d8610d82565b6040805192151583526001600160f81b0390911660208301528051918290030190f35b61026b6004803603604081101561051157600080fd5b5080359060200135610d9b565b6104d8610dcf565b61052e610de8565b604080519115158252519081900360200190f35b61026b6004803603602081101561055857600080fd5b810190602081018135600160201b81111561057257600080fd5b82018360208201111561058457600080fd5b803590602001918460208302840111600160201b831117156105a557600080fd5b509092509050610e12565b610399610e4e565b61026b600480360360208110156105ce57600080fd5b5035610e62565b61026b600480360360408110156105eb57600080fd5b5080359060200135610ecd565b61026b6004803603608081101561060e57600080fd5b508035906001600160a01b03602082013516906040810135151590606001351515610ed5565b610399610eef565b6104d86004803603602081101561065257600080fd5b5035610efe565b61026b6004803603608081101561066f57600080fd5b810190602081018135600160201b81111561068957600080fd5b82018360208201111561069b57600080fd5b803590602001918460208302840111600160201b831117156106bc57600080fd5b919390929091602081019035600160201b8111156106d957600080fd5b8201836020820111156106eb57600080fd5b803590602001918460208302840111600160201b8311171561070c57600080fd5b919390929091602081019035600160201b81111561072957600080fd5b82018360208201111561073b57600080fd5b803590602001918460208302840111600160201b8311171561075c57600080fd5b919390929091602081019035600160201b81111561077957600080fd5b82018360208201111561078b57600080fd5b803590602001918460208302840111600160201b831117156107ac57600080fd5b509092509050610f23565b6107bf611014565b604080516001600160a01b039092168252519081900360200190f35b61026b600480360360408110156107f157600080fd5b5080359060200135611023565b61026b61106e565b61026b6110da565b61026b6004803603604081101561082457600080fd5b50803590602001356110ea565b61026b611130565b61026b6111ec565b61026b6004803603604081101561085757600080fd5b810190602081018135600160201b81111561087157600080fd5b82018360208201111561088357600080fd5b803590602001918460208302840111600160201b831117156108a457600080fd5b9193509150356111fc565b61026b600480360360208110156108c557600080fd5b503561123a565b6104d8600480360360208110156108e257600080fd5b503561124b565b6107bf611270565b6108f961127f565b604080516001600160f81b039092168252519081900360200190f35b61026b6004803603604081101561092b57600080fd5b810190602081018135600160201b81111561094557600080fd5b82018360208201111561095757600080fd5b803590602001918460208302840111600160201b8311171561097857600080fd5b919350915035611284565b6102f86004803603602081101561099957600080fd5b810190602081018135600160201b8111156109b357600080fd5b8201836020820111156109c557600080fd5b803590602001918460208302840111600160201b831117156109e657600080fd5b5090925090506112c2565b61026b60048036036020811015610a0757600080fd5b50356113e3565b61026b60048036036020811015610a2457600080fd5b5035611428565b61039961149d565b61026b6114ac565b6104d8611518565b610a4b611531565b565b604080516001808252818301909252606091602080830190803883390190505090508181600081518110610a7d57fe5b602002602001018181525050610a9281611610565b5050565b60608083839050604051908082528060200260200182016040528015610ac6578160200160208202803883390190505b50604080518581526020808702820101909152909250838015610af3578160200160208202803883390190505b50905060005b83811015610bb75760066000868684818110610b1157fe5b90506020020135815260200190815260200160002060000160009054906101000a900460ff16838281518110610b4357fe5b9115156020928302919091019091015260066000868684818110610b6357fe5b90506020020135815260200190815260200160002060000160019054906101000a90046001600160f81b03166001600160f81b0316828281518110610ba457fe5b6020908102919091010152600101610af9565b509250929050565b6553797374656d60d01b81565b610a9282828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061161092505050565b610c1a6553797374656d60d01b6116be565b6003805460ff191690819055604080516101009092046001600160f81b03168252517fb392a95118344e8edff8eff56183afb4bb0240310c406a0fc1217d2755c66d8f916020908290030190a16003805460ff169055565b610c866745786368616e676560c01b61171b565b600580546001600160f81b0383166101000260ff1990911660011760ff161790556040805182815290517f078773069a9216cdb6acaa7b184785f12f62048c7ce8b7ede1bad6785de16b229181900360200190a150565b610ce5611773565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b640a0f2dce8d60db1b81565b610d4d611531565b610d56816117bc565b50565b600260209081526000928352604080842090915290825290205460ff8082169161010090041682565b60045460ff81169061010090046001600160f81b031682565b610da3611531565b610dab61180a565b610db48261184c565b610dbd8161184c565b610dc6826117bc565b610a92816117bc565b60035460ff81169061010090046001600160f81b031682565b60035460009060ff168015610e0d575060035461010090046001600160f81b03166001145b905090565b610a9282828080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061189a92505050565b6c50796e746845786368616e676560981b81565b610e766749737375616e636560c01b61171b565b600480546001600160f81b0383166101000260ff1990911660011760ff161790556040805182815290517fee8bf45d6e3141aa521ae4f0d05dfefe0327a3f23a9fbae6a64680458b34ebb89181900360200190a150565b610dbd611531565b610edd611773565b610ee984848484611940565b50505050565b6749737375616e636560c01b81565b60066020526000908152604090205460ff81169061010090046001600160f81b031682565b610f2b611773565b8685148015610f3957508483145b8015610f4457508281145b610f95576040805162461bcd60e51b815260206004820152601e60248201527f496e707574206172726179206c656e67746873206d757374206d617463680000604482015290519081900360640190fd5b60005b8781101561100957611001898983818110610faf57fe5b90506020020135888884818110610fc257fe5b905060200201356001600160a01b0316878785818110610fde57fe5b905060200201351515868686818110610ff357fe5b905060200201351515611940565b600101610f98565b505050505050505050565b6001546001600160a01b031681565b60408051600180825281830190925260609160208083019080388339019050509050828160008151811061105357fe5b6020026020010181815250506110698183611a72565b505050565b6110826749737375616e636560c01b6116be565b6004805460ff191690819055604080516101009092046001600160f81b03168252517f0f1a80395faba9a11017f830db5f90ad6525a1621dbfb2cbc2b6679ba5716837916020908290030190a16004805460ff169055565b6110e2611531565b610a4b61180a565b60408051600180825281830190925260609160208083019080388339019050509050828160008151811061111a57fe5b6020026020010181815250506110698183611b18565b6001546001600160a01b031633146111795760405162461bcd60e51b8152600401808060200182810382526035815260200180611c096035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6111f4611531565b610a4b611bc6565b611069838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250859250611a72915050565b611242611531565b610d568161184c565b60076020526000908152604090205460ff81169061010090046001600160f81b031682565b6000546001600160a01b031681565b600181565b611069838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250859250611b18915050565b606080838390506040519080825280602002602001820160405280156112f2578160200160208202803883390190505b5060408051858152602080870282010190915290925083801561131f578160200160208202803883390190505b50905060005b83811015610bb7576007600086868481811061133d57fe5b90506020020135815260200190815260200160002060000160009054906101000a900460ff1683828151811061136f57fe5b911515602092830291909101909101526007600086868481811061138f57fe5b90506020020135815260200190815260200160002060000160019054906101000a90046001600160f81b03166001600160f81b03168282815181106113d057fe5b6020908102919091010152600101611325565b60408051600180825281830190925260609160208083019080388339019050509050818160008151811061141357fe5b602002602001018181525050610a928161189a565b61143a6553797374656d60d01b61171b565b600380546001600160f81b0380841661010090810260ff1990931660011760ff169290921792839055604080519290930416815290517f86b7ed06c3a2c3763514d475ced33f9ac8b1bb8f028ded18de0100b7678f3c4f9181900360200190a150565b6745786368616e676560c01b81565b6114c06745786368616e676560c01b6116be565b6005805460ff191690819055604080516101009092046001600160f81b03168252517f07966fe79d35c7abf1f3b2ad9970ea24cae0f11406e283e848e3e6608ae3c214916020908290030190a16005805460ff169055565b60055460ff81169061010090046001600160f81b031682565b60035460ff8116159061010090046001600160f81b031660011461156d576040518060600160405280602e8152602001611c97602e9139611587565b604051806060016040528060408152602001611d1f604091395b90610d565760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115d55781810151838201526020016115bd565b50505050905090810190601f1680156116025780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6116296c50796e746845786368616e676560981b6116be565b60005b8151811015610a9257600082828151811061164357fe5b6020908102919091018101516000818152600683526040908190205481518381526101009091046001600160f81b03169381019390935280519193507fc6cc5bbf2969f74a5166d0bad983455bf7a65b6372af7260400f9b3b04338090928290030190a160009081526006602052604081205560010161162c565b6000818152600260209081526040808320338452909152902054610100900460ff16610d565760405162461bcd60e51b8152600401808060200182810382526021815260200180611d5f6021913960400191505060405180910390fd5b600081815260026020908152604080832033845290915290205460ff16610d565760405162461bcd60e51b8152600401808060200182810382526021815260200180611d5f6021913960400191505060405180910390fd5b6000546001600160a01b03163314610a4b5760405162461bcd60e51b815260040180806020018281038252602f815260200180611cc5602f913960400191505060405180910390fd5b60008181526007602052604090205460ff1615610d565760405162461bcd60e51b8152600401808060200182810382526028815260200180611d806028913960400191505060405180910390fd5b60055460ff1615610a4b5760405162461bcd60e51b815260040180806020018281038252602b815260200180611cf4602b913960400191505060405180910390fd5b60008181526006602052604090205460ff1615610d565760405162461bcd60e51b815260040180806020018281038252602e815260200180611c69602e913960400191505060405180910390fd5b6118ab640a0f2dce8d60db1b6116be565b60005b8151811015610a925760008282815181106118c557fe5b6020908102919091018101516000818152600783526040908190205481518381526101009091046001600160f81b03169381019390935280519193507fddc88fc179cf33f24e5569dd8635c3cd44864e66a1b359bdd9d95e50d94a0d39928290030190a16000908152600760205260408120556001016118ae565b6553797374656d60d01b84148061196157506749737375616e636560c01b84145b8061197657506745786368616e676560c01b84145b8061199057506c50796e746845786368616e676560981b84145b806119a25750640a0f2dce8d60db1b84145b6119f3576040805162461bcd60e51b815260206004820152601860248201527f496e76616c69642073656374696f6e20737570706c6965640000000000000000604482015290519081900360640190fd5b60008481526002602090815260408083206001600160a01b038716808552908352928190208054851515610100810261ff001989151560ff1990941684171617909255825190815292830152805187927f95bad30f8fe717e4a02906d7b05a6f90698c7135cd053e5b6d5239146b4c40d192908290030190a350505050565b611a83640a0f2dce8d60db1b61171b565b60005b8251811015611069576000838281518110611a9d57fe5b60209081029190910181015160008181526007835260409081902080546001600160f81b0388166101000260ff1990911660011760ff16179055805182815292830186905280519193507ffd3feff79fa642f72408a90c33c6b2ae245bd7077eec45d2502714178e692c86928290030190a150600101611a86565b611b316c50796e746845786368616e676560981b61171b565b60005b8251811015611069576000838281518110611b4b57fe5b60209081029190910181015160008181526006835260409081902080546001600160f81b0388166101000260ff1990911660011760ff16179055805182815292830186905280519193507f0af76046e49b0af43f6e092983123f6fb3a25f63bd7096c1bb89649a75a9a494928290030190a150600101611b34565b60045460ff1615610a4b5760405162461bcd60e51b815260040180806020018281038252602b815260200180611c3e602b913960400191505060405180910390fdfe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e65727368697049737375616e63652069732073757370656e6465642e204f7065726174696f6e2070726f6869626974656450796e74682065786368616e67652073757370656e6465642e204f7065726174696f6e2070726f686962697465645065726946696e616e63652069732073757370656e6465642e204f7065726174696f6e2070726f686962697465644f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6e45786368616e67652069732073757370656e6465642e204f7065726174696f6e2070726f686962697465645065726946696e616e63652069732073757370656e6465642c207570677261646520696e2070726f67726573732e2e2e20706c65617365207374616e642062795265737472696374656420746f2061636365737320636f6e74726f6c206c69737450796e74682069732073757370656e6465642e204f7065726174696f6e2070726f68696269746564a265627a7a7231582018f806304970781b8eb73b57b112e4fdff7f40e812c7e7a9c4cea06b9772f04f64736f6c63430005100032
{"success": true, "error": null, "results": {}}
9,769
0x47e59fd671cffc377586569b74259f6fb9c59abb
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract MooToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function MooToken( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to]); // Save this for an assertion in the future uint previousBalances = balanceOf[_from] + balanceOf[_to]; // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender&#39;s allowance totalSupply -= _value; // Update totalSupply Burn(_from, _value); return true; } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract MooAdvToken is owned, MooToken { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function MooAdvToken( uint256 initialSupply, string tokenName, string tokenSymbol ) MooToken(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(_from, _to, _value); } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; } /// @notice Buy tokens from contract by sending ether function buy() payable public { uint amount = msg.value / buyPrice; // calculates the amount _transfer(this, msg.sender, amount); // makes the transfers } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { require(this.balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It&#39;s important to do this last to avoid recursion attacks } }
0x60606040523615610126576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305fefda71461012b57806306fdde0314610157578063095ea7b3146101e657806318160ddd1461024057806323b872dd14610269578063313ce567146102e257806342966c68146103115780634b7503341461034c57806370a082311461037557806379c65068146103c257806379cc6790146104045780638620410b1461045e5780638da5cb5b1461048757806395d89b41146104dc578063a6f2ae3a1461056b578063a9059cbb14610575578063b414d4b6146105b7578063cae9ca5114610608578063dd62ed3e146106a5578063e4849b3214610711578063e724529c14610734578063f2fde38b14610778575b600080fd5b341561013657600080fd5b61015560048080359060200190919080359060200190919050506107b1565b005b341561016257600080fd5b61016a610820565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ab5780820151818401525b60208101905061018f565b50505050905090810190601f1680156101d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101f157600080fd5b610226600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108be565b604051808215151515815260200191505060405180910390f35b341561024b57600080fd5b61025361094c565b6040518082815260200191505060405180910390f35b341561027457600080fd5b6102c8600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610952565b604051808215151515815260200191505060405180910390f35b34156102ed57600080fd5b6102f5610a80565b604051808260ff1660ff16815260200191505060405180910390f35b341561031c57600080fd5b6103326004808035906020019091905050610a93565b604051808215151515815260200191505060405180910390f35b341561035757600080fd5b61035f610b98565b6040518082815260200191505060405180910390f35b341561038057600080fd5b6103ac600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b9e565b6040518082815260200191505060405180910390f35b34156103cd57600080fd5b610402600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610bb6565b005b341561040f57600080fd5b610444600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d29565b604051808215151515815260200191505060405180910390f35b341561046957600080fd5b610471610f44565b6040518082815260200191505060405180910390f35b341561049257600080fd5b61049a610f4a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104e757600080fd5b6104ef610f6f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105305780820151818401525b602081019050610514565b50505050905090810190601f16801561055d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61057361100d565b005b341561058057600080fd5b6105b5600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061102e565b005b34156105c257600080fd5b6105ee600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061103e565b604051808215151515815260200191505060405180910390f35b341561061357600080fd5b61068b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061105e565b604051808215151515815260200191505060405180910390f35b34156106b057600080fd5b6106fb600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111dd565b6040518082815260200191505060405180910390f35b341561071c57600080fd5b6107326004808035906020019091905050611202565b005b341561073f57600080fd5b610776600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035151590602001909190505061127f565b005b341561078357600080fd5b6107af600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113a6565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561080c57600080fd5b81600781905550806008819055505b5b5050565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108b65780601f1061088b576101008083540402835291602001916108b6565b820191906000526020600020905b81548152906001019060200180831161089957829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190505b92915050565b60045481565b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156109df57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610a74848484611446565b600190505b9392505050565b600360009054906101000a900460ff1681565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610ae357600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b919050565b60075481565b60056020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c1157600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806004600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b5b5050565b600081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610d7957600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610e0457600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b92915050565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110055780601f10610fda57610100808354040283529160200191611005565b820191906000526020600020905b815481529060010190602001808311610fe857829003601f168201915b505050505081565b60006008543481151561101c57fe5b04905061102a303383611446565b5b50565b611039338383611446565b5b5050565b60096020528060005260406000206000915054906101000a900460ff1681565b60008084905061106e85856108be565b156111d4578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156111695780820151818401525b60208101905061114d565b50505050905090810190601f1680156111965780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15156111b757600080fd5b6102c65a03f115156111c857600080fd5b505050600191506111d5565b5b509392505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60075481023073ffffffffffffffffffffffffffffffffffffffff16311015151561122c57600080fd5b611237333083611446565b3373ffffffffffffffffffffffffffffffffffffffff166108fc60075483029081150290604051600060405180830381858888f19350505050151561127b57600080fd5b5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112da57600080fd5b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561140157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b50565b60008273ffffffffffffffffffffffffffffffffffffffff161415151561146c57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156114ba57600080fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011015151561154957600080fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156115a257600080fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156115fb57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b5050505600a165627a7a72305820f7328dd8d32c30cc7ddab68fe7d53eee8958c6c8e7545b297ce40d941cbba8150029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
9,770
0xab1cb0709a1c69493bd6c2816ff3269cf94210ec
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract okbitnetwork is StandardToken { string public constant name = "okbitnetwork"; // solium-disable-line uppercase string public constant symbol = "OBN"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 300000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ function okbitnetwork() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; Transfer(0x0, msg.sender, INITIAL_SUPPLY); } } contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); Burn(burner, _value); } } contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } } contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) public { require(_startTime >= now); require(_endTime >= _startTime); require(_rate > 0); require(_wallet != address(0)); token = createTokenContract(); startTime = 0; endTime = 2; rate = 20000; wallet = 0x8C233b0Ab41F713336105e178bF4bF327d636Ea0; } // fallback function can be used to buy tokens function () external payable { buyTokens(msg.sender); } // low level token purchase function function buyTokens(address beneficiary) public payable { require(beneficiary != address(0)); require(validPurchase()); uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = getTokenAmount(200000); // update state weiRaised = weiRaised.add(1000); token.mint(beneficiary, tokens); TokenPurchase(msg.sender, beneficiary, weiAmount, tokens); forwardFunds(); } // @return true if crowdsale event has ended function hasEnded() public view returns (bool) { return now > endTime; } // creates the token to be sold. // override this method to have crowdsale of a specific mintable token. function createTokenContract() internal returns (MintableToken) { return new MintableToken(); } // Override this method to have a way to add business logic to your crowdsale when buying function getTokenAmount(uint256 weiAmount) internal view returns(uint256) { return weiAmount.mul(rate); } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { wallet.transfer(msg.value); } // @return true if the transaction can buy tokens function validPurchase() internal view returns (bool) { bool withinPeriod = now >= startTime && now <= endTime; bool nonZeroPurchase = msg.value != 0; return withinPeriod && nonZeroPurchase; } } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 1000 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes } }
0x6060604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100bf578063095ea7b31461014d57806318160ddd146101a757806323b872dd146101d05780632ff2e9dc14610249578063313ce5671461027257806366188463146102a157806370a08231146102fb57806395d89b4114610348578063a9059cbb146103d6578063d73dd62314610430578063dd62ed3e1461048a575b600080fd5b34156100ca57600080fd5b6100d26104f6565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101125780820151818401526020810190506100f7565b50505050905090810190601f16801561013f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015857600080fd5b61018d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061052f565b604051808215151515815260200191505060405180910390f35b34156101b257600080fd5b6101ba610621565b6040518082815260200191505060405180910390f35b34156101db57600080fd5b61022f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061062b565b604051808215151515815260200191505060405180910390f35b341561025457600080fd5b61025c6109e5565b6040518082815260200191505060405180910390f35b341561027d57600080fd5b6102856109f6565b604051808260ff1660ff16815260200191505060405180910390f35b34156102ac57600080fd5b6102e1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506109fb565b604051808215151515815260200191505060405180910390f35b341561030657600080fd5b610332600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c8c565b6040518082815260200191505060405180910390f35b341561035357600080fd5b61035b610cd4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561039b578082015181840152602081019050610380565b50505050905090810190601f1680156103c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103e157600080fd5b610416600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d0d565b604051808215151515815260200191505060405180910390f35b341561043b57600080fd5b610470600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610f2c565b604051808215151515815260200191505060405180910390f35b341561049557600080fd5b6104e0600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611128565b6040518082815260200191505060405180910390f35b6040805190810160405280600c81526020017f6f6b6269746e6574776f726b000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561066857600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156106b557600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561074057600080fd5b610791826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111af90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610824826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108f582600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111af90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601260ff16600a0a6311e1a3000281565b601281565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610b0c576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ba0565b610b1f83826111af90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040805190810160405280600381526020017f4f424e000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610d4a57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d9757600080fd5b610de8826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111af90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c890919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000610fbd82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008282111515156111bd57fe5b818303905092915050565b60008082840190508381101515156111dc57fe5b80915050929150505600a165627a7a72305820e37967c7fb89418982c8f1b975c312f6fe1b7a2714776af47fa427efa65ae5730029
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,771
0x04e2b5e8d0c30b618401e8b0eade9255eab3854f
/** *Submitted for verification at Etherscan.io on 2022-04-10 */ /* https://t.me/datreon https://datreon.media/ https://twitter.com/DatreonETH */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract DATREON is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e9 * 10**9; string public constant name = unicode"DATREON"; string public constant symbol = unicode"DAT"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeCollectionADD; address public uniswapV2Pair; uint public _buyFee = 11; uint public _sellFee = 11; uint private _feeRate = 15; uint public _maxBuyTokens; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event TaxAddUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable TaxAdd) { _FeeCollectionADD = TaxAdd; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from]); require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool isBuy = false; if(from != owner() && to != owner()) { if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); if((_launchedAt + (3 minutes)) > block.timestamp) { require(amount <= _maxBuyTokens); require((amount + balanceOf(address(to))) <= _maxHeldTokens); } isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _FeeCollectionADD.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} function createPair() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyTokens = 5000000 * 10**9; _maxHeldTokens = 20000000 * 10**9; } function manualswap() external { uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external onlyOwner() { require(_msgSender() == _FeeCollectionADD); require(rate > 0, "can't be zero"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external onlyOwner() { require(buy < _buyFee && sell < _sellFee); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external onlyOwner(){ _FeeCollectionADD = payable(newAddress); emit TaxAddUpdated(_FeeCollectionADD); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101e75760003560e01c80636fc3eaec11610102578063a9059cbb11610095578063c9567bf911610064578063c9567bf91461058f578063db92dbb6146105a4578063dcb0e0ad146105b9578063dd62ed3e146105d957600080fd5b8063a9059cbb1461051a578063b2289c621461053a578063b515566a1461055a578063c3c8cd801461057a57600080fd5b80638da5cb5b116100d15780638da5cb5b1461049857806394b8d8f2146104b657806395d89b41146104d65780639e78fb4f1461050557600080fd5b80636fc3eaec1461042e57806370a0823114610443578063715018a61461046357806373f54a111461047857600080fd5b806331c2d8471161017a57806345596e2e1161014957806345596e2e146103aa57806349bd5a5e146103ca578063590f897e146104025780636755a4d01461041857600080fd5b806331c2d8471461032557806332d873d8146103455780633bbac5791461035b57806340b9a54b1461039457600080fd5b80631940d020116101b65780631940d020146102b357806323b872dd146102c957806327f3a72a146102e9578063313ce567146102fe57600080fd5b806306fdde03146101f3578063095ea7b31461023c5780630b78f9c01461026c57806318160ddd1461028e57600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50610226604051806040016040528060078152602001662220aa2922a7a760c91b81525081565b604051610233919061177e565b60405180910390f35b34801561024857600080fd5b5061025c6102573660046117f8565b61061f565b6040519015158152602001610233565b34801561027857600080fd5b5061028c610287366004611824565b610635565b005b34801561029a57600080fd5b50670de0b6b3a76400005b604051908152602001610233565b3480156102bf57600080fd5b506102a5600d5481565b3480156102d557600080fd5b5061025c6102e4366004611846565b6106ca565b3480156102f557600080fd5b506102a561071e565b34801561030a57600080fd5b50610313600981565b60405160ff9091168152602001610233565b34801561033157600080fd5b5061028c61034036600461189d565b61072e565b34801561035157600080fd5b506102a5600e5481565b34801561036757600080fd5b5061025c610376366004611962565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103a057600080fd5b506102a560095481565b3480156103b657600080fd5b5061028c6103c536600461197f565b6107c4565b3480156103d657600080fd5b506008546103ea906001600160a01b031681565b6040516001600160a01b039091168152602001610233565b34801561040e57600080fd5b506102a5600a5481565b34801561042457600080fd5b506102a5600c5481565b34801561043a57600080fd5b5061028c61088a565b34801561044f57600080fd5b506102a561045e366004611962565b610897565b34801561046f57600080fd5b5061028c6108b2565b34801561048457600080fd5b5061028c610493366004611962565b610926565b3480156104a457600080fd5b506000546001600160a01b03166103ea565b3480156104c257600080fd5b50600f5461025c9062010000900460ff1681565b3480156104e257600080fd5b506102266040518060400160405280600381526020016211105560ea1b81525081565b34801561051157600080fd5b5061028c61099e565b34801561052657600080fd5b5061025c6105353660046117f8565b610ba3565b34801561054657600080fd5b506007546103ea906001600160a01b031681565b34801561056657600080fd5b5061028c61057536600461189d565b610bb0565b34801561058657600080fd5b5061028c610cc9565b34801561059b57600080fd5b5061028c610cdf565b3480156105b057600080fd5b506102a5610edb565b3480156105c557600080fd5b5061028c6105d43660046119a6565b610ef3565b3480156105e557600080fd5b506102a56105f43660046119c3565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b600061062c338484610f70565b50600192915050565b6000546001600160a01b031633146106685760405162461bcd60e51b815260040161065f906119fc565b60405180910390fd5b6009548210801561067a5750600a5481105b61068357600080fd5b6009829055600a81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60006106d7848484611094565b6001600160a01b0384166000908152600360209081526040808320338452909152812054610706908490611a47565b9050610713853383610f70565b506001949350505050565b600061072930610897565b905090565b6000546001600160a01b031633146107585760405162461bcd60e51b815260040161065f906119fc565b60005b81518110156107c05760006005600084848151811061077c5761077c611a5e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107b881611a74565b91505061075b565b5050565b6000546001600160a01b031633146107ee5760405162461bcd60e51b815260040161065f906119fc565b6007546001600160a01b0316336001600160a01b03161461080e57600080fd5b6000811161084e5760405162461bcd60e51b815260206004820152600d60248201526c63616e2774206265207a65726f60981b604482015260640161065f565b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b476108948161144b565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146108dc5760405162461bcd60e51b815260040161065f906119fc565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109505760405162461bcd60e51b815260040161065f906119fc565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d69060200161087f565b6000546001600160a01b031633146109c85760405162461bcd60e51b815260040161065f906119fc565b600f5460ff1615610a155760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b604482015260640161065f565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610a7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9e9190611a8f565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0f9190611a8f565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b809190611a8f565b600880546001600160a01b0319166001600160a01b039290921691909117905550565b600061062c338484611094565b6000546001600160a01b03163314610bda5760405162461bcd60e51b815260040161065f906119fc565b60005b81518110156107c05760085482516001600160a01b0390911690839083908110610c0957610c09611a5e565b60200260200101516001600160a01b031614158015610c5a575060065482516001600160a01b0390911690839083908110610c4657610c46611a5e565b60200260200101516001600160a01b031614155b15610cb757600160056000848481518110610c7757610c77611a5e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610cc181611a74565b915050610bdd565b6000610cd430610897565b905061089481611485565b6000546001600160a01b03163314610d095760405162461bcd60e51b815260040161065f906119fc565b600f5460ff1615610d565760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b604482015260640161065f565b600654610d769030906001600160a01b0316670de0b6b3a7640000610f70565b6006546001600160a01b031663f305d7194730610d9281610897565b600080610da76000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610e0f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e349190611aac565b505060085460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610e8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb19190611ada565b50600f805460ff1916600117905542600e556611c37937e08000600c5566470de4df820000600d55565b600854600090610729906001600160a01b0316610897565b6000546001600160a01b03163314610f1d5760405162461bcd60e51b815260040161065f906119fc565b600f805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb9060200161087f565b6001600160a01b038316610fd25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161065f565b6001600160a01b0382166110335760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161065f565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff16156110ba57600080fd5b6001600160a01b03831661111e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161065f565b6001600160a01b0382166111805760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161065f565b600081116111e25760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161065f565b600080546001600160a01b0385811691161480159061120f57506000546001600160a01b03848116911614155b156113ec576008546001600160a01b03858116911614801561123f57506006546001600160a01b03848116911614155b801561126457506001600160a01b03831660009081526004602052604090205460ff16155b1561130557600f5460ff166112bb5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e0000000000000000604482015260640161065f565b42600e5460b46112cb9190611af7565b111561130157600c548211156112e057600080fd5b600d546112ec84610897565b6112f69084611af7565b111561130157600080fd5b5060015b600f54610100900460ff1615801561131f5750600f5460ff165b801561133957506008546001600160a01b03858116911614155b156113ec57600061134930610897565b905080156113d557600f5462010000900460ff16156113cc57600b546008546064919061137e906001600160a01b0316610897565b6113889190611b0f565b6113929190611b2e565b8111156113cc57600b54600854606491906113b5906001600160a01b0316610897565b6113bf9190611b0f565b6113c99190611b2e565b90505b6113d581611485565b4780156113e5576113e54761144b565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061142e57506001600160a01b03841660009081526004602052604090205460ff165b15611437575060005b61144485858584866115f9565b5050505050565b6007546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156107c0573d6000803e3d6000fd5b600f805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114c9576114c9611a5e565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115469190611a8f565b8160018151811061155957611559611a5e565b6001600160a01b03928316602091820292909201015260065461157f9130911684610f70565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac947906115b8908590600090869030904290600401611b50565b600060405180830381600087803b1580156115d257600080fd5b505af11580156115e6573d6000803e3d6000fd5b5050600f805461ff001916905550505050565b6000611605838361161b565b90506116138686868461163f565b505050505050565b60008083156116385782156116335750600954611638565b50600a545b9392505050565b60008061164c848461171c565b6001600160a01b0388166000908152600260205260409020549193509150611675908590611a47565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546116a5908390611af7565b6001600160a01b0386166000908152600260205260409020556116c781611750565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161170c91815260200190565b60405180910390a3505050505050565b60008080606461172c8587611b0f565b6117369190611b2e565b905060006117448287611a47565b96919550909350505050565b3060009081526002602052604090205461176b908290611af7565b3060009081526002602052604090205550565b600060208083528351808285015260005b818110156117ab5785810183015185820160400152820161178f565b818111156117bd576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461089457600080fd5b80356117f3816117d3565b919050565b6000806040838503121561180b57600080fd5b8235611816816117d3565b946020939093013593505050565b6000806040838503121561183757600080fd5b50508035926020909101359150565b60008060006060848603121561185b57600080fd5b8335611866816117d3565b92506020840135611876816117d3565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156118b057600080fd5b823567ffffffffffffffff808211156118c857600080fd5b818501915085601f8301126118dc57600080fd5b8135818111156118ee576118ee611887565b8060051b604051601f19603f8301168101818110858211171561191357611913611887565b60405291825284820192508381018501918883111561193157600080fd5b938501935b8285101561195657611947856117e8565b84529385019392850192611936565b98975050505050505050565b60006020828403121561197457600080fd5b8135611638816117d3565b60006020828403121561199157600080fd5b5035919050565b801515811461089457600080fd5b6000602082840312156119b857600080fd5b813561163881611998565b600080604083850312156119d657600080fd5b82356119e1816117d3565b915060208301356119f1816117d3565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015611a5957611a59611a31565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611a8857611a88611a31565b5060010190565b600060208284031215611aa157600080fd5b8151611638816117d3565b600080600060608486031215611ac157600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611aec57600080fd5b815161163881611998565b60008219821115611b0a57611b0a611a31565b500190565b6000816000190483118215151615611b2957611b29611a31565b500290565b600082611b4b57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ba05784516001600160a01b031683529383019391830191600101611b7b565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220f0baa34a9bd5c47adb321717c79d6f39075c79aa24e9c093817a23e5cd30496e64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,772
0x56871674195f91c77c1b4ff1a345d3614169e058
/** *Submitted for verification at Etherscan.io on 2021-02-06 */ // SPDX-License-Identifier: GPL pragma solidity 0.6.12; interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } interface IGraSwapBlackList { // event OwnerChanged(address); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AddedBlackLists(address[]); event RemovedBlackLists(address[]); function owner()external view returns (address); // function newOwner()external view returns (address); function isBlackListed(address)external view returns (bool); // function changeOwner(address ownerToSet) external; // function updateOwner() external; function transferOwnership(address newOwner) external; function addBlackLists(address[] calldata accounts)external; function removeBlackLists(address[] calldata accounts)external; } interface IGraWhiteList { event AppendWhiter(address adder); event RemoveWhiter(address remover); function appendWhiter(address account) external; function removeWhiter(address account) external; function isWhiter(address account) external; function isNotWhiter(address account) external; } interface IGraSwapToken is IERC20, IGraSwapBlackList, IGraWhiteList{ function burn(uint256 amount) external; function burnFrom(address account, uint256 amount) external; function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); // function multiTransfer(uint256[] calldata mixedAddrVal) external returns (bool); function batchTransfer(address[] memory addressList, uint256[] memory amountList) external returns (bool); } interface IGraSwapFactory { event PairCreated(address indexed pair, address stock, address money, bool isOnlySwap); function createPair(address stock, address money, bool isOnlySwap) external returns (address pair); function setFeeToAddresses(address) external; function setFeeToSetter(address) external; function setFeeBPS(uint32 bps) external; function setPairLogic(address implLogic) external; function allPairsLength() external view returns (uint); function feeTo_1() external view returns (address); function feeTo_2() external view returns (address); function feeToPrivate() external view returns (address); function feeToSetter() external view returns (address); function feeBPS() external view returns (uint32); function pairLogic() external returns (address); function getTokensFromPair(address pair) external view returns (address stock, address money); function tokensToPair(address stock, address money, bool isOnlySwap) external view returns (address pair); } interface IGraSwapRouter { event AddLiquidity(uint stockAmount, uint moneyAmount, uint liquidity); event PairCreated(address indexed pair, address stock, address money, bool isOnlySwap); function factory() external pure returns (address); // liquidity function addLiquidity( address stock, address money, bool isOnlySwap, uint amountStockDesired, uint amountMoneyDesired, uint amountStockMin, uint amountMoneyMin, address to, uint deadline ) external payable returns (uint amountStock, uint amountMoney, uint liquidity); function removeLiquidity( address pair, uint liquidity, uint amountStockMin, uint amountMoneyMin, address to, uint deadline ) external returns (uint amountStock, uint amountMoney); // swap token function swapToken( address token, uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable returns (uint[] memory amounts); // limit order function limitOrder( bool isBuy, address pair, uint prevKey, uint price, uint32 id, uint stockAmount, uint deadline ) external payable; } interface IGraSwapBuyback { event BurnGras(uint256 burntAmt); function graContract() external pure returns (address); function router() external pure returns (address); function factory() external pure returns (address); function addMainToken(address token) external; function removeMainToken(address token) external; function isMainToken(address token) external view returns (bool); function mainTokens() external view returns (address[] memory list); function removeLiquidity(address[] calldata pairs) external; function swapForMainToken(address[] calldata pairs) external; function swapForGrasAndBurn(address[] calldata pairs) external; } contract GraSwapBuyback is IGraSwapBuyback { uint256 private constant _MAX_UINT256 = uint256(-1); address private constant _ETH = address(0); address public immutable override graContract; address public immutable override router; address public immutable override factory; mapping (address => bool) private _mainTokens; address[] private _mainTokenArr; constructor(address _graContract, address _router, address _factory) public { graContract = _graContract; router = _router; factory = _factory; // add ETH & GraS to main token list _mainTokens[_ETH] = true; _mainTokenArr.push(_ETH); _mainTokens[_graContract] = true; _mainTokenArr.push(_graContract); } receive() external payable { } // add token into main token list function addMainToken(address token) external override { require(msg.sender == IGraSwapToken(graContract).owner(), "GraSwapBuyback: NOT_Gra_OWNER"); if (!_mainTokens[token]) { _mainTokens[token] = true; _mainTokenArr.push(token); } } // remove token from main token list function removeMainToken(address token) external override { require(msg.sender == IGraSwapToken(graContract).owner(), "GraSwapBuyback: NOT_Gra_OWNER"); require(token != _ETH, "GraSwapBuyback: REMOVE_ETH_FROM_MAIN"); require(token != graContract, "GraSwapBuyback: REMOVE_Gra_FROM_MAIN"); if (_mainTokens[token]) { _mainTokens[token] = false; uint256 lastIdx = _mainTokenArr.length - 1; for (uint256 i = 2; i < lastIdx; i++) { // skip ETH & Gra if (_mainTokenArr[i] == token) { _mainTokenArr[i] = _mainTokenArr[lastIdx]; break; } } _mainTokenArr.pop(); } } // check if token is in main token list function isMainToken(address token) external view override returns (bool) { return _mainTokens[token]; } // query main token list function mainTokens() external view override returns (address[] memory list) { list = _mainTokenArr; } // remove Buyback's liquidity from all pairs // swap got minor tokens for main tokens if possible function removeLiquidity(address[] calldata pairs) external override { for (uint256 i = 0; i < pairs.length; i++) { _removeLiquidity(pairs[i]); } } function _removeLiquidity(address pair) private { (address a, address b) = IGraSwapFactory(factory).getTokensFromPair(pair); require(a != address(0) || b != address(0), "GraSwapBuyback: INVALID_PAIR"); uint256 amt = IERC20(pair).balanceOf(address(this)); // require(amt > 0, "GraSwapBuyback: NO_LIQUIDITY"); if (amt == 0) { return; } IERC20(pair).approve(router, 0); IERC20(pair).approve(router, amt); IGraSwapRouter(router).removeLiquidity( pair, amt, 0, 0, address(this), _MAX_UINT256); // minor -> main bool aIsMain = _mainTokens[a]; bool bIsMain = _mainTokens[b]; if ((aIsMain && !bIsMain) || (!aIsMain && bIsMain)) { _swapForMainToken(pair); } } // swap minor tokens for main tokens function swapForMainToken(address[] calldata pairs) external override { for (uint256 i = 0; i < pairs.length; i++) { _swapForMainToken(pairs[i]); } } function _swapForMainToken(address pair) private { (address a, address b) = IGraSwapFactory(factory).getTokensFromPair(pair); require(a != address(0) || b != address(0), "GraSwapBuyback: INVALID_PAIR"); address mainToken; address minorToken; if (_mainTokens[a]) { require(!_mainTokens[b], "GraSwapBuyback: SWAP_TWO_MAIN_TOKENS"); (mainToken, minorToken) = (a, b); } else { require(_mainTokens[b], "GraSwapBuyback: SWAP_TWO_MINOR_TOKENS"); (mainToken, minorToken) = (b, a); } uint256 minorTokenAmt = IERC20(minorToken).balanceOf(address(this)); // require(minorTokenAmt > 0, "GraSwapBuyback: NO_MINOR_TOKENS"); if (minorTokenAmt == 0) { return; } address[] memory path = new address[](1); path[0] = pair; // minor -> main IERC20(minorToken).approve(router, 0); IERC20(minorToken).approve(router, minorTokenAmt); IGraSwapRouter(router).swapToken( minorToken, minorTokenAmt, 0, path, address(this), _MAX_UINT256); } // swap main tokens for Gras, then burn all Gras function swapForGrasAndBurn(address[] calldata pairs) external override { for (uint256 i = 0; i < pairs.length; i++) { _swapForGras(pairs[i]); } // burn all Gras uint256 allGras = IERC20(graContract).balanceOf(address(this)); if (allGras == 0) { return; } IGraSwapToken(graContract).burn(allGras); emit BurnGras(allGras); } function _swapForGras(address pair) private { (address a, address b) = IGraSwapFactory(factory).getTokensFromPair(pair); require(a != address(0) || b != address(0), "GraSwapBuyback: INVALID_PAIR"); require(a == graContract || b == graContract, "GraSwapBuyback: GraS_NOT_IN_PAIR"); address token = (a == graContract) ? b : a; require(_mainTokens[token], "GraSwapBuyback: MAIN_TOKEN_NOT_IN_PAIR"); address[] memory path = new address[](1); path[0] = pair; if (token == _ETH) { // eth -> Gras uint256 ethAmt = address(this).balance; // require(ethAmt > 0, "GraSwapBuyback: NO_ETH"); if (ethAmt == 0) { return; } IGraSwapRouter(router).swapToken{value: ethAmt}( _ETH, ethAmt, 0, path, address(this), _MAX_UINT256); } else { // main token -> Gras uint256 tokenAmt = IERC20(token).balanceOf(address(this)); // require(tokenAmt > 0, "GraSwapBuyback: NO_MAIN_TOKENS"); if (tokenAmt == 0) { return; } IERC20(token).approve(router, 0); IERC20(token).approve(router, tokenAmt); IGraSwapRouter(router).swapToken( token, tokenAmt, 0, path, address(this), _MAX_UINT256); } } }
0x6080604052600436106100955760003560e01c8063a900d22511610059578063a900d22514610230578063b3defcd8146102ab578063c45a015514610310578063c931c39314610325578063f887ea401461036c5761009c565b80630ef17565146100a157806355f4cc5a1461011e57806358e5436e1461014f5780635d0e71e6146101825780635eeea19d146101fd5761009c565b3661009c57005b600080fd5b3480156100ad57600080fd5b5061011c600480360360208110156100c457600080fd5b810190602081018135600160201b8111156100de57600080fd5b8201836020820111156100f057600080fd5b803590602001918460208302840111600160201b8311171561011157600080fd5b509092509050610381565b005b34801561012a57600080fd5b506101336103bd565b604080516001600160a01b039092168252519081900360200190f35b34801561015b57600080fd5b5061011c6004803603602081101561017257600080fd5b50356001600160a01b03166103e1565b34801561018e57600080fd5b5061011c600480360360208110156101a557600080fd5b810190602081018135600160201b8111156101bf57600080fd5b8201836020820111156101d157600080fd5b803590602001918460208302840111600160201b831117156101f257600080fd5b50909250905061069e565b34801561020957600080fd5b5061011c6004803603602081101561022057600080fd5b50356001600160a01b0316610836565b34801561023c57600080fd5b5061011c6004803603602081101561025357600080fd5b810190602081018135600160201b81111561026d57600080fd5b82018360208201111561027f57600080fd5b803590602001918460208302840111600160201b831117156102a057600080fd5b50909250905061099a565b3480156102b757600080fd5b506102c06109d1565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102fc5781810151838201526020016102e4565b505050509050019250505060405180910390f35b34801561031c57600080fd5b50610133610a33565b34801561033157600080fd5b506103586004803603602081101561034857600080fd5b50356001600160a01b0316610a57565b604080519115158252519081900360200190f35b34801561037857600080fd5b50610133610a75565b60005b818110156103b8576103b083838381811061039b57fe5b905060200201356001600160a01b0316610a99565b600101610384565b505050565b7f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d2081565b7f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561043a57600080fd5b505afa15801561044e573d6000803e3d6000fd5b505050506040513d602081101561046457600080fd5b50516001600160a01b031633146104c2576040805162461bcd60e51b815260206004820152601d60248201527f477261537761704275796261636b3a204e4f545f4772615f4f574e4552000000604482015290519081900360640190fd5b6001600160a01b0381166105075760405162461bcd60e51b8152600401808060200182810382526024815260200180611cf26024913960400191505060405180910390fd5b7f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b0316816001600160a01b031614156105785760405162461bcd60e51b8152600401808060200182810382526024815260200180611c5f6024913960400191505060405180910390fd5b6001600160a01b03811660009081526020819052604090205460ff161561069b576001600160a01b0381166000908152602081905260409020805460ff191690556001546000190160025b8181101561066b57826001600160a01b0316600182815481106105e257fe5b6000918252602090912001546001600160a01b03161415610663576001828154811061060a57fe5b600091825260209091200154600180546001600160a01b03909216918390811061063057fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061066b565b6001016105c3565b50600180548061067757fe5b600082815260209020810160001990810180546001600160a01b0319169055019055505b50565b60005b818110156106d5576106cd8383838181106106b857fe5b905060200201356001600160a01b0316610e94565b6001016106a1565b5060007f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561074557600080fd5b505afa158015610759573d6000803e3d6000fd5b505050506040513d602081101561076f57600080fd5b505190508061077e5750610832565b7f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b03166342966c68826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156107e457600080fd5b505af11580156107f8573d6000803e3d6000fd5b50506040805184815290517fc9e9b6cb024bad68cf39c7bb3e54a5d864853aa41fad5d214bf548380c5d66539350908190036020019150a1505b5050565b7f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561088f57600080fd5b505afa1580156108a3573d6000803e3d6000fd5b505050506040513d60208110156108b957600080fd5b50516001600160a01b03163314610917576040805162461bcd60e51b815260206004820152601d60248201527f477261537761704275796261636b3a204e4f545f4772615f4f574e4552000000604482015290519081900360640190fd5b6001600160a01b03811660009081526020819052604090205460ff1661069b576001600160a01b03166000818152602081905260408120805460ff191660019081179091558054808201825591527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319169091179055565b60005b818110156103b8576109c98383838181106109b457fe5b905060200201356001600160a01b0316611696565b60010161099d565b60606001805480602002602001604051908101604052809291908181526020018280548015610a2957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a0b575b5050505050905090565b7f0000000000000000000000006b74e5c4137afd6a7dbd9d43c9d7af2a258e57a781565b6001600160a01b031660009081526020819052604090205460ff1690565b7f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a49281565b6000807f0000000000000000000000006b74e5c4137afd6a7dbd9d43c9d7af2a258e57a76001600160a01b031663c0225aa1846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050604080518083038186803b158015610b0857600080fd5b505afa158015610b1c573d6000803e3d6000fd5b505050506040513d6040811015610b3257600080fd5b50805160209091015190925090506001600160a01b038216151580610b5f57506001600160a01b03811615155b610bb0576040805162461bcd60e51b815260206004820152601c60248201527f477261537761704275796261636b3a20494e56414c49445f5041495200000000604482015290519081900360640190fd5b6000836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610bff57600080fd5b505afa158015610c13573d6000803e3d6000fd5b505050506040513d6020811015610c2957600080fd5b5051905080610c3a5750505061069b565b836001600160a01b031663095ea7b37f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a49260006040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610cb257600080fd5b505af1158015610cc6573d6000803e3d6000fd5b505050506040513d6020811015610cdc57600080fd5b50506040805163095ea7b360e01b81526001600160a01b037f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a492811660048301526024820184905291519186169163095ea7b3916044808201926020929091908290030181600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b505050506040513d6020811015610d7b57600080fd5b505060408051634b6497af60e11b81526001600160a01b038681166004830152602482018490526000604483018190526064830181905230608484015260001960a484015283517f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a492909216936396c92f5e9360c4808201949293918390030190829087803b158015610e0c57600080fd5b505af1158015610e20573d6000803e3d6000fd5b505050506040513d6040811015610e3657600080fd5b50506001600160a01b0380841660009081526020819052604080822054928516825290205460ff9182169116818015610e6d575080155b80610e7e575081158015610e7e5750805b15610e8c57610e8c86611696565b505050505050565b6000807f0000000000000000000000006b74e5c4137afd6a7dbd9d43c9d7af2a258e57a76001600160a01b031663c0225aa1846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050604080518083038186803b158015610f0357600080fd5b505afa158015610f17573d6000803e3d6000fd5b505050506040513d6040811015610f2d57600080fd5b50805160209091015190925090506001600160a01b038216151580610f5a57506001600160a01b03811615155b610fab576040805162461bcd60e51b815260206004820152601c60248201527f477261537761704275796261636b3a20494e56414c49445f5041495200000000604482015290519081900360640190fd5b7f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b0316826001600160a01b0316148061101c57507f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b0316816001600160a01b0316145b61106d576040805162461bcd60e51b815260206004820181905260248201527f477261537761704275796261636b3a20477261535f4e4f545f494e5f50414952604482015290519081900360640190fd5b60007f0000000000000000000000005a23b7e3bb936c7753b5e7a6c304a8fb43979d206001600160a01b0316836001600160a01b0316146110ae57826110b0565b815b6001600160a01b03811660009081526020819052604090205490915060ff1661110a5760405162461bcd60e51b8152600401808060200182810382526026815260200180611ca76026913960400191505060405180910390fd5b60408051600180825281830190925260609160208083019080368337019050509050848160008151811061113a57fe5b6001600160a01b039283166020918202929092010152821661131757478061116657505050505061069b565b7f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a4926001600160a01b031663a700026082600084600087306000196040518863ffffffff1660e01b815260040180876001600160a01b0316815260200186815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561121f578181015183820152602001611207565b505050509050019750505050505050506000604051808303818588803b15801561124857600080fd5b505af115801561125c573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052602081101561128657600080fd5b8101908080516040519392919084600160201b8211156112a557600080fd5b9083019060208201858111156112ba57600080fd5b82518660208202830111600160201b821117156112d657600080fd5b82525081516020918201928201910280838360005b838110156113035781810151838201526020016112eb565b50505050905001604052505050505061168f565b6000826001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561136657600080fd5b505afa15801561137a573d6000803e3d6000fd5b505050506040513d602081101561139057600080fd5b50519050806113a357505050505061069b565b826001600160a01b031663095ea7b37f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a49260006040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561141b57600080fd5b505af115801561142f573d6000803e3d6000fd5b505050506040513d602081101561144557600080fd5b50506040805163095ea7b360e01b81526001600160a01b037f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a492811660048301526024820184905291519185169163095ea7b3916044808201926020929091908290030181600087803b1580156114ba57600080fd5b505af11580156114ce573d6000803e3d6000fd5b505050506040513d60208110156114e457600080fd5b5050604051630538001360e51b81526001600160a01b038481166004830190815260248301849052600060448401819052306084850181905260001960a4860181905260c060648701908152885160c488015288517f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a4929096169663a7000260968b968a96958c95909490939192909160e40190602087810191028083838b5b8381101561159b578181015183820152602001611583565b50505050905001975050505050505050600060405180830381600087803b1580156115c557600080fd5b505af11580156115d9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561160257600080fd5b8101908080516040519392919084600160201b82111561162157600080fd5b90830190602082018581111561163657600080fd5b82518660208202830111600160201b8211171561165257600080fd5b82525081516020918201928201910280838360005b8381101561167f578181015183820152602001611667565b5050505090500160405250505050505b5050505050565b6000807f0000000000000000000000006b74e5c4137afd6a7dbd9d43c9d7af2a258e57a76001600160a01b031663c0225aa1846040518263ffffffff1660e01b815260040180826001600160a01b03168152602001915050604080518083038186803b15801561170557600080fd5b505afa158015611719573d6000803e3d6000fd5b505050506040513d604081101561172f57600080fd5b50805160209091015190925090506001600160a01b03821615158061175c57506001600160a01b03811615155b6117ad576040805162461bcd60e51b815260206004820152601c60248201527f477261537761704275796261636b3a20494e56414c49445f5041495200000000604482015290519081900360640190fd5b6001600160a01b038216600090815260208190526040812054819060ff1615611832576001600160a01b03831660009081526020819052604090205460ff16156118285760405162461bcd60e51b8152600401808060200182810382526024815260200180611c836024913960400191505060405180910390fd5b508290508161188f565b6001600160a01b03831660009081526020819052604090205460ff166118895760405162461bcd60e51b8152600401808060200182810382526025815260200180611ccd6025913960400191505060405180910390fd5b50819050825b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156118de57600080fd5b505afa1580156118f2573d6000803e3d6000fd5b505050506040513d602081101561190857600080fd5b505190508061191b57505050505061069b565b60408051600180825281830190925260609160208083019080368337019050509050868160008151811061194b57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050826001600160a01b031663095ea7b37f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a49260006040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156119e357600080fd5b505af11580156119f7573d6000803e3d6000fd5b505050506040513d6020811015611a0d57600080fd5b50506040805163095ea7b360e01b81526001600160a01b037f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a492811660048301526024820185905291519185169163095ea7b3916044808201926020929091908290030181600087803b158015611a8257600080fd5b505af1158015611a96573d6000803e3d6000fd5b505050506040513d6020811015611aac57600080fd5b5050604051630538001360e51b81526001600160a01b038481166004830190815260248301859052600060448401819052306084850181905260001960a4860181905260c060648701908152875160c488015287517f000000000000000000000000345a688369e60999f0f2567dc948dca620b9a4929096169663a7000260968b968b96958b95909490939192909160e40190602087810191028083838b5b83811015611b63578181015183820152602001611b4b565b50505050905001975050505050505050600060405180830381600087803b158015611b8d57600080fd5b505af1158015611ba1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611bca57600080fd5b8101908080516040519392919084600160201b821115611be957600080fd5b908301906020820185811115611bfe57600080fd5b82518660208202830111600160201b82111715611c1a57600080fd5b82525081516020918201928201910280838360005b83811015611c47578181015183820152602001611c2f565b50505050905001604052505050505050505050505056fe477261537761704275796261636b3a2052454d4f56455f4772615f46524f4d5f4d41494e477261537761704275796261636b3a20535741505f54574f5f4d41494e5f544f4b454e53477261537761704275796261636b3a204d41494e5f544f4b454e5f4e4f545f494e5f50414952477261537761704275796261636b3a20535741505f54574f5f4d494e4f525f544f4b454e53477261537761704275796261636b3a2052454d4f56455f4554485f46524f4d5f4d41494ea2646970667358221220f9e96d4764ac662468e627964c58aa4f71029b8294418677af84f3a8abbe97ab64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,773
0x4D2B9cC5072B2F812e0DACC0bCd169C6A0cf40b2
/** *Submitted for verification at Etherscan.io on 2021-11-15 */ /** *Submitted for verification at Etherscan.io on 2021-11-14 */ /** * * * SPDX-License-Identifier: UNLICENSED * */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Organic is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _bots; mapping (address => User) private trader; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode"Organic Growth Token"; string private constant _symbol = unicode"ORGANIC"; uint8 private constant _decimals = 9; uint256 private _taxFee = 4; uint256 private _teamFee = 6; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private _cooldownEnabled = true; bool private _communityMode = false; bool private inSwap = false; uint256 private _launchBlock = 0; uint256 private buyLimitEnd; // uint256 private consecutiveBuyCounter = 0; // uint256 private consecutiveSellCounter = 0; uint256 private _snipersTaxed = 0; uint256 private _impactMultiplier = 1000; struct User { uint256 buyCD; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function snipersTaxed() public view returns (uint256) { return _snipersTaxed; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { require(!_bots[from] && !_bots[to]); if(!trader[msg.sender].exists) { trader[msg.sender] = User(0,true); } uint256 totalFee = 10; // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if(block.number < _launchBlock + 3) { totalFee = 90; _snipersTaxed++; } else if(block.timestamp > _launchTime + (2 minutes)) { totalFee = 10; } else if (block.timestamp > _launchTime + (1 minutes)) { totalFee = 20; } else { totalFee = 40; } _taxFee = (totalFee).div(10); _teamFee = (totalFee.mul(9)).div(10); if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(trader[to].buyCD < block.timestamp, "Your buy cooldown has not expired."); trader[to].buyCD = block.timestamp + (45 seconds); } } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { //price impact based sell tax uint256 amountImpactMultiplier = amount.mul(_impactMultiplier); uint256 priceImpact = amountImpactMultiplier.div(balanceOf(uniswapV2Pair).add(amount)); if (priceImpact <= 10) { totalFee = 10; } else if (priceImpact >= 40) { totalFee = 40; } else if (priceImpact.mod(2) != 0) { totalFee = ++priceImpact; } else { totalFee = priceImpact; } _taxFee = (totalFee).div(10); _teamFee = (totalFee.mul(9)).div(10); //To limit big dumps by the contract before the sells if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(5).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(5).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to] || _communityMode){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 5000000000 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); tradingOpen = true; buyLimitEnd = block.timestamp + (20 seconds); _launchTime = block.timestamp; _launchBlock = block.number; } function setMarketingWallet (address payable marketingWalletAddress) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[_marketingWalletAddress] = false; _marketingWalletAddress = marketingWalletAddress; _isExcludedFromFee[marketingWalletAddress] = true; } function excludeFromFee (address payable ad) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[ad] = true; } function includeToFee (address payable ad) external { require(_msgSender() == _FeeAddress); _isExcludedFromFee[ad] = false; } function setBots(address[] memory bots_) public onlyOwner { //Cannot set bots after 30 minutes of launch time to ensure contract is SAFU without renounce as well if (block.timestamp < _launchTime + (30 minutes)) { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _bots[bots_[i]] = true; } } } } function delBot(address notbot) public onlyOwner { _bots[notbot] = false; } function isBot(address ad) public view returns (bool) { return _bots[ad]; } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - trader[buyer].buyCD; } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x60806040526004361061014f5760003560e01c806368a3a6a5116100b6578063a985ceef1161006f578063a985ceef146104b1578063b515566a146104dc578063c9567bf914610505578063cf0848f71461051c578063db92dbb614610545578063dd62ed3e1461057057610156565b806368a3a6a51461038d57806370a08231146103ca578063715018a6146104075780638da5cb5b1461041e57806395d89b4114610449578063a9059cbb1461047457610156565b8063313ce56711610108578063313ce5671461027f5780633bbac579146102aa5780633d75af99146102e7578063437823ec146103125780635932ead11461033b5780635d098b381461036457610156565b806306fdde031461015b578063095ea7b31461018657806318160ddd146101c357806323b872dd146101ee578063273123b71461022b57806327f3a72a1461025457610156565b3661015657005b600080fd5b34801561016757600080fd5b506101706105ad565b60405161017d9190613663565b60405180910390f35b34801561019257600080fd5b506101ad60048036038101906101a891906131af565b6105ea565b6040516101ba9190613648565b60405180910390f35b3480156101cf57600080fd5b506101d8610608565b6040516101e59190613805565b60405180910390f35b3480156101fa57600080fd5b5061021560048036038101906102109190613160565b610619565b6040516102229190613648565b60405180910390f35b34801561023757600080fd5b50610252600480360381019061024d91906130a9565b6106f2565b005b34801561026057600080fd5b506102696107e2565b6040516102769190613805565b60405180910390f35b34801561028b57600080fd5b506102946107f2565b6040516102a1919061387a565b60405180910390f35b3480156102b657600080fd5b506102d160048036038101906102cc91906130a9565b6107fb565b6040516102de9190613648565b60405180910390f35b3480156102f357600080fd5b506102fc610851565b6040516103099190613805565b60405180910390f35b34801561031e57600080fd5b50610339600480360381019061033491906130fb565b61085b565b005b34801561034757600080fd5b50610362600480360381019061035d919061322c565b610917565b005b34801561037057600080fd5b5061038b600480360381019061038691906130fb565b610a0f565b005b34801561039957600080fd5b506103b460048036038101906103af91906130a9565b610b86565b6040516103c19190613805565b60405180910390f35b3480156103d657600080fd5b506103f160048036038101906103ec91906130a9565b610bdd565b6040516103fe9190613805565b60405180910390f35b34801561041357600080fd5b5061041c610c2e565b005b34801561042a57600080fd5b50610433610d81565b604051610440919061357a565b60405180910390f35b34801561045557600080fd5b5061045e610daa565b60405161046b9190613663565b60405180910390f35b34801561048057600080fd5b5061049b600480360381019061049691906131af565b610de7565b6040516104a89190613648565b60405180910390f35b3480156104bd57600080fd5b506104c6610e05565b6040516104d39190613648565b60405180910390f35b3480156104e857600080fd5b5061050360048036038101906104fe91906131eb565b610e1c565b005b34801561051157600080fd5b5061051a6110b6565b005b34801561052857600080fd5b50610543600480360381019061053e91906130fb565b6115fd565b005b34801561055157600080fd5b5061055a6116b9565b6040516105679190613805565b60405180910390f35b34801561057c57600080fd5b5061059760048036038101906105929190613124565b6116eb565b6040516105a49190613805565b60405180910390f35b60606040518060400160405280601481526020017f4f7267616e69632047726f77746820546f6b656e000000000000000000000000815250905090565b60006105fe6105f7611772565b848461177a565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610626848484611945565b6106e784610632611772565b6106e285604051806060016040528060288152602001613fbe60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610698611772565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122e79092919063ffffffff16565b61177a565b600190509392505050565b6106fa611772565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610787576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077e90613745565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006107ed30610bdd565b905090565b60006009905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000601654905090565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661089c611772565b73ffffffffffffffffffffffffffffffffffffffff16146108bc57600080fd5b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61091f611772565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a390613745565b60405180910390fd5b80601360156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601360159054906101000a900460ff16604051610a049190613648565b60405180910390a150565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a50611772565b73ffffffffffffffffffffffffffffffffffffffff1614610a7057600080fd5b600060056000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610bd69190613a1c565b9050919050565b6000610c27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461234b565b9050919050565b610c36611772565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cba90613745565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4f5247414e494300000000000000000000000000000000000000000000000000815250905090565b6000610dfb610df4611772565b8484611945565b6001905092915050565b6000601360159054906101000a900460ff16905090565b610e24611772565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea890613745565b60405180910390fd5b610708600c54610ec1919061393b565b4210156110b35760005b81518110156110b157601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610f46577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156110005750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610fdf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b1561109e57600160066000848481518110611044577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80806110a990613b2d565b915050610ecb565b505b50565b6110be611772565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461114b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114290613745565b60405180910390fd5b601360149054906101000a900460ff161561119b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611192906137c5565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061122b30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061177a565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561127157600080fd5b505afa158015611285573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a991906130d2565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561130b57600080fd5b505afa15801561131f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134391906130d2565b6040518363ffffffff1660e01b8152600401611360929190613595565b602060405180830381600087803b15801561137a57600080fd5b505af115801561138e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b291906130d2565b601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061143b30610bdd565b600080611446610d81565b426040518863ffffffff1660e01b8152600401611468969594939291906135e7565b6060604051808303818588803b15801561148157600080fd5b505af1158015611495573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906114ba919061327e565b505050674563918244f40000600f81905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161156b9291906135be565b602060405180830381600087803b15801561158557600080fd5b505af1158015611599573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115bd9190613255565b506001601360146101000a81548160ff0219169083151502179055506014426115e6919061393b565b60158190555042600c819055504360148190555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661163e611772565b73ffffffffffffffffffffffffffffffffffffffff161461165e57600080fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006116e6601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610bdd565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156117ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e1906137a5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561185a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611851906136c5565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516119389190613805565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ac90613785565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1c90613685565b60405180910390fd5b60008111611a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5f90613765565b60405180910390fd5b611a70610d81565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ade5750611aae610d81565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561220d57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b875750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b9057600080fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff16611c6a5760405180604001604052806000815260200160011515815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff0219169083151502179055509050505b6000600a9050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611d1b5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d715750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611f9057601360149054906101000a900460ff16611dc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dbc906137e5565b60405180910390fd5b6003601454611dd4919061393b565b431015611dfc57605a905060166000815480929190611df290613b2d565b9190505550611e41565b6078600c54611e0b919061393b565b421115611e1b57600a9050611e40565b603c600c54611e2a919061393b565b421115611e3a5760149050611e3f565b602890505b5b5b611e55600a826123b990919063ffffffff16565b600a81905550611e82600a611e7460098461240390919063ffffffff16565b6123b990919063ffffffff16565b600b81905550601360159054906101000a900460ff1615611f8f57426015541115611f8e57600f54821115611eb657600080fd5b42600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611f3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f31906136e5565b60405180910390fd5b602d42611f47919061393b565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b5b6000611f9b30610bdd565b9050601360179054906101000a900460ff161580156120085750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b80156120205750601360149054906101000a900460ff165b1561220a57600061203c6017548561240390919063ffffffff16565b9050600061208f61208086612072601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610bdd565b61247e90919063ffffffff16565b836123b990919063ffffffff16565b9050600a81116120a257600a93506120e8565b602881106120b357602893506120e7565b60006120c96002836124dc90919063ffffffff16565b146120e257806120d890613b2d565b90508093506120e6565b8093505b5b5b6120fc600a856123b990919063ffffffff16565b600a81905550612129600a61211b60098761240390919063ffffffff16565b6123b990919063ffffffff16565b600b8190555060008311156121ee57612189606461217b600561216d601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610bdd565b61240390919063ffffffff16565b6123b990919063ffffffff16565b8311156121e4576121e160646121d360056121c5601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610bdd565b61240390919063ffffffff16565b6123b990919063ffffffff16565b92505b6121ed83612526565b5b600047905060008111156122065761220547612820565b5b5050505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122b45750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806122cb5750601360169054906101000a900460ff165b156122d557600090505b6122e18484848461291b565b50505050565b600083831115829061232f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123269190613663565b60405180910390fd5b506000838561233e9190613a1c565b9050809150509392505050565b6000600854821115612392576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612389906136a5565b60405180910390fd5b600061239c612948565b90506123b181846123b990919063ffffffff16565b915050919050565b60006123fb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612973565b905092915050565b6000808314156124165760009050612478565b6000828461242491906139c2565b90508284826124339190613991565b14612473576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246a90613725565b60405180910390fd5b809150505b92915050565b600080828461248d919061393b565b9050838110156124d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c990613705565b60405180910390fd5b8091505092915050565b600061251e83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506129d6565b905092915050565b6001601360176101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612584577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156125b25781602001602082028036833780820191505090505b50905030816000815181106125f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561269257600080fd5b505afa1580156126a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ca91906130d2565b81600181518110612704577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061276b30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461177a565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016127cf959493929190613820565b600060405180830381600087803b1580156127e957600080fd5b505af11580156127fd573d6000803e3d6000fd5b50505050506000601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6128706002846123b990919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561289b573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6128ec6002846123b990919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612917573d6000803e3d6000fd5b5050565b8061292957612928612a34565b5b612934848484612a77565b8061294257612941612c42565b5b50505050565b6000806000612955612c56565b9150915061296c81836123b990919063ffffffff16565b9250505090565b600080831182906129ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129b19190613663565b60405180910390fd5b50600083856129c99190613991565b9050809150509392505050565b6000808314158290612a1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a159190613663565b60405180910390fd5b508284612a2b9190613b76565b90509392505050565b6000600a54148015612a4857506000600b54145b15612a5257612a75565b600a54600d81905550600b54600e819055506000600a819055506000600b819055505b565b600080600080600080612a8987612cb8565b955095509550955095509550612ae786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d2090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612b7c85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247e90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612bc881612d6a565b612bd28483612e27565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612c2f9190613805565b60405180910390a3505050505050505050565b600d54600a81905550600e54600b81905550565b600080600060085490506000683635c9adc5dea000009050612c8c683635c9adc5dea000006008546123b990919063ffffffff16565b821015612cab57600854683635c9adc5dea00000935093505050612cb4565b81819350935050505b9091565b6000806000806000806000806000612cd58a600a54600b54612e61565b9250925092506000612ce5612948565b90506000806000612cf88e878787612ef7565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612d6283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122e7565b905092915050565b6000612d74612948565b90506000612d8b828461240390919063ffffffff16565b9050612ddf81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461247e90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612e3c82600854612d2090919063ffffffff16565b600881905550612e578160095461247e90919063ffffffff16565b6009819055505050565b600080600080612e8d6064612e7f888a61240390919063ffffffff16565b6123b990919063ffffffff16565b90506000612eb76064612ea9888b61240390919063ffffffff16565b6123b990919063ffffffff16565b90506000612ee082612ed2858c612d2090919063ffffffff16565b612d2090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612f10858961240390919063ffffffff16565b90506000612f27868961240390919063ffffffff16565b90506000612f3e878961240390919063ffffffff16565b90506000612f6782612f598587612d2090919063ffffffff16565b612d2090919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000612f93612f8e846138ba565b613895565b90508083825260208201905082856020860282011115612fb257600080fd5b60005b85811015612fe25781612fc88882612fec565b845260208401935060208301925050600181019050612fb5565b5050509392505050565b600081359050612ffb81613f61565b92915050565b60008151905061301081613f61565b92915050565b60008135905061302581613f78565b92915050565b600082601f83011261303c57600080fd5b813561304c848260208601612f80565b91505092915050565b60008135905061306481613f8f565b92915050565b60008151905061307981613f8f565b92915050565b60008135905061308e81613fa6565b92915050565b6000815190506130a381613fa6565b92915050565b6000602082840312156130bb57600080fd5b60006130c984828501612fec565b91505092915050565b6000602082840312156130e457600080fd5b60006130f284828501613001565b91505092915050565b60006020828403121561310d57600080fd5b600061311b84828501613016565b91505092915050565b6000806040838503121561313757600080fd5b600061314585828601612fec565b925050602061315685828601612fec565b9150509250929050565b60008060006060848603121561317557600080fd5b600061318386828701612fec565b935050602061319486828701612fec565b92505060406131a58682870161307f565b9150509250925092565b600080604083850312156131c257600080fd5b60006131d085828601612fec565b92505060206131e18582860161307f565b9150509250929050565b6000602082840312156131fd57600080fd5b600082013567ffffffffffffffff81111561321757600080fd5b6132238482850161302b565b91505092915050565b60006020828403121561323e57600080fd5b600061324c84828501613055565b91505092915050565b60006020828403121561326757600080fd5b60006132758482850161306a565b91505092915050565b60008060006060848603121561329357600080fd5b60006132a186828701613094565b93505060206132b286828701613094565b92505060406132c386828701613094565b9150509250925092565b60006132d983836132e5565b60208301905092915050565b6132ee81613a50565b82525050565b6132fd81613a50565b82525050565b600061330e826138f6565b6133188185613919565b9350613323836138e6565b8060005b8381101561335457815161333b88826132cd565b97506133468361390c565b925050600181019050613327565b5085935050505092915050565b61336a81613a74565b82525050565b61337981613ab7565b82525050565b600061338a82613901565b613394818561392a565b93506133a4818560208601613ac9565b6133ad81613c34565b840191505092915050565b60006133c560238361392a565b91506133d082613c45565b604082019050919050565b60006133e8602a8361392a565b91506133f382613c94565b604082019050919050565b600061340b60228361392a565b915061341682613ce3565b604082019050919050565b600061342e60228361392a565b915061343982613d32565b604082019050919050565b6000613451601b8361392a565b915061345c82613d81565b602082019050919050565b600061347460218361392a565b915061347f82613daa565b604082019050919050565b600061349760208361392a565b91506134a282613df9565b602082019050919050565b60006134ba60298361392a565b91506134c582613e22565b604082019050919050565b60006134dd60258361392a565b91506134e882613e71565b604082019050919050565b600061350060248361392a565b915061350b82613ec0565b604082019050919050565b600061352360178361392a565b915061352e82613f0f565b602082019050919050565b600061354660188361392a565b915061355182613f38565b602082019050919050565b61356581613aa0565b82525050565b61357481613aaa565b82525050565b600060208201905061358f60008301846132f4565b92915050565b60006040820190506135aa60008301856132f4565b6135b760208301846132f4565b9392505050565b60006040820190506135d360008301856132f4565b6135e0602083018461355c565b9392505050565b600060c0820190506135fc60008301896132f4565b613609602083018861355c565b6136166040830187613370565b6136236060830186613370565b61363060808301856132f4565b61363d60a083018461355c565b979650505050505050565b600060208201905061365d6000830184613361565b92915050565b6000602082019050818103600083015261367d818461337f565b905092915050565b6000602082019050818103600083015261369e816133b8565b9050919050565b600060208201905081810360008301526136be816133db565b9050919050565b600060208201905081810360008301526136de816133fe565b9050919050565b600060208201905081810360008301526136fe81613421565b9050919050565b6000602082019050818103600083015261371e81613444565b9050919050565b6000602082019050818103600083015261373e81613467565b9050919050565b6000602082019050818103600083015261375e8161348a565b9050919050565b6000602082019050818103600083015261377e816134ad565b9050919050565b6000602082019050818103600083015261379e816134d0565b9050919050565b600060208201905081810360008301526137be816134f3565b9050919050565b600060208201905081810360008301526137de81613516565b9050919050565b600060208201905081810360008301526137fe81613539565b9050919050565b600060208201905061381a600083018461355c565b92915050565b600060a082019050613835600083018861355c565b6138426020830187613370565b81810360408301526138548186613303565b905061386360608301856132f4565b613870608083018461355c565b9695505050505050565b600060208201905061388f600083018461356b565b92915050565b600061389f6138b0565b90506138ab8282613afc565b919050565b6000604051905090565b600067ffffffffffffffff8211156138d5576138d4613c05565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061394682613aa0565b915061395183613aa0565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561398657613985613ba7565b5b828201905092915050565b600061399c82613aa0565b91506139a783613aa0565b9250826139b7576139b6613bd6565b5b828204905092915050565b60006139cd82613aa0565b91506139d883613aa0565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613a1157613a10613ba7565b5b828202905092915050565b6000613a2782613aa0565b9150613a3283613aa0565b925082821015613a4557613a44613ba7565b5b828203905092915050565b6000613a5b82613a80565b9050919050565b6000613a6d82613a80565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613ac282613aa0565b9050919050565b60005b83811015613ae7578082015181840152602081019050613acc565b83811115613af6576000848401525b50505050565b613b0582613c34565b810181811067ffffffffffffffff82111715613b2457613b23613c05565b5b80604052505050565b6000613b3882613aa0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613b6b57613b6a613ba7565b5b600182019050919050565b6000613b8182613aa0565b9150613b8c83613aa0565b925082613b9c57613b9b613bd6565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b613f6a81613a50565b8114613f7557600080fd5b50565b613f8181613a62565b8114613f8c57600080fd5b50565b613f9881613a74565b8114613fa357600080fd5b50565b613faf81613aa0565b8114613fba57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f2c6844825788c0975905237883dc643c2f54e93125c3be25658205123cf31cd64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,774
0x50f90bd2053db1fd57f656aa027714b2bbb96b2e
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } contract Claimable is Ownable { address public pendingOwner; modifier onlyPendingOwner() { require(msg.sender == pendingOwner); _; } function transferOwnership(address newOwner) onlyOwner public { pendingOwner = newOwner; } function claimOwnership() onlyPendingOwner public { emit OwnershipTransferred(owner, pendingOwner); owner = pendingOwner; pendingOwner = address(0); } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { return totalSupply_; } function transfer(address _to, uint256 _value) public returns (bool) { require(_value <= balances[msg.sender]); require(_to != address(0)); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); require(_to != address(0)); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue >= oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { require(token.transfer(to, value)); } function safeTransferFrom( ERC20 token, address from, address to, uint256 value ) internal { require(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { require(token.approve(spender, value)); } } contract CanReclaimToken is Ownable { using SafeERC20 for ERC20Basic; function reclaimToken(ERC20Basic token) external onlyOwner { uint256 balance = token.balanceOf(this); token.safeTransfer(owner, balance); } } contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); function burn(uint256 _value) public { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } library Roles { struct Role { mapping (address => bool) bearer; } function add(Role storage role, address addr) internal { role.bearer[addr] = true; } function remove(Role storage role, address addr) internal { role.bearer[addr] = false; } function check(Role storage role, address addr) view internal { require(has(role, addr)); } function has(Role storage role, address addr) view internal returns (bool) { return role.bearer[addr]; } } contract RBAC { using Roles for Roles.Role; mapping (string => Roles.Role) private roles; event RoleAdded(address indexed operator, string role); event RoleRemoved(address indexed operator, string role); function checkRole(address _operator, string _role) view public { roles[_role].check(_operator); } function hasRole(address _operator, string _role) view public returns (bool) { return roles[_role].has(_operator); } function addRole(address _operator, string _role) internal { roles[_role].add(_operator); emit RoleAdded(_operator, _role); } function removeRole(address _operator, string _role) internal { roles[_role].remove(_operator); emit RoleRemoved(_operator, _role); } modifier onlyRole(string _role) { checkRole(msg.sender, _role); _; } } contract Whitelist is Ownable, RBAC { string public constant ROLE_WHITELISTED = "whitelist"; modifier onlyIfWhitelisted(address _operator) { checkRole(_operator, ROLE_WHITELISTED); _; } function addAddressToWhitelist(address _operator) onlyOwner public { addRole(_operator, ROLE_WHITELISTED); } function whitelist(address _operator) public view returns (bool) { return hasRole(_operator, ROLE_WHITELISTED); } function addAddressesToWhitelist(address[] _operators) onlyOwner public { for (uint256 i = 0; i < _operators.length; i++) { addAddressToWhitelist(_operators[i]); } } function removeAddressFromWhitelist(address _operator) onlyOwner public { removeRole(_operator, ROLE_WHITELISTED); } function removeAddressesFromWhitelist(address[] _operators) onlyOwner public { for (uint256 i = 0; i < _operators.length; i++) { removeAddressFromWhitelist(_operators[i]); } } } contract DateKernel { uint256 public unlockTime; constructor(uint256 _time) public { unlockTime = _time; } function determineDate() internal view returns (uint256 v) { uint256 n = now; uint256 ut = unlockTime; uint256 mo = 30 * 1 days; uint8 p = 10; assembly { if sgt(n, ut) { if or(slt(sub(n, ut), mo), eq(sub(n, ut), mo)) { v := 1 } if sgt(sub(n, ut), mo) { v := add(div(sub(n, ut), mo), 1) } if or(eq(v, p), sgt(v, p)) { v := p } } } } } contract Distributable is StandardToken, Ownable, Whitelist, DateKernel { using SafeMath for uint; event Distributed(uint256 amount); event MemberUpdated(address member, uint256 balance); struct member { uint256 lastWithdrawal; uint256 tokensTotal; uint256 tokensLeft; } mapping (address => member) public teams; function _transfer(address _from, address _to, uint256 _value) private returns (bool) { require(_value <= balances[_from]); require(_to != address(0)); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(_from, _to, _value); return true; } function updateMember(address _who, uint256 _last, uint256 _total, uint256 _left) internal returns (bool) { teams[_who] = member(_last, _total, _left); emit MemberUpdated(_who, _left); return true; } function airdrop(address[] dests, uint256[] values) public onlyOwner { require(dests.length == values.length); for (uint256 i = 0; i < dests.length; i++) { transfer(dests[i], values[i]); } } function distributeTokens(address[] _member, uint256[] _amount) onlyOwner public returns (bool) { require(_member.length == _amount.length); for (uint256 i = 0; i < _member.length; i++) { updateMember(_member[i], 0, _amount[i], _amount[i]); addAddressToWhitelist(_member[i]); } emit Distributed(_member.length); return true; } function rewardController(address _member) internal returns (uint256) { member storage mbr = teams[_member]; require(mbr.tokensLeft > 0, "You&#39;ve spent your share"); uint256 multiplier; uint256 callback; uint256 curDate = determineDate(); uint256 lastDate = mbr.lastWithdrawal; if(curDate > lastDate) { multiplier = curDate.sub(lastDate); } else if(curDate == lastDate) { revert("Its no time"); } if(mbr.tokensTotal >= mbr.tokensLeft && mbr.tokensTotal > 0) { if(curDate == 10) { callback = mbr.tokensLeft; } else { callback = multiplier.mul((mbr.tokensTotal).div(10)); } } updateMember( _member, curDate, mbr.tokensTotal, mbr.tokensLeft.sub(callback) ); return callback; } function getDistributedToken() public onlyIfWhitelisted(msg.sender) returns(bool) { require(unlockTime > now); uint256 amount = rewardController(msg.sender); _transfer(this, msg.sender, amount); return true; } } contract NTOKTokenContract is Distributable, BurnableToken, CanReclaimToken, Claimable { string public name; string public symbol; uint8 public decimals; uint256 public INITIAL_SUPPLY; constructor() public DateKernel(1541030400) { name = "NTOK Token Contract"; symbol = "NTOK"; decimals = 18; INITIAL_SUPPLY = 33000000 * 10 ** uint256(decimals); totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(address(0), msg.sender, INITIAL_SUPPLY); } function() external { revert("Does not accept ether"); } }
0x6080604052600436106101955763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610209578063095ea7b3146102935780630988ca8c146102cb57806317ffc3201461033457806318160ddd1461035557806318b919e91461037c578063217fe6c61461039157806323b872dd146103f857806324953eaa14610422578063251c1aa31461047757806327d6ba211461048c578063286dd3f5146104a15780632ff2e9dc146104c2578063313ce567146104d757806342966c68146105025780634bd09c2a1461051a5780634e71e0c8146105a857806366188463146105bd57806367243482146105e157806370a082311461066f578063715018a6146106905780637b9417c8146106a55780638da5cb5b146106c657806395d89b41146106f75780639b19251a1461070c578063a9059cbb1461072d578063c458324014610751578063d73dd62314610790578063dd62ed3e146107b4578063e2ec6ec3146107db578063e30c397814610830578063f2fde38b14610845575b3480156101a157600080fd5b50604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f446f6573206e6f74206163636570742065746865720000000000000000000000604482015290519081900360640190fd5b34801561021557600080fd5b5061021e610866565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610258578181015183820152602001610240565b50505050905090810190601f1680156102855780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029f57600080fd5b506102b7600160a060020a03600435166024356108f4565b604080519115158252519081900360200190f35b3480156102d757600080fd5b5060408051602060046024803582810135601f8101859004850286018501909652858552610332958335600160a060020a031695369560449491939091019190819084018382808284375094975061095b9650505050505050565b005b34801561034057600080fd5b50610332600160a060020a03600435166109c9565b34801561036157600080fd5b5061036a610a93565b60408051918252519081900360200190f35b34801561038857600080fd5b5061021e610a99565b34801561039d57600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526102b7958335600160a060020a0316953695604494919390910191908190840183828082843750949750610abe9650505050505050565b34801561040457600080fd5b506102b7600160a060020a0360043581169060243516604435610b31565b34801561042e57600080fd5b506040805160206004803580820135838102808601850190965280855261033295369593946024949385019291829185019084908082843750949750610c949650505050505050565b34801561048357600080fd5b5061036a610ce3565b34801561049857600080fd5b506102b7610ce9565b3480156104ad57600080fd5b50610332600160a060020a0360043516610d48565b3480156104ce57600080fd5b5061036a610d8f565b3480156104e357600080fd5b506104ec610d95565b6040805160ff9092168252519081900360200190f35b34801561050e57600080fd5b50610332600435610d9e565b34801561052657600080fd5b50604080516020600480358082013583810280860185019096528085526102b795369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a998901989297509082019550935083925085019084908082843750949750610da89650505050505050565b3480156105b457600080fd5b50610332610e98565b3480156105c957600080fd5b506102b7600160a060020a0360043516602435610f22565b3480156105ed57600080fd5b506040805160206004803580820135838102808601850190965280855261033295369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506110119650505050505050565b34801561067b57600080fd5b5061036a600160a060020a036004351661108c565b34801561069c57600080fd5b506103326110a7565b3480156106b157600080fd5b50610332600160a060020a0360043516611115565b3480156106d257600080fd5b506106db611159565b60408051600160a060020a039092168252519081900360200190f35b34801561070357600080fd5b5061021e611168565b34801561071857600080fd5b506102b7600160a060020a03600435166111c3565b34801561073957600080fd5b506102b7600160a060020a03600435166024356111f2565b34801561075d57600080fd5b50610772600160a060020a03600435166112bf565b60408051938452602084019290925282820152519081900360600190f35b34801561079c57600080fd5b506102b7600160a060020a03600435166024356112e0565b3480156107c057600080fd5b5061036a600160a060020a0360043581169060243516611379565b3480156107e757600080fd5b5060408051602060048035808201358381028086018501909652808552610332953695939460249493850192918291850190849080828437509497506113a49650505050505050565b34801561083c57600080fd5b506106db6113e4565b34801561085157600080fd5b50610332600160a060020a03600435166113f3565b6008805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108ec5780601f106108c1576101008083540402835291602001916108ec565b820191906000526020600020905b8154815290600101906020018083116108cf57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b6109c5826004836040518082805190602001908083835b602083106109915780518252601f199092019160209182019101610972565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050611439565b5050565b600354600090600160a060020a031633146109e357600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038416916370a082319160248083019260209291908290030181600087803b158015610a4457600080fd5b505af1158015610a58573d6000803e3d6000fd5b505050506040513d6020811015610a6e57600080fd5b50516003549091506109c590600160a060020a0384811691168363ffffffff61144e16565b60015490565b6040805180820190915260098152600080516020611c1c833981519152602082015281565b6000610b2a836004846040518082805190602001908083835b60208310610af65780518252601f199092019160209182019101610ad7565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050611501565b9392505050565b600160a060020a038316600090815260208190526040812054821115610b5657600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610b8657600080fd5b600160a060020a0383161515610b9b57600080fd5b600160a060020a038416600090815260208190526040902054610bc4908363ffffffff61152016565b600160a060020a038086166000908152602081905260408082209390935590851681522054610bf9908363ffffffff61153216565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610c3b908363ffffffff61152016565b600160a060020a0380861660008181526002602090815260408083203384528252918290209490945580518681529051928716939192600080516020611c3c833981519152929181900390910190a35060019392505050565b600354600090600160a060020a03163314610cae57600080fd5b5060005b81518110156109c557610cdb8282815181101515610ccc57fe5b90602001906020020151610d48565b600101610cb2565b60055481565b60008033610d1a81604080519081016040528060098152602001600080516020611c1c83398151915281525061095b565b6005544210610d2857600080fd5b610d313361153f565b9150610d3e303384611700565b5060019250505090565b600354600160a060020a03163314610d5f57600080fd5b610d8c81604080519081016040528060098152602001600080516020611c1c8339815191528152506117e5565b50565b600b5481565b600a5460ff1681565b610d8c33826118f6565b6003546000908190600160a060020a03163314610dc457600080fd5b8251845114610dd257600080fd5b5060005b8351811015610e5a57610e318482815181101515610df057fe5b9060200190602002015160008584815181101515610e0a57fe5b906020019060200201518685815181101515610e2257fe5b906020019060200201516119e5565b50610e528482815181101515610e4357fe5b90602001906020020151611115565b600101610dd6565b835160408051918252517fddc9c30275a04c48091f24199f9c405765de34d979d6847f5b9798a57232d2e59181900360200190a15060019392505050565b600754600160a060020a03163314610eaf57600080fd5b600754600354604051600160a060020a0392831692909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600780546003805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b336000908152600260209081526040808320600160a060020a0386168452909152812054808310610f7657336000908152600260209081526040808320600160a060020a0388168452909152812055610fab565b610f86818463ffffffff61152016565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600354600090600160a060020a0316331461102b57600080fd5b815183511461103957600080fd5b5060005b82518110156110875761107e838281518110151561105757fe5b90602001906020020151838381518110151561106f57fe5b906020019060200201516111f2565b5060010161103d565b505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031633146110be57600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a0316331461112c57600080fd5b610d8c81604080519081016040528060098152602001600080516020611c1c833981519152815250611a6e565b600354600160a060020a031681565b6009805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108ec5780601f106108c1576101008083540402835291602001916108ec565b600061095582604080519081016040528060098152602001600080516020611c1c833981519152815250610abe565b3360009081526020819052604081205482111561120e57600080fd5b600160a060020a038316151561122357600080fd5b33600090815260208190526040902054611243908363ffffffff61152016565b3360009081526020819052604080822092909255600160a060020a03851681522054611275908363ffffffff61153216565b600160a060020a03841660008181526020818152604091829020939093558051858152905191923392600080516020611c3c8339815191529281900390910190a350600192915050565b60066020526000908152604090208054600182015460029092015490919083565b336000908152600260209081526040808320600160a060020a0386168452909152812054611314908363ffffffff61153216565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600090600160a060020a031633146113be57600080fd5b5060005b81518110156109c5576113dc8282815181101515610e4357fe5b6001016113c2565b600754600160a060020a031681565b600354600160a060020a0316331461140a57600080fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6114438282611501565b15156109c557600080fd5b82600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1580156114ca57600080fd5b505af11580156114de573d6000803e3d6000fd5b505050506040513d60208110156114f457600080fd5b5051151561108757600080fd5b600160a060020a03166000908152602091909152604090205460ff1690565b60008282111561152c57fe5b50900390565b8181018281101561095557fe5b600160a060020a03811660009081526006602052604081206002810154829081908190819081106115d157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f596f75277665207370656e7420796f7572207368617265000000000000000000604482015290519081900360640190fd5b6115d9611b40565b85549092509050808211156115ff576115f8828263ffffffff61152016565b935061166e565b8082141561166e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f497473206e6f2074696d65000000000000000000000000000000000000000000604482015290519081900360640190fd5b846002015485600101541015801561168a575060008560010154115b156116ce5781600a14156116a457846002015492506116ce565b60018501546116cb906116be90600a63ffffffff611b9616565b859063ffffffff611bab16565b92505b6116f4878387600101546116ef878a6002015461152090919063ffffffff16565b6119e5565b50919695505050505050565b600160a060020a03831660009081526020819052604081205482111561172557600080fd5b600160a060020a038316151561173a57600080fd5b600160a060020a038416600090815260208190526040902054611763908363ffffffff61152016565b600160a060020a038086166000908152602081905260408082209390935590851681522054611798908363ffffffff61153216565b600160a060020a03808516600081815260208181526040918290209490945580518681529051919392881692600080516020611c3c83398151915292918290030190a35060019392505050565b61184f826004836040518082805190602001908083835b6020831061181b5780518252601f1990920191602091820191016117fc565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050611bd4565b81600160a060020a03167fd211483f91fc6eff862467f8de606587a30c8fc9981056f051b897a418df803a826040518080602001828103825283818151815260200191508051906020019080838360005b838110156118b85781810151838201526020016118a0565b50505050905090810190601f1680156118e55780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b600160a060020a03821660009081526020819052604090205481111561191b57600080fd5b600160a060020a038216600090815260208190526040902054611944908263ffffffff61152016565b600160a060020a038316600090815260208190526040902055600154611970908263ffffffff61152016565b600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a03851691600080516020611c3c8339815191529181900360200190a35050565b604080516060810182528481526020808201858152828401858152600160a060020a038916600081815260068552868120955186559251600186015590516002909401939093558351928352908201849052825190927f721b01fe9b63fefb91c981e165c04d96058511dc990901f8d80c37dd2f6f695e928290030190a1506001949350505050565b611ad8826004836040518082805190602001908083835b60208310611aa45780518252601f199092019160209182019101611a85565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922092915050611bf6565b81600160a060020a03167fbfec83d64eaa953f2708271a023ab9ee82057f8f3578d548c1a4ba0b5b70048982604051808060200182810382528381815181526020019150805190602001908083836000838110156118b85781810151838201526020016118a0565b600554600090429062278d00600a82841315611b8f578284038281129083141715611b6a57600194505b818385031315611b7f57600182848603040194505b8085138186141715611b8f578094505b5050505090565b60008183811515611ba357fe5b049392505050565b6000821515611bbc57506000610955565b50818102818382811515611bcc57fe5b041461095557fe5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a0316600090815260209190915260409020805460ff19166001179055560077686974656c6973740000000000000000000000000000000000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058202d1ab0b4db07b4b323daf78367917d789e8f1b2ae3c45f194bf783badb7883650029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
9,775
0x3047a6D7807c98bf6385B10B89c32cad13076Ebc
/** *Submitted for verification at Etherscan.io on 2022-03-15 */ /* t.me/smallstoken */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract smallstoken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100 * 1e11 * 1e9; //10,000,000,000,000 uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "Killing Me Smalls"; string private constant _symbol = "SMALLS"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _firstBlock; uint256 private _botBlocks; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(0xC01f57bD3f73C6f2B1a81272F54C36a442afaFE8); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(amount > 0, "Transfer amount must be greater than zero"); if (from == uniswapV2Pair && to != address(uniswapV2Router)) { if (block.number <= _firstBlock.add(_botBlocks)) { bots[to] = true; } } if (from != address(this) && bots[to]) { _feeAddr1 = 0; _feeAddr2 = 90; } else if (from != address(this) && !bots[from] && !bots[to]) { _feeAddr1 = 1; _feeAddr2 = 9; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 100 * 1e10 * 1e9) { //10000 sendETHToFee(address(this).balance); } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function liftMaxTx() external onlyOwner{ _maxTxAmount = _tTotal; } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading(uint256 botBlocks) external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; _firstBlock = block.number; _botBlocks = botBlocks; cooldownEnabled = true; _maxTxAmount = 200 * 1e10 * 1e9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external onlyOwner{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external onlyOwner{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100ec5760003560e01c80636fc3eaec1161008a578063a9059cbb11610059578063a9059cbb1461029a578063c3c8cd80146102ba578063d1633649146102cf578063dd62ed3e146102ef57600080fd5b80636fc3eaec1461020e57806370a08231146102235780638da5cb5b1461024357806395d89b411461026b57600080fd5b806323b872dd116100c657806323b872dd1461019b5780632ab30838146101bb578063313ce567146101d25780635932ead1146101ee57600080fd5b806306fdde03146100f8578063095ea7b31461014457806318160ddd1461017457600080fd5b366100f357005b600080fd5b34801561010457600080fd5b506040805180820190915260118152704b696c6c696e67204d6520536d616c6c7360781b60208201525b60405161013b91906114a2565b60405180910390f35b34801561015057600080fd5b5061016461015f3660046113f5565b610335565b604051901515815260200161013b565b34801561018057600080fd5b5069021e19e0c9bab24000005b60405190815260200161013b565b3480156101a757600080fd5b506101646101b63660046113b4565b61034c565b3480156101c757600080fd5b506101d06103b5565b005b3480156101de57600080fd5b506040516009815260200161013b565b3480156101fa57600080fd5b506101d0610209366004611421565b6103f8565b34801561021a57600080fd5b506101d0610440565b34801561022f57600080fd5b5061018d61023e366004611341565b610477565b34801561024f57600080fd5b506000546040516001600160a01b03909116815260200161013b565b34801561027757600080fd5b50604080518082019091526006815265534d414c4c5360d01b602082015261012e565b3480156102a657600080fd5b506101646102b53660046113f5565b610499565b3480156102c657600080fd5b506101d06104a6565b3480156102db57600080fd5b506101d06102ea36600461145b565b6104e6565b3480156102fb57600080fd5b5061018d61030a36600461137b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103423384846108b9565b5060015b92915050565b60006103598484846109dd565b6103ab84336103a68560405180606001604052806028815260200161165d602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610c53565b6108b9565b5060019392505050565b6000546001600160a01b031633146103e85760405162461bcd60e51b81526004016103df906114f7565b60405180910390fd5b69021e19e0c9bab2400000601155565b6000546001600160a01b031633146104225760405162461bcd60e51b81526004016103df906114f7565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b0316331461046a5760405162461bcd60e51b81526004016103df906114f7565b4761047481610c8d565b50565b6001600160a01b03811660009081526002602052604081205461034690610ccb565b60006103423384846109dd565b6000546001600160a01b031633146104d05760405162461bcd60e51b81526004016103df906114f7565b60006104db30610477565b905061047481610d4f565b6000546001600160a01b031633146105105760405162461bcd60e51b81526004016103df906114f7565b600e54600160a01b900460ff161561056a5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103df565b600d80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556105a8308269021e19e0c9bab24000006108b9565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156105e157600080fd5b505afa1580156105f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610619919061135e565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561066157600080fd5b505afa158015610675573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610699919061135e565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156106e157600080fd5b505af11580156106f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610719919061135e565b600e80546001600160a01b0319166001600160a01b03928316179055600d541663f305d719473061074981610477565b60008061075e6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156107c157600080fd5b505af11580156107d5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107fa9190611474565b5050600e805443600f556010859055686c6b935b8bbd40000060115563ffff00ff60a01b198116630101000160a01b17909155600d5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561087c57600080fd5b505af1158015610890573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b4919061143e565b505050565b6001600160a01b03831661091b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103df565b6001600160a01b03821661097c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103df565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60008111610a3f5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103df565b600e546001600160a01b038481169116148015610a6a5750600d546001600160a01b03838116911614155b15610aa857601054600f54610a7e91610ed8565b4311610aa8576001600160a01b0382166000908152600660205260409020805460ff191660011790555b6001600160a01b0383163014801590610ad957506001600160a01b03821660009081526006602052604090205460ff165b15610aed576000600a55605a600b55610bcc565b6001600160a01b0383163014801590610b1f57506001600160a01b03831660009081526006602052604090205460ff16155b8015610b4457506001600160a01b03821660009081526006602052604090205460ff16155b15610bcc576001600a556009600b55600e546001600160a01b038481169116148015610b7e5750600d546001600160a01b03838116911614155b8015610ba357506001600160a01b03821660009081526005602052604090205460ff16155b8015610bb85750600e54600160b81b900460ff165b15610bcc57601154811115610bcc57600080fd5b6000610bd730610477565b600e54909150600160a81b900460ff16158015610c025750600e546001600160a01b03858116911614155b8015610c175750600e54600160b01b900460ff165b15610c4257610c2581610d4f565b47683635c9adc5dea00000811115610c4057610c4047610c8d565b505b610c4d848484610f37565b50505050565b60008184841115610c775760405162461bcd60e51b81526004016103df91906114a2565b506000610c8484866115f6565b95945050505050565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610cc7573d6000803e3d6000fd5b5050565b6000600854821115610d325760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103df565b6000610d3c610f42565b9050610d488382610f65565b9392505050565b600e805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d9757610d97611623565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610deb57600080fd5b505afa158015610dff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e23919061135e565b81600181518110610e3657610e36611623565b6001600160a01b039283166020918202929092010152600d54610e5c91309116846108b9565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e9590859060009086903090429060040161152c565b600060405180830381600087803b158015610eaf57600080fd5b505af1158015610ec3573d6000803e3d6000fd5b5050600e805460ff60a81b1916905550505050565b600080610ee5838561159d565b905083811015610d485760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103df565b6108b4838383610fa7565b6000806000610f4f61109e565b9092509050610f5e8282610f65565b9250505090565b6000610d4883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110e2565b600080600080600080610fb987611110565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610feb908761116d565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461101a9086610ed8565b6001600160a01b03891660009081526002602052604090205561103c816111af565b61104684836111f9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161108b91815260200190565b60405180910390a3505050505050505050565b600854600090819069021e19e0c9bab24000006110bb8282610f65565b8210156110d95750506008549269021e19e0c9bab240000092509050565b90939092509050565b600081836111035760405162461bcd60e51b81526004016103df91906114a2565b506000610c8484866115b5565b600080600080600080600080600061112d8a600a54600b5461121d565b925092509250600061113d610f42565b905060008060006111508e878787611272565b919e509c509a509598509396509194505050505091939550919395565b6000610d4883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610c53565b60006111b9610f42565b905060006111c783836112c2565b306000908152600260205260409020549091506111e49082610ed8565b30600090815260026020526040902055505050565b600854611206908361116d565b6008556009546112169082610ed8565b6009555050565b6000808080611237606461123189896112c2565b90610f65565b9050600061124a60646112318a896112c2565b905060006112628261125c8b8661116d565b9061116d565b9992985090965090945050505050565b600080808061128188866112c2565b9050600061128f88876112c2565b9050600061129d88886112c2565b905060006112af8261125c868661116d565b939b939a50919850919650505050505050565b6000826112d157506000610346565b60006112dd83856115d7565b9050826112ea85836115b5565b14610d485760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103df565b60006020828403121561135357600080fd5b8135610d4881611639565b60006020828403121561137057600080fd5b8151610d4881611639565b6000806040838503121561138e57600080fd5b823561139981611639565b915060208301356113a981611639565b809150509250929050565b6000806000606084860312156113c957600080fd5b83356113d481611639565b925060208401356113e481611639565b929592945050506040919091013590565b6000806040838503121561140857600080fd5b823561141381611639565b946020939093013593505050565b60006020828403121561143357600080fd5b8135610d488161164e565b60006020828403121561145057600080fd5b8151610d488161164e565b60006020828403121561146d57600080fd5b5035919050565b60008060006060848603121561148957600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156114cf578581018301518582016040015282016114b3565b818111156114e1576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561157c5784516001600160a01b031683529383019391830191600101611557565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156115b0576115b061160d565b500190565b6000826115d257634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156115f1576115f161160d565b500290565b6000828210156116085761160861160d565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461047457600080fd5b801515811461047457600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122028f6c796915c09153fb857ce98fb1a113d5352a97523dc693fbd3f1a85b6e4e664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,776
0x96a213fb5347925093d20a9420e5633f1ff57c3a
pragma solidity ^0.4.15; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <stefan.george@consensys.net> contract MultiSigWallet { /* * Events */ event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(address indexed sender, uint indexed transactionId); event Submission(uint indexed transactionId); event Execution(uint indexed transactionId); event ExecutionFailure(uint indexed transactionId); event Deposit(address indexed sender, uint value); event OwnerAddition(address indexed owner); event OwnerRemoval(address indexed owner); event RequirementChange(uint required); /* * Constants */ uint constant public MAX_OWNER_COUNT = 50; /* * Storage */ mapping (uint => Transaction) public transactions; mapping (uint => mapping (address => bool)) public confirmations; mapping (address => bool) public isOwner; address[] public owners; uint public required; uint public transactionCount; struct Transaction { address destination; uint value; bytes data; bool executed; } /* * Modifiers */ modifier onlyWallet() { require(msg.sender == address(this)); _; } modifier ownerDoesNotExist(address owner) { require(!isOwner[owner]); _; } modifier ownerExists(address owner) { require(isOwner[owner]); _; } modifier transactionExists(uint transactionId) { require(transactions[transactionId].destination != 0); _; } modifier confirmed(uint transactionId, address owner) { require(confirmations[transactionId][owner]); _; } modifier notConfirmed(uint transactionId, address owner) { require(!confirmations[transactionId][owner]); _; } modifier notExecuted(uint transactionId) { require(!transactions[transactionId].executed); _; } modifier notNull(address _address) { require(_address != 0); _; } modifier validRequirement(uint ownerCount, uint _required) { require(ownerCount <= MAX_OWNER_COUNT && _required <= ownerCount && _required != 0 && ownerCount != 0); _; } /// @dev Fallback function allows to deposit ether. function() payable { if (msg.value > 0) Deposit(msg.sender, msg.value); } /* * Public functions */ /// @dev Contract constructor sets initial owners and required number of confirmations. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. function MultiSigWallet(address[] _owners, uint _required) public validRequirement(_owners.length, _required) { for (uint i=0; i<_owners.length; i++) { require(!isOwner[_owners[i]] && _owners[i] != 0); isOwner[_owners[i]] = true; } owners = _owners; required = _required; } /// @dev Allows to add a new owner. Transaction has to be sent by wallet. /// @param owner Address of new owner. function addOwner(address owner) public onlyWallet ownerDoesNotExist(owner) notNull(owner) validRequirement(owners.length + 1, required) { isOwner[owner] = true; owners.push(owner); OwnerAddition(owner); } /// @dev Allows to remove an owner. Transaction has to be sent by wallet. /// @param owner Address of owner. function removeOwner(address owner) public onlyWallet ownerExists(owner) { isOwner[owner] = false; for (uint i=0; i<owners.length - 1; i++) if (owners[i] == owner) { owners[i] = owners[owners.length - 1]; break; } owners.length -= 1; if (required > owners.length) changeRequirement(owners.length); OwnerRemoval(owner); } /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. /// @param owner Address of owner to be replaced. /// @param newOwner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; OwnerRemoval(owner); OwnerAddition(newOwner); } /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet. /// @param _required Number of required confirmations. function changeRequirement(uint _required) public onlyWallet validRequirement(owners.length, _required) { required = _required; RequirementChange(_required); } /// @dev Allows an owner to submit and confirm a transaction. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) { transactionId = addTransaction(destination, value, data); confirmTransaction(transactionId); } /// @dev Allows an owner to confirm a transaction. /// @param transactionId Transaction ID. function confirmTransaction(uint transactionId) public ownerExists(msg.sender) transactionExists(transactionId) notConfirmed(transactionId, msg.sender) { confirmations[transactionId][msg.sender] = true; Confirmation(msg.sender, transactionId); executeTransaction(transactionId); } /// @dev Allows an owner to revoke a confirmation for a transaction. /// @param transactionId Transaction ID. function revokeConfirmation(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { confirmations[transactionId][msg.sender] = false; Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; } } } // call has been separated into its own function in order to take advantage // of the Solidity's code generator to produce a loop that copies tx.data into memory. function external_call(address destination, uint value, uint dataLength, bytes data) private returns (bool) { bool result; assembly { let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that result := call( sub(gas, 34710), // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) + // callNewAccountGas (25000, in case the destination address does not exist and needs creating) destination, value, d, dataLength, // Size of the input (in bytes) - this is what fixes the padding problem x, 0 // Output is ignored, therefore the output size is zero ) } return result; } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } }
0x60806040526004361061011c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663025e7c278114610167578063173825d91461019b57806320ea8d86146101bc5780632f54bf6e146101d45780633411c81c14610209578063547415251461022d5780637065cb481461025e578063784547a71461027f5780638b51d13f146102975780639ace38c2146102af578063a0e67e2b1461036a578063a8abe69a146103cf578063b5dc40c3146103f4578063b77bf6001461040c578063ba51a6df14610421578063c01a8c8414610439578063c642747414610451578063d74f8edd146104ba578063dc8452cd146104cf578063e20056e6146104e4578063ee22610b1461050b575b600034111561016557604080513481529051600160a060020a033316917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561017357600080fd5b5061017f600435610523565b60408051600160a060020a039092168252519081900360200190f35b3480156101a757600080fd5b50610165600160a060020a036004351661054b565b3480156101c857600080fd5b506101656004356106d6565b3480156101e057600080fd5b506101f5600160a060020a03600435166107ac565b604080519115158252519081900360200190f35b34801561021557600080fd5b506101f5600435600160a060020a03602435166107c1565b34801561023957600080fd5b5061024c600435151560243515156107e1565b60408051918252519081900360200190f35b34801561026a57600080fd5b50610165600160a060020a036004351661084d565b34801561028b57600080fd5b506101f5600435610986565b3480156102a357600080fd5b5061024c600435610a0a565b3480156102bb57600080fd5b506102c7600435610a79565b6040518085600160a060020a0316600160a060020a031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b8381101561032c578181015183820152602001610314565b50505050905090810190601f1680156103595780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561037657600080fd5b5061037f610b37565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156103bb5781810151838201526020016103a3565b505050509050019250505060405180910390f35b3480156103db57600080fd5b5061037f60043560243560443515156064351515610b9a565b34801561040057600080fd5b5061037f600435610cd3565b34801561041857600080fd5b5061024c610e4c565b34801561042d57600080fd5b50610165600435610e52565b34801561044557600080fd5b50610165600435610ee5565b34801561045d57600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261024c948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610fcc9650505050505050565b3480156104c657600080fd5b5061024c610feb565b3480156104db57600080fd5b5061024c610ff0565b3480156104f057600080fd5b50610165600160a060020a0360043581169060243516610ff6565b34801561051757600080fd5b50610165600435611194565b600380548290811061053157fe5b600091825260209091200154600160a060020a0316905081565b600030600160a060020a031633600160a060020a031614151561056d57600080fd5b600160a060020a038216600090815260026020526040902054829060ff16151561059657600080fd5b600160a060020a0383166000908152600260205260408120805460ff1916905591505b600354600019018210156106715782600160a060020a03166003838154811015156105e057fe5b600091825260209091200154600160a060020a031614156106665760038054600019810190811061060d57fe5b60009182526020909120015460038054600160a060020a03909216918490811061063357fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610671565b6001909101906105b9565b600380546000190190610684908261147a565b50600354600454111561069d5760035461069d90610e52565b604051600160a060020a038416907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a2505050565b33600160a060020a03811660009081526002602052604090205460ff1615156106fe57600080fd5b600082815260016020908152604080832033600160a060020a038116855292529091205483919060ff16151561073357600080fd5b600084815260208190526040902060030154849060ff161561075457600080fd5b6000858152600160209081526040808320600160a060020a0333168085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b6005548110156108465783801561080e575060008181526020819052604090206003015460ff16155b806108325750828015610832575060008181526020819052604090206003015460ff165b1561083e576001820191505b6001016107e5565b5092915050565b30600160a060020a031633600160a060020a031614151561086d57600080fd5b600160a060020a038116600090815260026020526040902054819060ff161561089557600080fd5b81600160a060020a03811615156108ab57600080fd5b600380549050600101600454603282111580156108c85750818111155b80156108d357508015155b80156108de57508115155b15156108e957600080fd5b600160a060020a038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01805473ffffffffffffffffffffffffffffffffffffffff191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610a0357600084815260016020526040812060038054919291849081106109b457fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff16156109e8576001820191505b6004548214156109fb5760019250610a03565b60010161098b565b5050919050565b6000805b600354811015610a735760008381526001602052604081206003805491929184908110610a3757fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610a6b576001820191505b600101610a0e565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f8101889004880284018801909652858352600160a060020a0390931695909491929190830182828015610b245780601f10610af957610100808354040283529160200191610b24565b820191906000526020600020905b815481529060010190602001808311610b0757829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610b8f57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610b71575b505050505090505b90565b606080600080600554604051908082528060200260200182016040528015610bcc578160200160208202803883390190505b50925060009150600090505b600554811015610c5357858015610c01575060008181526020819052604090206003015460ff16155b80610c255750848015610c25575060008181526020819052604090206003015460ff165b15610c4b57808383815181101515610c3957fe5b60209081029091010152600191909101905b600101610bd8565b878703604051908082528060200260200182016040528015610c7f578160200160208202803883390190505b5093508790505b86811015610cc8578281815181101515610c9c57fe5b9060200190602002015184898303815181101515610cb657fe5b60209081029091010152600101610c86565b505050949350505050565b606080600080600380549050604051908082528060200260200182016040528015610d08578160200160208202803883390190505b50925060009150600090505b600354811015610dc55760008581526001602052604081206003805491929184908110610d3d57fe5b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610dbd576003805482908110610d7857fe5b6000918252602090912001548351600160a060020a0390911690849084908110610d9e57fe5b600160a060020a03909216602092830290910190910152600191909101905b600101610d14565b81604051908082528060200260200182016040528015610def578160200160208202803883390190505b509350600090505b81811015610e44578281815181101515610e0d57fe5b906020019060200201518482815181101515610e2557fe5b600160a060020a03909216602092830290910190910152600101610df7565b505050919050565b60055481565b30600160a060020a031633600160a060020a0316141515610e7257600080fd5b6003548160328211801590610e875750818111155b8015610e9257508015155b8015610e9d57508115155b1515610ea857600080fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b33600160a060020a03811660009081526002602052604090205460ff161515610f0d57600080fd5b6000828152602081905260409020548290600160a060020a03161515610f3257600080fd5b600083815260016020908152604080832033600160a060020a038116855292529091205484919060ff1615610f6657600080fd5b6000858152600160208181526040808420600160a060020a0333168086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a3610fc585611194565b5050505050565b6000610fd9848484611367565b9050610fe481610ee5565b9392505050565b603281565b60045481565b600030600160a060020a031633600160a060020a031614151561101857600080fd5b600160a060020a038316600090815260026020526040902054839060ff16151561104157600080fd5b600160a060020a038316600090815260026020526040902054839060ff161561106957600080fd5b600092505b6003548310156110fa5784600160a060020a031660038481548110151561109157fe5b600091825260209091200154600160a060020a031614156110ef57836003848154811015156110bc57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a031602179055506110fa565b60019092019161106e565b600160a060020a03808616600081815260026020526040808220805460ff1990811690915593881682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a2604051600160a060020a038516907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a25050505050565b33600160a060020a03811660009081526002602052604081205490919060ff1615156111bf57600080fd5b600083815260016020908152604080832033600160a060020a038116855292529091205484919060ff1615156111f457600080fd5b600085815260208190526040902060030154859060ff161561121557600080fd5b61121e86610986565b1561135f576000868152602081815260409182902060038101805460ff19166001908117909155815481830154600280850180548851601f60001997831615610100029790970190911692909204948501879004870282018701909752838152939a506112f295600160a060020a03909216949093919083908301828280156112e85780601f106112bd576101008083540402835291602001916112e8565b820191906000526020600020905b8154815290600101906020018083116112cb57829003601f168201915b5050505050611457565b156113275760405186907f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7590600090a261135f565b60405186907f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923690600090a260038501805460ff191690555b505050505050565b600083600160a060020a038116151561137f57600080fd5b60055460408051608081018252600160a060020a0388811682526020808301898152838501898152600060608601819052878152808452959095208451815473ffffffffffffffffffffffffffffffffffffffff1916941693909317835551600183015592518051949650919390926113ff9260028501929101906114a3565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b6000806040516020840160008287838a8c6187965a03f198975050505050505050565b81548183558181111561149e5760008381526020902061149e918101908301611521565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114e457805160ff1916838001178555611511565b82800160010185558215611511579182015b828111156115115782518255916020019190600101906114f6565b5061151d929150611521565b5090565b610b9791905b8082111561151d57600081556001016115275600a165627a7a72305820e1853efd555d1650c34bcae5790c0f6aa5efd7497e6c9f06db3f2959de347ac30029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,777
0x27655c95e5ce552745a5480c48d36199adc8b668
/** *Submitted for verification at Etherscan.io on 2022-02-14 */ // Telegram: https://t.me/luvinuofficial // Website: http://luvinutoken.com/ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract LoveInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private time; uint256 private _tax; uint256 private constant _tTotal = 1 * 10**12 * 10**9; uint256 private fee1=90; uint256 private fee2=90; uint256 private liqfee=20; uint256 private feeMax=100; string private constant _name = "Luv Inu"; string private constant _symbol = "LUVINU"; uint256 private _maxTxAmount = _tTotal.mul(3).div(100); uint256 private minBalance = _tTotal.div(1000); uint8 private constant _decimals = 9; address payable private _feeAddrWallet1; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () payable { _feeAddrWallet1 = payable(msg.sender); _tOwned[address(this)] = _tTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); emit Transfer(address(0),address(this),_tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tOwned[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function changeFees(uint8 _fee1,uint8 _fee2,uint8 _liq) external { require(_msgSender() == _feeAddrWallet1); require(_fee1 <= feeMax && _fee2 <= feeMax && liqfee <= feeMax,"Cannot set fees above maximum"); fee1 = _fee1; fee2 = _fee2; liqfee = _liq; } function changeMinBalance(uint256 newMin) external { require(_msgSender() == _feeAddrWallet1); minBalance = newMin; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _tax = fee1.add(liqfee); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && (block.timestamp < time)){ // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _tax = fee2.add(liqfee); } if (!inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from]) { require(block.timestamp > time,"Sells prohibited for the first 5 minutes"); uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > minBalance){ swapAndLiquify(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } } _transferStandard(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function swapAndLiquify(uint256 tokenAmount) private { uint256 half = liqfee.div(2); uint256 part = fee2.add(half); uint256 sum = fee2.add(liqfee); uint256 swapTotal = tokenAmount.mul(part).div(sum); swapTokensForEth(swapTotal); addLiquidity(tokenAmount.sub(swapTotal),address(this).balance.mul(half).div(part),_feeAddrWallet1); } function addLiquidity(uint256 tokenAmount,uint256 ethAmount,address target) private lockTheSwap{ _approve(address(this),address(uniswapV2Router),tokenAmount); uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,target,block.timestamp); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); addLiquidity(balanceOf(address(this)),address(this).balance,owner()); swapEnabled = true; tradingOpen = true; time = block.timestamp + (5 minutes); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 transferAmount,uint256 tfee) = _getTValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _tOwned[recipient] = _tOwned[recipient].add(transferAmount); _tOwned[address(this)] = _tOwned[address(this)].add(tfee); emit Transfer(sender, recipient, transferAmount); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapAndLiquify(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256) { uint256 tFee = tAmount.mul(_tax).div(1000); uint256 tTransferAmount = tAmount.sub(tFee); return (tTransferAmount, tFee); } function recoverTokens(address tokenAddress) external { require(_msgSender() == _feeAddrWallet1); IERC20 recoveryToken = IERC20(tokenAddress); recoveryToken.transfer(_feeAddrWallet1,recoveryToken.balanceOf(address(this))); } }
0x6080604052600436106101185760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb14610384578063b515566a146103c1578063c3c8cd80146103ea578063c9567bf914610401578063dd62ed3e146104185761011f565b806370a08231146102b1578063715018a6146102ee5780637e37e9bb146103055780638da5cb5b1461032e57806395d89b41146103595761011f565b806323b872dd116100e757806323b872dd146101e0578063273123b71461021d578063313ce567146102465780634ea18fab146102715780636fc3eaec1461029a5761011f565b806306fdde0314610124578063095ea7b31461014f57806316114acd1461018c57806318160ddd146101b55761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b60405161014691906128fe565b60405180910390f35b34801561015b57600080fd5b50610176600480360381019061017191906123ef565b610492565b60405161018391906128e3565b60405180910390f35b34801561019857600080fd5b506101b360048036038101906101ae9190612302565b6104b0565b005b3480156101c157600080fd5b506101ca610652565b6040516101d79190612a80565b60405180910390f35b3480156101ec57600080fd5b506102076004803603810190610202919061239c565b610663565b60405161021491906128e3565b60405180910390f35b34801561022957600080fd5b50610244600480360381019061023f9190612302565b61073c565b005b34801561025257600080fd5b5061025b61082c565b6040516102689190612af5565b60405180910390f35b34801561027d57600080fd5b50610298600480360381019061029391906124a5565b610835565b005b3480156102a657600080fd5b506102af6108a0565b005b3480156102bd57600080fd5b506102d860048036038101906102d39190612302565b610912565b6040516102e59190612a80565b60405180910390f35b3480156102fa57600080fd5b5061030361095b565b005b34801561031157600080fd5b5061032c60048036038101906103279190612552565b610aae565b005b34801561033a57600080fd5b50610343610b9b565b604051610350919061283e565b60405180910390f35b34801561036557600080fd5b5061036e610bc4565b60405161037b91906128fe565b60405180910390f35b34801561039057600080fd5b506103ab60048036038101906103a691906123ef565b610c01565b6040516103b891906128e3565b60405180910390f35b3480156103cd57600080fd5b506103e860048036038101906103e3919061242f565b610c1f565b005b3480156103f657600080fd5b506103ff610d49565b005b34801561040d57600080fd5b50610416610dc3565b005b34801561042457600080fd5b5061043f600480360381019061043a919061235c565b610f0e565b60405161044c9190612a80565b60405180910390f35b60606040518060400160405280600781526020017f4c757620496e7500000000000000000000000000000000000000000000000000815250905090565b60006104a661049f61105a565b8484611062565b6001905092915050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104f161105a565b73ffffffffffffffffffffffffffffffffffffffff161461051157600080fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161058e919061283e565b60206040518083038186803b1580156105a657600080fd5b505afa1580156105ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105de91906124d2565b6040518363ffffffff1660e01b81526004016105fb929190612859565b602060405180830381600087803b15801561061557600080fd5b505af1158015610629573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064d9190612478565b505050565b6000683635c9adc5dea00000905090565b600061067084848461122d565b6107318461067c61105a565b61072c8560405180606001604052806028815260200161322060289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106e261105a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e69092919063ffffffff16565b611062565b600190509392505050565b61074461105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c8906129c0565b60405180910390fd5b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661087661105a565b73ffffffffffffffffffffffffffffffffffffffff161461089657600080fd5b80600e8190555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e161105a565b73ffffffffffffffffffffffffffffffffffffffff161461090157600080fd5b600047905061090f8161194a565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61096361105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e7906129c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610aef61105a565b73ffffffffffffffffffffffffffffffffffffffff1614610b0f57600080fd5b600c548360ff1611158015610b295750600c548260ff1611155b8015610b395750600c54600b5411155b610b78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6f90612a60565b60405180910390fd5b8260ff166009819055508160ff16600a819055508060ff16600b81905550505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4c5556494e550000000000000000000000000000000000000000000000000000815250905090565b6000610c15610c0e61105a565b848461122d565b6001905092915050565b610c2761105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cab906129c0565b60405180910390fd5b60005b8151811015610d4557600160056000848481518110610cd957610cd8612e73565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610d3d90612dcc565b915050610cb7565b5050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d8a61105a565b73ffffffffffffffffffffffffffffffffffffffff1614610daa57600080fd5b6000610db530610912565b9050610dc0816119b6565b50565b610dcb61105a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4f906129c0565b60405180910390fd5b601160149054906101000a900460ff1615610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f90612a40565b60405180910390fd5b610ec2610eb430610912565b47610ebd610b9b565b611aa0565b6001601160166101000a81548160ff0219169083151502179055506001601160146101000a81548160ff02191690831515021790555061012c42610f069190612bb6565b600781905550565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080831415610fa8576000905061100a565b60008284610fb69190612c3d565b9050828482610fc59190612c0c565b14611005576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffc906129a0565b60405180910390fd5b809150505b92915050565b600061105283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611bc4565b905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c990612a20565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113990612960565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112209190612a80565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561129d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129490612a00565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561130d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130490612940565b60405180910390fd5b60008111611350576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611347906129e0565b60405180910390fd5b611367600b54600954611c2790919063ffffffff16565b600881905550611375610b9b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156113e357506113b3610b9b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156118d657600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561148c5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61149557600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156115405750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156115965750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156115a3575060075442105b1561165357600d548111156115b757600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061160257600080fd5b601e4261160f9190612bb6565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156116fe5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117545750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561177757611770600b54600a54611c2790919063ffffffff16565b6008819055505b601160159054906101000a900460ff161580156117e25750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117fa5750601160169054906101000a900460ff165b80156118505750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156118d5576007544211611899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189090612920565b60405180910390fd5b60006118a430610912565b9050600e548111156118d3576118b9816119b6565b600047905060008111156118d1576118d04761194a565b5b505b505b5b6118e1838383611c85565b505050565b600083831115829061192e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192591906128fe565b60405180910390fd5b506000838561193d9190612c97565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156119b2573d6000803e3d6000fd5b5050565b60006119ce6002600b5461101090919063ffffffff16565b905060006119e782600a54611c2790919063ffffffff16565b90506000611a02600b54600a54611c2790919063ffffffff16565b90506000611a2b82611a1d8588610f9590919063ffffffff16565b61101090919063ffffffff16565b9050611a3681611ec0565b611a99611a4c828761214890919063ffffffff16565b611a7185611a638847610f9590919063ffffffff16565b61101090919063ffffffff16565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611aa0565b5050505050565b6001601160156101000a81548160ff021916908315150217905550611ae830601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685611062565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71983308660008087426040518863ffffffff1660e01b8152600401611b4f96959493929190612882565b6060604051808303818588803b158015611b6857600080fd5b505af1158015611b7c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611ba191906124ff565b5050506000601160156101000a81548160ff021916908315150217905550505050565b60008083118290611c0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0291906128fe565b60405180910390fd5b5060008385611c1a9190612c0c565b9050809150509392505050565b6000808284611c369190612bb6565b905083811015611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7290612980565b60405180910390fd5b8091505092915050565b600080611c9183612192565b91509150611ce783600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461214890919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d7c82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c2790919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e1181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c2790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611eb19190612a80565b60405180910390a35050505050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ef857611ef7612ea2565b5b604051908082528060200260200182016040528015611f265781602001602082028036833780820191505090505b5090503081600081518110611f3e57611f3d612e73565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fe057600080fd5b505afa158015611ff4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612018919061232f565b8160018151811061202c5761202b612e73565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061209330601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611062565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120f7959493929190612a9b565b600060405180830381600087803b15801561211157600080fd5b505af1158015612125573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b600061218a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118e6565b905092915050565b60008060006121c06103e86121b260085487610f9590919063ffffffff16565b61101090919063ffffffff16565b905060006121d7828661214890919063ffffffff16565b90508082935093505050915091565b60006121f96121f484612b35565b612b10565b9050808382526020820190508285602086028201111561221c5761221b612ed6565b5b60005b8581101561224c57816122328882612256565b84526020840193506020830192505060018101905061221f565b5050509392505050565b600081359050612265816131c3565b92915050565b60008151905061227a816131c3565b92915050565b600082601f83011261229557612294612ed1565b5b81356122a58482602086016121e6565b91505092915050565b6000815190506122bd816131da565b92915050565b6000813590506122d2816131f1565b92915050565b6000815190506122e7816131f1565b92915050565b6000813590506122fc81613208565b92915050565b60006020828403121561231857612317612ee0565b5b600061232684828501612256565b91505092915050565b60006020828403121561234557612344612ee0565b5b60006123538482850161226b565b91505092915050565b6000806040838503121561237357612372612ee0565b5b600061238185828601612256565b925050602061239285828601612256565b9150509250929050565b6000806000606084860312156123b5576123b4612ee0565b5b60006123c386828701612256565b93505060206123d486828701612256565b92505060406123e5868287016122c3565b9150509250925092565b6000806040838503121561240657612405612ee0565b5b600061241485828601612256565b9250506020612425858286016122c3565b9150509250929050565b60006020828403121561244557612444612ee0565b5b600082013567ffffffffffffffff81111561246357612462612edb565b5b61246f84828501612280565b91505092915050565b60006020828403121561248e5761248d612ee0565b5b600061249c848285016122ae565b91505092915050565b6000602082840312156124bb576124ba612ee0565b5b60006124c9848285016122c3565b91505092915050565b6000602082840312156124e8576124e7612ee0565b5b60006124f6848285016122d8565b91505092915050565b60008060006060848603121561251857612517612ee0565b5b6000612526868287016122d8565b9350506020612537868287016122d8565b9250506040612548868287016122d8565b9150509250925092565b60008060006060848603121561256b5761256a612ee0565b5b6000612579868287016122ed565b935050602061258a868287016122ed565b925050604061259b868287016122ed565b9150509250925092565b60006125b183836125cc565b60208301905092915050565b6125c681612d20565b82525050565b6125d581612ccb565b82525050565b6125e481612ccb565b82525050565b60006125f582612b71565b6125ff8185612b94565b935061260a83612b61565b8060005b8381101561263b57815161262288826125a5565b975061262d83612b87565b92505060018101905061260e565b5085935050505092915050565b61265181612cdd565b82525050565b61266081612d32565b82525050565b600061267182612b7c565b61267b8185612ba5565b935061268b818560208601612d68565b61269481612ee5565b840191505092915050565b60006126ac602883612ba5565b91506126b782612ef6565b604082019050919050565b60006126cf602383612ba5565b91506126da82612f45565b604082019050919050565b60006126f2602283612ba5565b91506126fd82612f94565b604082019050919050565b6000612715601b83612ba5565b915061272082612fe3565b602082019050919050565b6000612738602183612ba5565b91506127438261300c565b604082019050919050565b600061275b602083612ba5565b91506127668261305b565b602082019050919050565b600061277e602983612ba5565b915061278982613084565b604082019050919050565b60006127a1602583612ba5565b91506127ac826130d3565b604082019050919050565b60006127c4602483612ba5565b91506127cf82613122565b604082019050919050565b60006127e7601783612ba5565b91506127f282613171565b602082019050919050565b600061280a601d83612ba5565b91506128158261319a565b602082019050919050565b61282981612d09565b82525050565b61283881612d13565b82525050565b600060208201905061285360008301846125db565b92915050565b600060408201905061286e60008301856125bd565b61287b6020830184612820565b9392505050565b600060c08201905061289760008301896125db565b6128a46020830188612820565b6128b16040830187612657565b6128be6060830186612657565b6128cb60808301856125db565b6128d860a0830184612820565b979650505050505050565b60006020820190506128f86000830184612648565b92915050565b600060208201905081810360008301526129188184612666565b905092915050565b600060208201905081810360008301526129398161269f565b9050919050565b60006020820190508181036000830152612959816126c2565b9050919050565b60006020820190508181036000830152612979816126e5565b9050919050565b6000602082019050818103600083015261299981612708565b9050919050565b600060208201905081810360008301526129b98161272b565b9050919050565b600060208201905081810360008301526129d98161274e565b9050919050565b600060208201905081810360008301526129f981612771565b9050919050565b60006020820190508181036000830152612a1981612794565b9050919050565b60006020820190508181036000830152612a39816127b7565b9050919050565b60006020820190508181036000830152612a59816127da565b9050919050565b60006020820190508181036000830152612a79816127fd565b9050919050565b6000602082019050612a956000830184612820565b92915050565b600060a082019050612ab06000830188612820565b612abd6020830187612657565b8181036040830152612acf81866125ea565b9050612ade60608301856125db565b612aeb6080830184612820565b9695505050505050565b6000602082019050612b0a600083018461282f565b92915050565b6000612b1a612b2b565b9050612b268282612d9b565b919050565b6000604051905090565b600067ffffffffffffffff821115612b5057612b4f612ea2565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612bc182612d09565b9150612bcc83612d09565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612c0157612c00612e15565b5b828201905092915050565b6000612c1782612d09565b9150612c2283612d09565b925082612c3257612c31612e44565b5b828204905092915050565b6000612c4882612d09565b9150612c5383612d09565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c8c57612c8b612e15565b5b828202905092915050565b6000612ca282612d09565b9150612cad83612d09565b925082821015612cc057612cbf612e15565b5b828203905092915050565b6000612cd682612ce9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612d2b82612d44565b9050919050565b6000612d3d82612d09565b9050919050565b6000612d4f82612d56565b9050919050565b6000612d6182612ce9565b9050919050565b60005b83811015612d86578082015181840152602081019050612d6b565b83811115612d95576000848401525b50505050565b612da482612ee5565b810181811067ffffffffffffffff82111715612dc357612dc2612ea2565b5b80604052505050565b6000612dd782612d09565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612e0a57612e09612e15565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f53656c6c732070726f6869626974656420666f7220746865206669727374203560008201527f206d696e75746573000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f43616e6e6f742073657420666565732061626f7665206d6178696d756d000000600082015250565b6131cc81612ccb565b81146131d757600080fd5b50565b6131e381612cdd565b81146131ee57600080fd5b50565b6131fa81612d09565b811461320557600080fd5b50565b61321181612d13565b811461321c57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220bcccec901207e7cf8d292413b1c23b4f693b5388534c40e8ceee441a7f54f2d164736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,778
0x900866ed68ec22ad6ba52f69b86ff7f037b0a996
/* __ __ ______ __ __ ______ ______ __ __ ______ ______ /\ \_\ \ /\ ___\ /\ \_\ \ /\ ___\ /\ == \ /\ \_\ \ /\ == \ /\__ _\ \ \ __ \ \ \ __\ \ \____ \ \ \ \____ \ \ __< \ \____ \ \ \ _-/ \/_/\ \/ \ \_\ \_\ \ \_____\ \/\_____\ \ \_____\ \ \_\ \_\ \/\_____\ \ \_\ \ \_\ \/_/\/_/ \/_____/ \/_____/ \/_____/ \/_/ /_/ \/_____/ \/_/ \/_/ */ //https://t.me/heycryptmessenger //https://heycrypt.io // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract HeyCrypt is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _tfee; uint256 private _mfee; uint256 private _sellFee; uint256 private _buyFee; address payable private _feeAddress; string private constant _name = unicode"HeyCrypt"; string private constant _symbol = unicode"HeyCrypt"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingStarted; bool private inSwap = false; bool private swapEnable = false; bool private removeMaxTxn = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxHeldAmount = _tTotal; event MaxTxAmountUpdated(uint _maxHeldAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _buyFee = 10; _sellFee = 12; _feeAddress = payable(_msgSender()); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setRemoveMaxTxn(bool onoff) external onlyOwner() { removeMaxTxn = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _tfee = 0; _mfee = _buyFee; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTxn) { uint walletBalance = balanceOf(address(to)); require(amount <= _maxTxAmount); require(amount.add(walletBalance) <= _maxHeldAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _tfee = 0; _mfee = _sellFee; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnable) { uint burnAmount = contractTokenBalance/6; contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ if(burnAmount > 0){ _transfer(address(this), address(0xdead),burnAmount); } } function _setMaxTxAmount(uint256 maxTxAmount , uint256 maxHeldAmount) external onlyOwner() { if (maxTxAmount > 300000000000 * 10**9) { _maxTxAmount = maxTxAmount; _maxHeldAmount = maxHeldAmount; } } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingStarted); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function openTrading() external onlyOwner() { _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnable = true; removeMaxTxn = true; _maxTxAmount = 300000000000 * 10**9; _maxHeldAmount = 1000000000000 * 10**9; tradingStarted = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _tfee, _mfee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function setFee(uint256 buyFee, uint256 sellFee)external onlyOwner() { if (sellFee <= _sellFee && buyFee <= _buyFee) { _buyFee = buyFee; _sellFee = sellFee; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c8063715018a6116100a0578063a9059cbb11610064578063a9059cbb1461030b578063b515566a1461032b578063c3c8cd801461034b578063c9567bf914610360578063dd62ed3e1461037557600080fd5b8063715018a614610299578063733ec069146102ae5780638da5cb5b146102ce57806395d89b411461012f5780639e78fb4f146102f657600080fd5b80632b51106a116100e75780632b51106a14610208578063313ce5671461022857806352f7c988146102445780636fc3eaec1461026457806370a082311461027957600080fd5b806306fdde031461012f578063095ea7b31461016f57806318160ddd1461019f57806323b872dd146101c6578063273123b7146101e657600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b50604080518082018252600881526712195e50dc9e5c1d60c21b6020820152905161016691906115c6565b60405180910390f35b34801561017b57600080fd5b5061018f61018a366004611640565b6103bb565b6040519015158152602001610166565b3480156101ab57600080fd5b5069152d02c7e14af68000005b604051908152602001610166565b3480156101d257600080fd5b5061018f6101e136600461166c565b6103d2565b3480156101f257600080fd5b506102066102013660046116ad565b61043b565b005b34801561021457600080fd5b506102066102233660046116d8565b61048f565b34801561023457600080fd5b5060405160098152602001610166565b34801561025057600080fd5b5061020661025f3660046116f5565b6104d7565b34801561027057600080fd5b50610206610529565b34801561028557600080fd5b506101b86102943660046116ad565b610560565b3480156102a557600080fd5b50610206610582565b3480156102ba57600080fd5b506102066102c93660046116f5565b6105f6565b3480156102da57600080fd5b506000546040516001600160a01b039091168152602001610166565b34801561030257600080fd5b5061020661063c565b34801561031757600080fd5b5061018f610326366004611640565b61080b565b34801561033757600080fd5b5061020661034636600461172d565b610818565b34801561035757600080fd5b506102066108aa565b34801561036c57600080fd5b506102066108ea565b34801561038157600080fd5b506101b86103903660046117f2565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103c8338484610aa3565b5060015b92915050565b60006103df848484610bc7565b610431843361042c856040518060600160405280602881526020016119f1602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610eb5565b610aa3565b5060019392505050565b6000546001600160a01b0316331461046e5760405162461bcd60e51b81526004016104659061182b565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104b95760405162461bcd60e51b81526004016104659061182b565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146105015760405162461bcd60e51b81526004016104659061182b565b600b5481111580156105155750600c548211155b1561052557600c829055600b8190555b5050565b6000546001600160a01b031633146105535760405162461bcd60e51b81526004016104659061182b565b4761055d81610eef565b50565b6001600160a01b0381166000908152600260205260408120546103cc90610f29565b6000546001600160a01b031633146105ac5760405162461bcd60e51b81526004016104659061182b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106205760405162461bcd60e51b81526004016104659061182b565b681043561a882930000082111561052557601091909155601155565b6000546001600160a01b031633146106665760405162461bcd60e51b81526004016104659061182b565b600f54600160a01b900460ff161561067d57600080fd5b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190611860565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610753573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107779190611860565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156107c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e89190611860565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b60006103c8338484610bc7565b6000546001600160a01b031633146108425760405162461bcd60e51b81526004016104659061182b565b60005b8151811015610525576001600660008484815181106108665761086661187d565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108a2816118a9565b915050610845565b6000546001600160a01b031633146108d45760405162461bcd60e51b81526004016104659061182b565b60006108df30610560565b905061055d81610fad565b6000546001600160a01b031633146109145760405162461bcd60e51b81526004016104659061182b565b600e546109369030906001600160a01b031669152d02c7e14af6800000610aa3565b600e546001600160a01b031663f305d719473061095281610560565b6000806109676000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156109cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109f491906118c4565b5050600f8054681043561a8829300000601055683635c9adc5dea0000060115563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610a7f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055d91906118f2565b6001600160a01b038316610b055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610465565b6001600160a01b038216610b665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610465565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c2b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610465565b6001600160a01b038216610c8d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610465565b60008111610c9a57600080fd5b6001600160a01b03831660009081526006602052604090205460ff1615610cc057600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610d0257506001600160a01b03821660009081526005602052604090205460ff16155b15610ea5576000600955600c54600a55600f546001600160a01b038481169116148015610d3d5750600e546001600160a01b03838116911614155b8015610d6257506001600160a01b03821660009081526005602052604090205460ff16155b8015610d775750600f54600160b81b900460ff165b15610db2576000610d8783610560565b9050601054821115610d9857600080fd5b601154610da58383611127565b1115610db057600080fd5b505b600f546001600160a01b038381169116148015610ddd5750600e546001600160a01b03848116911614155b8015610e0257506001600160a01b03831660009081526005602052604090205460ff16155b15610e13576000600955600b54600a555b6000610e1e30610560565b600f54909150600160a81b900460ff16158015610e495750600f546001600160a01b03858116911614155b8015610e5e5750600f54600160b01b900460ff165b15610ea3576000610e7060068361190f565b9050610e7c8183611931565b9150610e8781611186565b610e9082610fad565b478015610ea057610ea047610eef565b50505b505b610eb08383836111bc565b505050565b60008184841115610ed95760405162461bcd60e51b815260040161046591906115c6565b506000610ee68486611931565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610525573d6000803e3d6000fd5b6000600754821115610f905760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610465565b6000610f9a6111c7565b9050610fa683826111ea565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ff557610ff561187d565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561104e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110729190611860565b816001815181106110855761108561187d565b6001600160a01b039283166020918202929092010152600e546110ab9130911684610aa3565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906110e4908590600090869030904290600401611948565b600060405180830381600087803b1580156110fe57600080fd5b505af1158015611112573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008061113483856119b9565b905083811015610fa65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610465565b600f805460ff60a81b1916600160a81b17905580156111ac576111ac3061dead83610bc7565b50600f805460ff60a81b19169055565b610eb083838361122c565b60008060006111d4611323565b90925090506111e382826111ea565b9250505090565b6000610fa683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611367565b60008060008060008061123e87611395565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061127090876113f2565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461129f9086611127565b6001600160a01b0389166000908152600260205260409020556112c181611434565b6112cb848361147e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161131091815260200190565b60405180910390a3505050505050505050565b600754600090819069152d02c7e14af680000061134082826111ea565b82101561135e5750506007549269152d02c7e14af680000092509050565b90939092509050565b600081836113885760405162461bcd60e51b815260040161046591906115c6565b506000610ee6848661190f565b60008060008060008060008060006113b28a600954600a546114a2565b92509250925060006113c26111c7565b905060008060006113d58e8787876114f7565b919e509c509a509598509396509194505050505091939550919395565b6000610fa683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610eb5565b600061143e6111c7565b9050600061144c8383611547565b306000908152600260205260409020549091506114699082611127565b30600090815260026020526040902055505050565b60075461148b90836113f2565b60075560085461149b9082611127565b6008555050565b60008080806114bc60646114b68989611547565b906111ea565b905060006114cf60646114b68a89611547565b905060006114e7826114e18b866113f2565b906113f2565b9992985090965090945050505050565b60008080806115068886611547565b905060006115148887611547565b905060006115228888611547565b90506000611534826114e186866113f2565b939b939a50919850919650505050505050565b600082611556575060006103cc565b600061156283856119d1565b90508261156f858361190f565b14610fa65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610465565b600060208083528351808285015260005b818110156115f3578581018301518582016040015282016115d7565b81811115611605576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461055d57600080fd5b803561163b8161161b565b919050565b6000806040838503121561165357600080fd5b823561165e8161161b565b946020939093013593505050565b60008060006060848603121561168157600080fd5b833561168c8161161b565b9250602084013561169c8161161b565b929592945050506040919091013590565b6000602082840312156116bf57600080fd5b8135610fa68161161b565b801515811461055d57600080fd5b6000602082840312156116ea57600080fd5b8135610fa6816116ca565b6000806040838503121561170857600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561174057600080fd5b823567ffffffffffffffff8082111561175857600080fd5b818501915085601f83011261176c57600080fd5b81358181111561177e5761177e611717565b8060051b604051601f19603f830116810181811085821117156117a3576117a3611717565b6040529182528482019250838101850191888311156117c157600080fd5b938501935b828510156117e6576117d785611630565b845293850193928501926117c6565b98975050505050505050565b6000806040838503121561180557600080fd5b82356118108161161b565b915060208301356118208161161b565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561187257600080fd5b8151610fa68161161b565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156118bd576118bd611893565b5060010190565b6000806000606084860312156118d957600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561190457600080fd5b8151610fa6816116ca565b60008261192c57634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561194357611943611893565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119985784516001600160a01b031683529383019391830191600101611973565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119cc576119cc611893565b500190565b60008160001904831182151516156119eb576119eb611893565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122062a1fcceb1295a3afbfb90fc10190945e03ef428f3b1d9cded48e263f918296f64736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,779
0x0deB62ded592F18Faacf3C58BD5431C1fD1414bb
// SPDX-License-Identifier: AGPL-3.0 // // Copyright 2017 Christian Reitwiessner // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // 2019 OKIMS // ported to solidity 0.6 // fixed linter warnings // added requiere error messages // // // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.6.11; library Pairing { struct G1Point { uint X; uint Y; } // Encoding of field elements is: X[0] * z + X[1] struct G2Point { uint[2] X; uint[2] Y; } /// @return the generator of G1 function P1() internal pure returns (G1Point memory) { return G1Point(1, 2); } /// @return the generator of G2 function P2() internal pure returns (G2Point memory) { // Original code point return G2Point( [11559732032986387107991004021392285783925812861821192530917403151452391805634, 10857046999023057135944570762232829481370756359578518086990519993285655852781], [4082367875863433681332203403145435568316851327593401208105741076214120093531, 8495653923123431417604973247489272438418190587263600148770280649306958101930] ); /* // Changed by Jordi point return G2Point( [10857046999023057135944570762232829481370756359578518086990519993285655852781, 11559732032986387107991004021392285783925812861821192530917403151452391805634], [8495653923123431417604973247489272438418190587263600148770280649306958101930, 4082367875863433681332203403145435568316851327593401208105741076214120093531] ); */ } /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero. function negate(G1Point memory p) internal pure returns (G1Point memory r) { // The prime q in the base field F_q for G1 uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; if (p.X == 0 && p.Y == 0) return G1Point(0, 0); return G1Point(p.X, q - (p.Y % q)); } /// @return r the sum of two points of G1 function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) { uint[4] memory input; input[0] = p1.X; input[1] = p1.Y; input[2] = p2.X; input[3] = p2.Y; bool success; // solium-disable-next-line security/no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } } require(success,"pairing-add-failed"); } /// @return r the product of a point on G1 and a scalar, i.e. /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p. function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) { uint[3] memory input; input[0] = p.X; input[1] = p.Y; input[2] = s; bool success; // solium-disable-next-line security/no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } } require (success,"pairing-mul-failed"); } /// @return the result of computing the pairing check /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1 /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should /// return true. function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) { require(p1.length == p2.length,"pairing-lengths-failed"); uint elements = p1.length; uint inputSize = elements * 6; uint[] memory input = new uint[](inputSize); for (uint i = 0; i < elements; i++) { input[i * 6 + 0] = p1[i].X; input[i * 6 + 1] = p1[i].Y; input[i * 6 + 2] = p2[i].X[0]; input[i * 6 + 3] = p2[i].X[1]; input[i * 6 + 4] = p2[i].Y[0]; input[i * 6 + 5] = p2[i].Y[1]; } uint[1] memory out; bool success; // solium-disable-next-line security/no-inline-assembly assembly { success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20) // Use "invalid" to make gas estimation work switch success case 0 { invalid() } } require(success,"pairing-opcode-failed"); return out[0] != 0; } /// Convenience method for a pairing check for two pairs. function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) { G1Point[] memory p1 = new G1Point[](2); G2Point[] memory p2 = new G2Point[](2); p1[0] = a1; p1[1] = b1; p2[0] = a2; p2[1] = b2; return pairing(p1, p2); } /// Convenience method for a pairing check for three pairs. function pairingProd3( G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2, G1Point memory c1, G2Point memory c2 ) internal view returns (bool) { G1Point[] memory p1 = new G1Point[](3); G2Point[] memory p2 = new G2Point[](3); p1[0] = a1; p1[1] = b1; p1[2] = c1; p2[0] = a2; p2[1] = b2; p2[2] = c2; return pairing(p1, p2); } /// Convenience method for a pairing check for four pairs. function pairingProd4( G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2, G1Point memory c1, G2Point memory c2, G1Point memory d1, G2Point memory d2 ) internal view returns (bool) { G1Point[] memory p1 = new G1Point[](4); G2Point[] memory p2 = new G2Point[](4); p1[0] = a1; p1[1] = b1; p1[2] = c1; p1[3] = d1; p2[0] = a2; p2[1] = b2; p2[2] = c2; p2[3] = d2; return pairing(p1, p2); } } contract Verifier1912 { using Pairing for *; struct VerifyingKey { Pairing.G1Point alfa1; Pairing.G2Point beta2; Pairing.G2Point gamma2; Pairing.G2Point delta2; Pairing.G1Point[] IC; } struct Proof { Pairing.G1Point A; Pairing.G2Point B; Pairing.G1Point C; } function verifyingKey() internal pure returns (VerifyingKey memory vk) { vk.alfa1 = Pairing.G1Point(20491192805390485299153009773594534940189261866228447918068658471970481763042,9383485363053290200918347156157836566562967994039712273449902621266178545958); vk.beta2 = Pairing.G2Point([4252822878758300859123897981450591353533073413197771768651442665752259397132,6375614351688725206403948262868962793625744043794305715222011528459656738731], [21847035105528745403288232691147584728191162732299865338377159692350059136679,10505242626370262277552901082094356697409835680220590971873171140371331206856]); vk.gamma2 = Pairing.G2Point([11559732032986387107991004021392285783925812861821192530917403151452391805634,10857046999023057135944570762232829481370756359578518086990519993285655852781], [4082367875863433681332203403145435568316851327593401208105741076214120093531,8495653923123431417604973247489272438418190587263600148770280649306958101930]); vk.delta2 = Pairing.G2Point([16151307009706209587217798739293937250432871251497307579292752394736635742489,14329548797716384314265523058168579301279133321511181135976462228470038975385], [6226895166828912910876966681668194721158984931909844771963503681518792554706,18728606439035616911119619623022400682134611718105899759747234792090201571788]); vk.IC = new Pairing.G1Point[](2); vk.IC[0] = Pairing.G1Point(8394216887481608289507961646841022082647799863675986475353742042885410759670,8747706958907576100156745392527328321350097365817362102479250749003488502602); vk.IC[1] = Pairing.G1Point(2631335567881830041014443382863310985657749449200164029449939098710708490586,21357574225670485536604882655365534781433540243222191373523691908066992653561); } function verify(uint[] memory input, Proof memory proof) internal view returns (uint) { uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617; VerifyingKey memory vk = verifyingKey(); require(input.length + 1 == vk.IC.length,"verifier-bad-input"); // Compute the linear combination vk_x Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0); for (uint i = 0; i < input.length; i++) { require(input[i] < snark_scalar_field,"verifier-gte-snark-scalar-field"); vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i])); } vk_x = Pairing.addition(vk_x, vk.IC[0]); if (!Pairing.pairingProd4( Pairing.negate(proof.A), proof.B, vk.alfa1, vk.beta2, vk_x, vk.gamma2, proof.C, vk.delta2 )) return 1; return 0; } /// @return r bool true if proof is valid function verifyProof( uint[2] memory a, uint[2][2] memory b, uint[2] memory c, uint[1] memory input ) public view returns (bool r) { Proof memory proof; proof.A = Pairing.G1Point(a[0], a[1]); proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]); proof.C = Pairing.G1Point(c[0], c[1]); uint[] memory inputValues = new uint[](input.length); for(uint i = 0; i < input.length; i++){ inputValues[i] = input[i]; } if (verify(inputValues, proof) == 0) { return true; } else { return false; } } }
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806343753b4d14610030575b600080fd5b61012c600480360361012081101561004757600080fd5b6040805180820182529183019291818301918390600290839083908082843760009201829052506040805180820190915293969594608081019493509150600290835b828210156100c8576040805180820182529080840286019060029083908390808284376000920191909152505050815260019091019060200161008a565b5050604080518082018252939695948181019493509150600290839083908082843760009201919091525050604080516020818101909252929594938181019392509060019083908390808284376000920191909152509194506101409350505050565b604080519115158252519081900360200190f35b600061014a610d41565b6040805180820182528751815260208089015181830152908352815160808101835287515181840190815288518301516060808401919091529082528351808501855289840180515182525184015181850152828401528483019190915282518084018452875181528783015181840152848401528251600180825281850190945290929091828101908036833701905050905060005b600181101561021a578481600181106101f657fe5b602002015182828151811061020757fe5b60209081029190910101526001016101e1565b506102258183610243565b6102345760019250505061023b565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161026e610d73565b61027661041f565b90508060800151518551600101146102ca576040805162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b604482015290519081900360640190fd5b6102d2610dba565b6040518060400160405280600081526020016000815250905060005b86518110156103a8578387828151811061030457fe5b60200260200101511061035e576040805162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c6400604482015290519081900360640190fd5b61039e826103998560800151846001018151811061037857fe5b60200260200101518a858151811061038c57fe5b60200260200101516107a0565b610835565b91506001016102ee565b506103cb8183608001516000815181106103be57fe5b6020026020010151610835565b90506104016103dd86600001516108c6565b8660200151846000015185602001518587604001518b604001518960600151610952565b6104115760019350505050610419565b600093505050505b92915050565b610427610d73565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f23b550d9053afd5d07901f71c3e49b129e389b146c9c3241d8fab9617cfc09198185019081527f1fae3cb95ee30571071bc923de1f27dab31ab4393678f01b00019210f25ed399828401528152835180850185527f0dc44c3a865e42c84a730af1a83d203312308bf5f9a4bd5efc2f43d1b49b38d281527f296803fdf9892fbb0af19a6b3522b6f4ab7557f0f7c1d9842ff9fcbf04b541cc818501528184015281850152825160028082529181019093529082015b6106a8610dba565b8152602001906001900390816106a057505060808201908152604080518082019091527f128ef55917aebcdeca6aa8edcfaf8828bc1b1fd939c5d4c48406271a16c7a3f681527f135706d4905c7f42b9fe0dd17111d7daebbcc13947eb5b7277b61c6e1a93234a60208201529051805160009061072157fe5b602002602001018190525060405180604001604052807f05d1487cbaa6352afb2269a6a1a0fad391fafe66c2eed6c5f2b4184cb752915a81526020017f2f37f568d0f28d7fc7f6edccfcec8966fe6280eadfd0ec68050d382bfdbf04f9815250816080015160018151811061079257fe5b602002602001018190525090565b6107a8610dba565b6107b0610dd4565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080156107e3576107e5565bfe5b508061082d576040805162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b604482015290519081900360640190fd5b505092915050565b61083d610dba565b610845610df2565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080156107e357508061082d576040805162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b604482015290519081900360640190fd5b6108ce610dba565b81517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd479015801561090157506020830151155b15610921575050604080518082019091526000808252602082015261094d565b6040518060400160405280846000015181526020018285602001518161094357fe5b0683038152509150505b919050565b60408051600480825260a0820190925260009160609190816020015b610976610dba565b81526020019060019003908161096e57505060408051600480825260a0820190925291925060609190602082015b6109ac610e10565b8152602001906001900390816109a45790505090508a826000815181106109cf57fe5b602002602001018190525088826001815181106109e857fe5b60200260200101819052508682600281518110610a0157fe5b60200260200101819052508482600381518110610a1a57fe5b60200260200101819052508981600081518110610a3357fe5b60200260200101819052508781600181518110610a4c57fe5b60200260200101819052508581600281518110610a6557fe5b60200260200101819052508381600381518110610a7e57fe5b6020026020010181905250610a938282610aa2565b9b9a5050505050505050505050565b60008151835114610af3576040805162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b604482015290519081900360640190fd5b82516006810260608167ffffffffffffffff81118015610b1257600080fd5b50604051908082528060200260200182016040528015610b3c578160200160208202803683370190505b50905060005b83811015610cc157868181518110610b5657fe5b602002602001015160000151828260060260000181518110610b7457fe5b602002602001018181525050868181518110610b8c57fe5b602002602001015160200151828260060260010181518110610baa57fe5b602002602001018181525050858181518110610bc257fe5b602090810291909101015151518251839060026006850201908110610be357fe5b602002602001018181525050858181518110610bfb57fe5b60209081029190910101515160016020020151828260060260030181518110610c2057fe5b602002602001018181525050858181518110610c3857fe5b602002602001015160200151600060028110610c5057fe5b6020020151828260060260040181518110610c6757fe5b602002602001018181525050858181518110610c7f57fe5b602002602001015160200151600160028110610c9757fe5b6020020151828260060260050181518110610cae57fe5b6020908102919091010152600101610b42565b50610cca610e30565b6000602082602086026020860160086107d05a03fa90508080156107e3575080610d33576040805162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b604482015290519081900360640190fd5b505115159695505050505050565b6040518060600160405280610d54610dba565b8152602001610d61610e10565b8152602001610d6e610dba565b905290565b6040518060a00160405280610d86610dba565b8152602001610d93610e10565b8152602001610da0610e10565b8152602001610dad610e10565b8152602001606081525090565b604051806040016040528060008152602001600081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b6040518060400160405280610e23610e4e565b8152602001610d6e610e4e565b60405180602001604052806001906020820280368337509192915050565b6040518060400160405280600290602082028036833750919291505056fea2646970667358221220442581370ae5cbca8e41ee6596b5392b28f9eb6d5b808016778085b3db15863964736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
9,780
0x8f0a27b5a44316531d3b77946f0b698923a2c031
/** https://t.me/SaiyanKong */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SaiyanKong is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "SaiyanKong"; string private constant _symbol = "SAIKONG"; uint8 private constant _decimals = 9; mapping (address => uint256) _balances; mapping(address => uint256) _lastTX; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 _totalSupply = 100000000000000 * 10**9; //Buy Fee uint256 private _taxFeeOnBuy = 12; //Sell Fee uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _taxFee = _taxFeeOnSell; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; address payable private _marketingAddress = payable(0x643a7a2AB871F132D33E838a0594b025F27cc680); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; bool private transferDelay = true; uint256 public _maxTxAmount = 1000000000000 * 10**9; uint256 public _maxWalletSize = 2000000000000 * 10**9; uint256 public _swapTokensAtAmount = 1000000000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _balances[_msgSender()] = _totalSupply; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_marketingAddress] = true; //multisig emit Transfer(address(0), _msgSender(), _totalSupply); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (!_isExcludedFromFee[to] && !_isExcludedFromFee[from]) { require(tradingOpen, "TOKEN: Trading not yet started"); require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { if(from == uniswapV2Pair && transferDelay){ require(_lastTX[tx.origin] + 3 minutes < block.timestamp && _lastTX[to] + 3 minutes < block.timestamp, "TOKEN: 3 minutes cooldown between buys"); } require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _swapTokensAtAmount) { contractTokenBalance = _swapTokensAtAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); // Reserve of 15% of tokens for liquidity uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0 ether) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _taxFee = _taxFeeOnSell; } } _lastTX[tx.origin] = block.timestamp; _lastTX[to] = block.timestamp; _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { uint256 ethAmt = tokenAmount.mul(85).div(100); uint256 liqAmt = tokenAmount - ethAmt; uint256 balanceBefore = address(this).balance; address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( ethAmt, 0, path, address(this), block.timestamp ); uint256 amountETH = address(this).balance.sub(balanceBefore); addLiquidity(liqAmt, amountETH.mul(15).div(100)); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(0), block.timestamp ); } function LAUNCH(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) {_transferNoTax(sender,recipient, amount);} else {_transferStandard(sender, recipient, amount);} } function airdrop(address[] calldata recipients, uint256[] calldata amount) public onlyOwner{ for (uint256 i = 0; i < recipients.length; i++) { _transferNoTax(msg.sender,recipients[i], amount[i]); } } function _transferStandard( address sender, address recipient, uint256 amount ) private { uint256 amountReceived = takeFees(sender, amount); _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); } function _transferNoTax(address sender, address recipient, uint256 amount) internal returns (bool) { _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); return true; } function takeFees(address sender,uint256 amount) internal returns (uint256) { uint256 feeAmount = amount.mul(_taxFee).div(100); _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(sender, address(this), feeAmount); return amount.sub(feeAmount); } receive() external payable {} function transferOwnership(address newOwner) public override onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _isExcludedFromFee[owner()] = false; _transferOwnership(newOwner); _isExcludedFromFee[owner()] = true; } function setFees(uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function setIsFeeExempt(address holder, bool exempt) public onlyOwner { _isExcludedFromFee[holder] = exempt; } function toggleTransferDelay() public onlyOwner { transferDelay = !transferDelay; } }
0x6080604052600436106101d05760003560e01c806370a08231116100f757806395d89b4111610095578063c3c8cd8011610064578063c3c8cd801461065a578063dd62ed3e14610671578063ea1644d5146106ae578063f2fde38b146106d7576101d7565b806395d89b411461058c57806398a5c315146105b7578063a9059cbb146105e0578063bfd792841461061d576101d7565b80637d1db4a5116100d15780637d1db4a5146104f45780638da5cb5b1461051f5780638eb59a5f1461054a5780638f9a55c014610561576101d7565b806370a0823114610477578063715018a6146104b457806374010ece146104cb576101d7565b80632fd689e31161016f578063658d4b7f1161013e578063658d4b7f146103d357806367243482146103fc5780636b999053146104255780636d8aa8f81461044e576101d7565b80632fd689e314610329578063313ce567146103545780634828d3681461037f57806349bd5a5e146103a8576101d7565b80630b78f9c0116101ab5780630b78f9c01461026d5780631694505e1461029657806318160ddd146102c157806323b872dd146102ec576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe919061301c565b610700565b005b34801561021157600080fd5b5061021a610811565b6040516102279190613506565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612f5b565b61084e565b60405161026491906134d0565b60405180910390f35b34801561027957600080fd5b50610294600480360381019061028f91906130bf565b61086c565b005b3480156102a257600080fd5b506102ab6108fa565b6040516102b891906134eb565b60405180910390f35b3480156102cd57600080fd5b506102d6610920565b6040516102e391906136e8565b60405180910390f35b3480156102f857600080fd5b50610313600480360381019061030e9190612ec8565b61092a565b60405161032091906134d0565b60405180910390f35b34801561033557600080fd5b5061033e610a03565b60405161034b91906136e8565b60405180910390f35b34801561036057600080fd5b50610369610a09565b604051610376919061375d565b60405180910390f35b34801561038b57600080fd5b506103a660048036038101906103a19190613065565b610a12565b005b3480156103b457600080fd5b506103bd610aab565b6040516103ca9190613454565b60405180910390f35b3480156103df57600080fd5b506103fa60048036038101906103f59190612f1b565b610ad1565b005b34801561040857600080fd5b50610423600480360381019061041e9190612f9b565b610ba8565b005b34801561043157600080fd5b5061044c60048036038101906104479190612e2e565b610c98565b005b34801561045a57600080fd5b5061047560048036038101906104709190613065565b610d6f565b005b34801561048357600080fd5b5061049e60048036038101906104999190612e2e565b610e08565b6040516104ab91906136e8565b60405180910390f35b3480156104c057600080fd5b506104c9610e51565b005b3480156104d757600080fd5b506104f260048036038101906104ed9190613092565b610ed9565b005b34801561050057600080fd5b50610509610f5f565b60405161051691906136e8565b60405180910390f35b34801561052b57600080fd5b50610534610f65565b6040516105419190613454565b60405180910390f35b34801561055657600080fd5b5061055f610f8e565b005b34801561056d57600080fd5b50610576611036565b60405161058391906136e8565b60405180910390f35b34801561059857600080fd5b506105a161103c565b6040516105ae9190613506565b60405180910390f35b3480156105c357600080fd5b506105de60048036038101906105d99190613092565b611079565b005b3480156105ec57600080fd5b5061060760048036038101906106029190612f5b565b6110ff565b60405161061491906134d0565b60405180910390f35b34801561062957600080fd5b50610644600480360381019061063f9190612e2e565b61111d565b60405161065191906134d0565b60405180910390f35b34801561066657600080fd5b5061066f61113d565b005b34801561067d57600080fd5b5061069860048036038101906106939190612e88565b6111d2565b6040516106a591906136e8565b60405180910390f35b3480156106ba57600080fd5b506106d560048036038101906106d09190613092565b611259565b005b3480156106e357600080fd5b506106fe60048036038101906106f99190612e2e565b6112df565b005b610708611495565b73ffffffffffffffffffffffffffffffffffffffff16610726610f65565b73ffffffffffffffffffffffffffffffffffffffff161461077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077390613648565b60405180910390fd5b60005b815181101561080d576001600a60008484815181106107a1576107a0613adb565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061080590613a34565b91505061077f565b5050565b60606040518060400160405280600a81526020017f53616979616e4b6f6e6700000000000000000000000000000000000000000000815250905090565b600061086261085b611495565b848461149d565b6001905092915050565b610874611495565b73ffffffffffffffffffffffffffffffffffffffff16610892610f65565b73ffffffffffffffffffffffffffffffffffffffff16146108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df90613648565b60405180910390fd5b81600681905550806007819055505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600554905090565b6000610937848484611668565b6109f884610943611495565b6109f385604051806060016040528060288152602001613f6360289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006109a9611495565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b61149d565b600190509392505050565b60105481565b60006009905090565b610a1a611495565b73ffffffffffffffffffffffffffffffffffffffff16610a38610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610a8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8590613648565b60405180910390fd5b80600d60146101000a81548160ff02191690831515021790555050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ad9611495565b73ffffffffffffffffffffffffffffffffffffffff16610af7610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4490613648565b60405180910390fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b610bb0611495565b73ffffffffffffffffffffffffffffffffffffffff16610bce610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610c24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1b90613648565b60405180910390fd5b60005b84849050811015610c9157610c7d33868684818110610c4957610c48613adb565b5b9050602002016020810190610c5e9190612e2e565b858585818110610c7157610c70613adb565b5b90506020020135612062565b508080610c8990613a34565b915050610c27565b5050505050565b610ca0611495565b73ffffffffffffffffffffffffffffffffffffffff16610cbe610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0b90613648565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610d77611495565b73ffffffffffffffffffffffffffffffffffffffff16610d95610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610deb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de290613648565b60405180910390fd5b80600d60166101000a81548160ff02191690831515021790555050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610e59611495565b73ffffffffffffffffffffffffffffffffffffffff16610e77610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610ecd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec490613648565b60405180910390fd5b610ed76000612235565b565b610ee1611495565b73ffffffffffffffffffffffffffffffffffffffff16610eff610f65565b73ffffffffffffffffffffffffffffffffffffffff1614610f55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4c90613648565b60405180910390fd5b80600e8190555050565b600e5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610f96611495565b73ffffffffffffffffffffffffffffffffffffffff16610fb4610f65565b73ffffffffffffffffffffffffffffffffffffffff161461100a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100190613648565b60405180910390fd5b600d60179054906101000a900460ff1615600d60176101000a81548160ff021916908315150217905550565b600f5481565b60606040518060400160405280600781526020017f5341494b4f4e4700000000000000000000000000000000000000000000000000815250905090565b611081611495565b73ffffffffffffffffffffffffffffffffffffffff1661109f610f65565b73ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ec90613648565b60405180910390fd5b8060108190555050565b600061111361110c611495565b8484611668565b6001905092915050565b600a6020528060005260406000206000915054906101000a900460ff1681565b611145611495565b73ffffffffffffffffffffffffffffffffffffffff16611163610f65565b73ffffffffffffffffffffffffffffffffffffffff16146111b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b090613648565b60405180910390fd5b60006111c430610e08565b90506111cf816122f9565b50565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611261611495565b73ffffffffffffffffffffffffffffffffffffffff1661127f610f65565b73ffffffffffffffffffffffffffffffffffffffff16146112d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112cc90613648565b60405180910390fd5b80600f8190555050565b6112e7611495565b73ffffffffffffffffffffffffffffffffffffffff16611305610f65565b73ffffffffffffffffffffffffffffffffffffffff161461135b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135290613648565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c290613568565b60405180910390fd5b6000600460006113d9610f65565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061143381612235565b600160046000611441610f65565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561150d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611504906136c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561157d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157490613588565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161165b91906136e8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cf90613688565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173f90613528565b60405180910390fd5b6000811161178b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178290613668565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561182f5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611c8757600d60149054906101000a900460ff16611883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187a906135c8565b60405180910390fd5b600e548111156118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf90613548565b60405180910390fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561196c5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a2906135a8565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611baa57600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611a695750600d60179054906101000a900460ff165b15611b52574260b4600260003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abb919061381e565b108015611b1257504260b4600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b10919061381e565b105b611b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4890613608565b60405180910390fd5b5b600f5481611b5f84610e08565b611b69919061381e565b10611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba0906136a8565b60405180910390fd5b5b6000611bb530610e08565b9050600060105482101590506010548210611bd05760105491505b808015611bea5750600d60159054906101000a900460ff16155b8015611c445750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611c5c5750600d60169054906101000a900460ff165b15611c8457611c6a826122f9565b60004790506000811115611c8257611c814761260c565b5b505b50505b600060019050600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d2e5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611de15750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611de05750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611def5760009050611f64565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611e9a5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611ea9576006546008819055505b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611f545750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611f63576007546008819055505b5b42600260003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ff884848484612678565b50505050565b6000838311158290612046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203d9190613506565b60405180910390fd5b506000838561205591906138ff565b9050809150509392505050565b60006120ed826040518060400160405280601481526020017f496e73756666696369656e742042616c616e6365000000000000000000000000815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061218282600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161222291906136e8565b60405180910390a3600190509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001600d60156101000a81548160ff021916908315150217905550600061233d606461232f6055856126fe90919063ffffffff16565b61277990919063ffffffff16565b90506000818361234d91906138ff565b905060004790506000600267ffffffffffffffff81111561237157612370613b0a565b5b60405190808252806020026020018201604052801561239f5781602001602082028036833780820191505090505b50905030816000815181106123b7576123b6613adb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561245957600080fd5b505afa15801561246d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124919190612e5b565b816001815181106124a5576124a4613adb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061250c30600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168761149d565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478560008430426040518663ffffffff1660e01b8152600401612570959493929190613703565b600060405180830381600087803b15801561258a57600080fd5b505af115801561259e573d6000803e3d6000fd5b5050505060006125b783476127c390919063ffffffff16565b90506125e9846125e460646125d6600f866126fe90919063ffffffff16565b61277990919063ffffffff16565b61280d565b50505050506000600d60156101000a81548160ff02191690831515021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612674573d6000803e3d6000fd5b5050565b8061268e57612688848484612062565b5061269a565b6126998484846128fb565b5b50505050565b60008082846126af919061381e565b9050838110156126f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126eb906135e8565b60405180910390fd5b8091505092915050565b6000808314156127115760009050612773565b6000828461271f91906138a5565b905082848261272e9190613874565b1461276e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161276590613628565b60405180910390fd5b809150505b92915050565b60006127bb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612ad5565b905092915050565b600061280583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ffe565b905092915050565b61283a30600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461149d565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7198230856000806000426040518863ffffffff1660e01b81526004016128a29695949392919061346f565b6060604051808303818588803b1580156128bb57600080fd5b505af11580156128cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906128f491906130ff565b5050505050565b60006129078483612b38565b9050612992826040518060400160405280601481526020017f496e73756666696369656e742042616c616e6365000000000000000000000000815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a2781600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612ac791906136e8565b60405180910390a350505050565b60008083118290612b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b139190613506565b60405180910390fd5b5060008385612b2b9190613874565b9050809150509392505050565b600080612b636064612b55600854866126fe90919063ffffffff16565b61277990919063ffffffff16565b9050612bb781600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612c5791906136e8565b60405180910390a3612c7281846127c390919063ffffffff16565b91505092915050565b6000612c8e612c898461379d565b613778565b90508083825260208201905082856020860282011115612cb157612cb0613b43565b5b60005b85811015612ce15781612cc78882612ceb565b845260208401935060208301925050600181019050612cb4565b5050509392505050565b600081359050612cfa81613f1d565b92915050565b600081519050612d0f81613f1d565b92915050565b60008083601f840112612d2b57612d2a613b3e565b5b8235905067ffffffffffffffff811115612d4857612d47613b39565b5b602083019150836020820283011115612d6457612d63613b43565b5b9250929050565b600082601f830112612d8057612d7f613b3e565b5b8135612d90848260208601612c7b565b91505092915050565b60008083601f840112612daf57612dae613b3e565b5b8235905067ffffffffffffffff811115612dcc57612dcb613b39565b5b602083019150836020820283011115612de857612de7613b43565b5b9250929050565b600081359050612dfe81613f34565b92915050565b600081359050612e1381613f4b565b92915050565b600081519050612e2881613f4b565b92915050565b600060208284031215612e4457612e43613b4d565b5b6000612e5284828501612ceb565b91505092915050565b600060208284031215612e7157612e70613b4d565b5b6000612e7f84828501612d00565b91505092915050565b60008060408385031215612e9f57612e9e613b4d565b5b6000612ead85828601612ceb565b9250506020612ebe85828601612ceb565b9150509250929050565b600080600060608486031215612ee157612ee0613b4d565b5b6000612eef86828701612ceb565b9350506020612f0086828701612ceb565b9250506040612f1186828701612e04565b9150509250925092565b60008060408385031215612f3257612f31613b4d565b5b6000612f4085828601612ceb565b9250506020612f5185828601612def565b9150509250929050565b60008060408385031215612f7257612f71613b4d565b5b6000612f8085828601612ceb565b9250506020612f9185828601612e04565b9150509250929050565b60008060008060408587031215612fb557612fb4613b4d565b5b600085013567ffffffffffffffff811115612fd357612fd2613b48565b5b612fdf87828801612d15565b9450945050602085013567ffffffffffffffff81111561300257613001613b48565b5b61300e87828801612d99565b925092505092959194509250565b60006020828403121561303257613031613b4d565b5b600082013567ffffffffffffffff8111156130505761304f613b48565b5b61305c84828501612d6b565b91505092915050565b60006020828403121561307b5761307a613b4d565b5b600061308984828501612def565b91505092915050565b6000602082840312156130a8576130a7613b4d565b5b60006130b684828501612e04565b91505092915050565b600080604083850312156130d6576130d5613b4d565b5b60006130e485828601612e04565b92505060206130f585828601612e04565b9150509250929050565b60008060006060848603121561311857613117613b4d565b5b600061312686828701612e19565b935050602061313786828701612e19565b925050604061314886828701612e19565b9150509250925092565b600061315e838361316a565b60208301905092915050565b61317381613933565b82525050565b61318281613933565b82525050565b6000613193826137d9565b61319d81856137fc565b93506131a8836137c9565b8060005b838110156131d95781516131c08882613152565b97506131cb836137ef565b9250506001810190506131ac565b5085935050505092915050565b6131ef81613945565b82525050565b6131fe81613988565b82525050565b61320d8161399a565b82525050565b600061321e826137e4565b613228818561380d565b93506132388185602086016139d0565b61324181613b52565b840191505092915050565b600061325960238361380d565b915061326482613b63565b604082019050919050565b600061327c601c8361380d565b915061328782613bb2565b602082019050919050565b600061329f60268361380d565b91506132aa82613bdb565b604082019050919050565b60006132c260228361380d565b91506132cd82613c2a565b604082019050919050565b60006132e560238361380d565b91506132f082613c79565b604082019050919050565b6000613308601e8361380d565b915061331382613cc8565b602082019050919050565b600061332b601b8361380d565b915061333682613cf1565b602082019050919050565b600061334e60268361380d565b915061335982613d1a565b604082019050919050565b600061337160218361380d565b915061337c82613d69565b604082019050919050565b600061339460208361380d565b915061339f82613db8565b602082019050919050565b60006133b760298361380d565b91506133c282613de1565b604082019050919050565b60006133da60258361380d565b91506133e582613e30565b604082019050919050565b60006133fd60238361380d565b915061340882613e7f565b604082019050919050565b600061342060248361380d565b915061342b82613ece565b604082019050919050565b61343f81613971565b82525050565b61344e8161397b565b82525050565b60006020820190506134696000830184613179565b92915050565b600060c0820190506134846000830189613179565b6134916020830188613436565b61349e6040830187613204565b6134ab6060830186613204565b6134b86080830185613179565b6134c560a0830184613436565b979650505050505050565b60006020820190506134e560008301846131e6565b92915050565b600060208201905061350060008301846131f5565b92915050565b600060208201905081810360008301526135208184613213565b905092915050565b600060208201905081810360008301526135418161324c565b9050919050565b600060208201905081810360008301526135618161326f565b9050919050565b6000602082019050818103600083015261358181613292565b9050919050565b600060208201905081810360008301526135a1816132b5565b9050919050565b600060208201905081810360008301526135c1816132d8565b9050919050565b600060208201905081810360008301526135e1816132fb565b9050919050565b600060208201905081810360008301526136018161331e565b9050919050565b6000602082019050818103600083015261362181613341565b9050919050565b6000602082019050818103600083015261364181613364565b9050919050565b6000602082019050818103600083015261366181613387565b9050919050565b60006020820190508181036000830152613681816133aa565b9050919050565b600060208201905081810360008301526136a1816133cd565b9050919050565b600060208201905081810360008301526136c1816133f0565b9050919050565b600060208201905081810360008301526136e181613413565b9050919050565b60006020820190506136fd6000830184613436565b92915050565b600060a0820190506137186000830188613436565b6137256020830187613204565b81810360408301526137378186613188565b90506137466060830185613179565b6137536080830184613436565b9695505050505050565b60006020820190506137726000830184613445565b92915050565b6000613782613793565b905061378e8282613a03565b919050565b6000604051905090565b600067ffffffffffffffff8211156137b8576137b7613b0a565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061382982613971565b915061383483613971565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561386957613868613a7d565b5b828201905092915050565b600061387f82613971565b915061388a83613971565b92508261389a57613899613aac565b5b828204905092915050565b60006138b082613971565b91506138bb83613971565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138f4576138f3613a7d565b5b828202905092915050565b600061390a82613971565b915061391583613971565b92508282101561392857613927613a7d565b5b828203905092915050565b600061393e82613951565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613993826139ac565b9050919050565b60006139a582613971565b9050919050565b60006139b7826139be565b9050919050565b60006139c982613951565b9050919050565b60005b838110156139ee5780820151818401526020810190506139d3565b838111156139fd576000848401525b50505050565b613a0c82613b52565b810181811067ffffffffffffffff82111715613a2b57613a2a613b0a565b5b80604052505050565b6000613a3f82613971565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a7257613a71613a7d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054726164696e67206e6f742079657420737461727465640000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f544f4b454e3a2033206d696e7574657320636f6f6c646f776e2062657477656560008201527f6e20627579730000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613f2681613933565b8114613f3157600080fd5b50565b613f3d81613945565b8114613f4857600080fd5b50565b613f5481613971565b8114613f5f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204b279f00f49a9d98578d0d8cd18001025dc15e945583045202140450367e9e6e64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,781
0xca555f3e00226f5ff3424b16394c0e063c35e549
/** / SPDX-License-Identifier: UNLICENSE /** Stealth Launch ; MAXBUY INU ERC20 When there is a limit on $MAXBUYINU What is the point to buy less ? Supply: 1,000,000 Max TX: 20,000 Tax: 9% TG: https://t.me/MAXBUYINU Website: https://maxbuyinu.com/ **/ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract MAXBUYINU is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "MAXBUY INU"; string private constant _symbol = "MAXBUYINU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 public _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _maxTxAmount = _tTotal.div(50); emit Transfer(address(_msgSender()), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 9; _feeAddr2 = 9; if (from != owner() && to != owner()) { if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // buy require(amount <= _maxTxAmount); require(tradingOpen); } if ( from != address(uniswapV2Router) && ! _isExcludedFromFee[from]&&to == uniswapV2Pair){ require(!bots[from] && !bots[to]); _feeAddr1 = 9; _feeAddr2 = 9; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function increaseMaxTx(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function addSwap() external onlyOwner { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function addLiq() external onlyOwner{ uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function enableTrading() external onlyOwner{ tradingOpen = true; } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { if(bots_[i]!=address(uniswapV2Router) && bots_[i]!=address(uniswapV2Pair) &&bots_[i]!=address(this)){ bots[bots_[i]] = true; } } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c80637d1db4a5116100ab578063a9059cbb1161006f578063a9059cbb14610335578063b515566a14610355578063c3c8cd8014610375578063d91a21a61461038a578063dd62ed3e146103aa578063e9e1831a146103f057600080fd5b80637d1db4a51461029b5780638a259e6c146102b15780638a8c523c146102c65780638da5cb5b146102db57806395d89b411461030357600080fd5b8063313ce567116100f2578063313ce567146102155780635932ead1146102315780636fc3eaec1461025157806370a0823114610266578063715018a61461028657600080fd5b806306fdde031461013a578063095ea7b31461017f57806318160ddd146101af57806323b872dd146101d3578063273123b7146101f357600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600a8152694d415842555920494e5560b01b60208201525b6040516101769190611628565b60405180910390f35b34801561018b57600080fd5b5061019f61019a3660046116a2565b610405565b6040519015158152602001610176565b3480156101bb57600080fd5b5066038d7ea4c680005b604051908152602001610176565b3480156101df57600080fd5b5061019f6101ee3660046116ce565b61041c565b3480156101ff57600080fd5b5061021361020e36600461170f565b610485565b005b34801561022157600080fd5b5060405160098152602001610176565b34801561023d57600080fd5b5061021361024c36600461173a565b6104d9565b34801561025d57600080fd5b50610213610521565b34801561027257600080fd5b506101c561028136600461170f565b61052e565b34801561029257600080fd5b50610213610550565b3480156102a757600080fd5b506101c5600f5481565b3480156102bd57600080fd5b506102136105c4565b3480156102d257600080fd5b50610213610790565b3480156102e757600080fd5b506000546040516001600160a01b039091168152602001610176565b34801561030f57600080fd5b506040805180820190915260098152684d4158425559494e5560b81b6020820152610169565b34801561034157600080fd5b5061019f6103503660046116a2565b6107cf565b34801561036157600080fd5b5061021361037036600461176d565b6107dc565b34801561038157600080fd5b50610213610930565b34801561039657600080fd5b506102136103a5366004611832565b610946565b3480156103b657600080fd5b506101c56103c536600461184b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156103fc57600080fd5b5061021361099f565b6000610412338484610b61565b5060015b92915050565b6000610429848484610c85565b61047b843361047685604051806060016040528060288152602001611a48602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f9f565b610b61565b5060019392505050565b6000546001600160a01b031633146104b85760405162461bcd60e51b81526004016104af90611884565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105035760405162461bcd60e51b81526004016104af90611884565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b4761052b81610fd9565b50565b6001600160a01b03811660009081526002602052604081205461041690611013565b6000546001600160a01b0316331461057a5760405162461bcd60e51b81526004016104af90611884565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105ee5760405162461bcd60e51b81526004016104af90611884565b600d80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610629308266038d7ea4c68000610b61565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610667573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068b91906118b9565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fc91906118b9565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610749573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076d91906118b9565b600e80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b031633146107ba5760405162461bcd60e51b81526004016104af90611884565b600e805460ff60a01b1916600160a01b179055565b6000610412338484610c85565b6000546001600160a01b031633146108065760405162461bcd60e51b81526004016104af90611884565b60005b815181101561092c57600d5482516001600160a01b0390911690839083908110610835576108356118d6565b60200260200101516001600160a01b0316141580156108865750600e5482516001600160a01b0390911690839083908110610872576108726118d6565b60200260200101516001600160a01b031614155b80156108bd5750306001600160a01b03168282815181106108a9576108a96118d6565b60200260200101516001600160a01b031614155b1561091a576001600660008484815181106108da576108da6118d6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061092481611902565b915050610809565b5050565b600061093b3061052e565b905061052b81611090565b6000546001600160a01b031633146109705760405162461bcd60e51b81526004016104af90611884565b6000811161097d57600080fd5b610999606461099366038d7ea4c680008461120a565b90610b18565b600f5550565b6000546001600160a01b031633146109c95760405162461bcd60e51b81526004016104af90611884565b600d546001600160a01b031663f305d71947306109e58161052e565b6000806109fa6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a62573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a87919061191b565b5050600e805461ffff60b01b19811661010160b01b17909155600d5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610af4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190611949565b6000610b5a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061128c565b9392505050565b6001600160a01b038316610bc35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104af565b6001600160a01b038216610c245760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104af565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104af565b6001600160a01b038216610d4b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104af565b60008111610dad5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104af565b6009600a819055600b556000546001600160a01b03848116911614801590610de357506000546001600160a01b03838116911614155b15610f8f57600e546001600160a01b038481169116148015610e135750600d546001600160a01b03838116911614155b8015610e3857506001600160a01b03821660009081526005602052604090205460ff16155b8015610e4d5750600e54600160b81b900460ff165b15610e7757600f54811115610e6157600080fd5b600e54600160a01b900460ff16610e7757600080fd5b600d546001600160a01b03848116911614801590610eae57506001600160a01b03831660009081526005602052604090205460ff16155b8015610ec75750600e546001600160a01b038381169116145b15610f22576001600160a01b03831660009081526006602052604090205460ff16158015610f0e57506001600160a01b03821660009081526006602052604090205460ff16155b610f1757600080fd5b6009600a819055600b555b6000610f2d3061052e565b600e54909150600160a81b900460ff16158015610f585750600e546001600160a01b03858116911614155b8015610f6d5750600e54600160b01b900460ff165b15610f8d57610f7b81611090565b478015610f8b57610f8b47610fd9565b505b505b610f9a8383836112ba565b505050565b60008184841115610fc35760405162461bcd60e51b81526004016104af9190611628565b506000610fd08486611966565b95945050505050565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561092c573d6000803e3d6000fd5b600060085482111561107a5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104af565b60006110846112c5565b9050610b5a8382610b18565b600e805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110d8576110d86118d6565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611131573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115591906118b9565b81600181518110611168576111686118d6565b6001600160a01b039283166020918202929092010152600d5461118e9130911684610b61565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111c790859060009086903090429060040161197d565b600060405180830381600087803b1580156111e157600080fd5b505af11580156111f5573d6000803e3d6000fd5b5050600e805460ff60a81b1916905550505050565b60008260000361121c57506000610416565b600061122883856119ee565b9050826112358583611a0d565b14610b5a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104af565b600081836112ad5760405162461bcd60e51b81526004016104af9190611628565b506000610fd08486611a0d565b610f9a8383836112e8565b60008060006112d26113df565b90925090506112e18282610b18565b9250505090565b6000806000806000806112fa8761141d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061132c908761147a565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461135b90866114bc565b6001600160a01b03891660009081526002602052604090205561137d8161151b565b6113878483611565565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113cc91815260200190565b60405180910390a3505050505050505050565b600854600090819066038d7ea4c680006113f98282610b18565b8210156114145750506008549266038d7ea4c6800092509050565b90939092509050565b600080600080600080600080600061143a8a600a54600b54611589565b925092509250600061144a6112c5565b9050600080600061145d8e8787876115d8565b919e509c509a509598509396509194505050505091939550919395565b6000610b5a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f9f565b6000806114c98385611a2f565b905083811015610b5a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104af565b60006115256112c5565b90506000611533838361120a565b3060009081526002602052604090205490915061155090826114bc565b30600090815260026020526040902055505050565b600854611572908361147a565b60085560095461158290826114bc565b6009555050565b600080808061159d6064610993898961120a565b905060006115b060646109938a8961120a565b905060006115c8826115c28b8661147a565b9061147a565b9992985090965090945050505050565b60008080806115e7888661120a565b905060006115f5888761120a565b90506000611603888861120a565b90506000611615826115c2868661147a565b939b939a50919850919650505050505050565b600060208083528351808285015260005b8181101561165557858101830151858201604001528201611639565b81811115611667576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461052b57600080fd5b803561169d8161167d565b919050565b600080604083850312156116b557600080fd5b82356116c08161167d565b946020939093013593505050565b6000806000606084860312156116e357600080fd5b83356116ee8161167d565b925060208401356116fe8161167d565b929592945050506040919091013590565b60006020828403121561172157600080fd5b8135610b5a8161167d565b801515811461052b57600080fd5b60006020828403121561174c57600080fd5b8135610b5a8161172c565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561178057600080fd5b823567ffffffffffffffff8082111561179857600080fd5b818501915085601f8301126117ac57600080fd5b8135818111156117be576117be611757565b8060051b604051601f19603f830116810181811085821117156117e3576117e3611757565b60405291825284820192508381018501918883111561180157600080fd5b938501935b828510156118265761181785611692565b84529385019392850192611806565b98975050505050505050565b60006020828403121561184457600080fd5b5035919050565b6000806040838503121561185e57600080fd5b82356118698161167d565b915060208301356118798161167d565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156118cb57600080fd5b8151610b5a8161167d565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611914576119146118ec565b5060010190565b60008060006060848603121561193057600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561195b57600080fd5b8151610b5a8161172c565b600082821015611978576119786118ec565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119cd5784516001600160a01b0316835293830193918301916001016119a8565b50506001600160a01b03969096166060850152505050608001529392505050565b6000816000190483118215151615611a0857611a086118ec565b500290565b600082611a2a57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a4257611a426118ec565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208a4ae711e67e2e51e869dcedce727a5a8587c23c3569d22d267a4fb8b37363af64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,782
0x231b69814c5a7c2D4f191DA138202D7702EfEa1F
/** *Submitted for verification at Etherscan.io on 2022-02-07 */ // SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library LowGasSafeMath { /// @notice Returns x + y, reverts if sum overflows uint256 /// @param x The augend /// @param y The addend /// @return z The sum of x and y function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x); } function add32(uint32 x, uint32 y) internal pure returns (uint32 z) { require((z = x + y) >= x); } /// @notice Returns x - y, reverts if underflows /// @param x The minuend /// @param y The subtrahend /// @return z The difference of x and y function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x); } function sub32(uint32 x, uint32 y) internal pure returns (uint32 z) { require((z = x - y) <= x); } /// @notice Returns x * y, reverts if overflows /// @param x The multiplicand /// @param y The multiplier /// @return z The product of x and y function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(x == 0 || (z = x * y) / x == y); } /// @notice Returns x + y, reverts if overflows or underflows /// @param x The augend /// @param y The addend /// @return z The sum of x and y function add(int256 x, int256 y) internal pure returns (int256 z) { require((z = x + y) >= x == (y >= 0)); } /// @notice Returns x - y, reverts if overflows or underflows /// @param x The minuend /// @param y The subtrahend /// @return z The difference of x and y function sub(int256 x, int256 y) internal pure returns (int256 z) { require((z = x - y) <= x == (y >= 0)); } function div(uint256 x, uint256 y) internal pure returns(uint256 z){ require(y > 0); z=x/y; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns(bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function addressToString(address _address) internal pure returns(string memory) { bytes32 _bytes = bytes32(uint256(_address)); bytes memory HEX = "0123456789abcdef"; bytes memory _addr = new bytes(42); _addr[0] = '0'; _addr[1] = 'x'; for(uint256 i = 0; i < 20; i++) { _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)]; _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)]; } return string(_addr); } } contract OwnableData { address public owner; address public pendingOwner; } contract Ownable is OwnableData { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /// @notice `owner` defaults to msg.sender on construction. constructor() { owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner. /// Can only be invoked by the current `owner`. /// @param newOwner Address of the new owner. /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`. /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise. function transferOwnership( address newOwner, bool direct, bool renounce ) public onlyOwner { if (direct) { // Checks require(newOwner != address(0) || renounce, "Ownable: zero address"); // Effects emit OwnershipTransferred(owner, newOwner); owner = newOwner; pendingOwner = address(0); } else { // Effects pendingOwner = newOwner; } } /// @notice Needs to be called by `pendingOwner` to claim ownership. function claimOwnership() public { address _pendingOwner = pendingOwner; // Checks require(msg.sender == _pendingOwner, "Ownable: caller != pending owner"); // Effects emit OwnershipTransferred(owner, _pendingOwner); owner = _pendingOwner; pendingOwner = address(0); } /// @notice Only allows the `owner` to execute the function. modifier onlyOwner() { require(msg.sender == owner, "Ownable: caller is not the owner"); _; } } interface ITreasury { function mintRewards( address _recipient, uint _amount ) external; } contract Distributor is Ownable { using LowGasSafeMath for uint; using LowGasSafeMath for uint32; /* ====== VARIABLES ====== */ IERC20 public immutable SIN; ITreasury public immutable treasury; uint32 public immutable epochLength; uint32 public nextEpochTime; mapping( uint => Adjust ) public adjustments; event LogDistribute(address indexed recipient, uint amount); event LogAdjust(uint initialRate, uint currentRate, uint targetRate); event LogAddRecipient(address indexed recipient, uint rate); event LogRemoveRecipient(address indexed recipient); /* ====== STRUCTS ====== */ struct Info { uint rate; // in ten-thousandths ( 5000 = 0.5% ) address recipient; } Info[] public info; struct Adjust { bool add; uint rate; uint target; } /* ====== CONSTRUCTOR ====== */ constructor( address _treasury, address _sin, uint32 _epochLength, uint32 _nextEpochTime ) { require( _treasury != address(0) ); treasury = ITreasury(_treasury); require( _sin != address(0) ); SIN = IERC20(_sin); epochLength = _epochLength; nextEpochTime = _nextEpochTime; } /* ====== PUBLIC FUNCTIONS ====== */ /** @notice send epoch reward to staking contract */ function distribute() external returns ( bool ) { if ( nextEpochTime <= uint32(block.timestamp) ) { nextEpochTime = nextEpochTime.add32( epochLength ); // set next epoch time // distribute rewards to each recipient for ( uint i = 0; i < info.length; i++ ) { if ( info[ i ].rate > 0 ) { treasury.mintRewards( // mint and send from treasury info[ i ].recipient, nextRewardAt( info[ i ].rate ) ); adjust( i ); // check for adjustment } emit LogDistribute(info[ i ].recipient, nextRewardAt( info[ i ].rate )); } return true; } else { return false; } } /* ====== INTERNAL FUNCTIONS ====== */ /** @notice increment reward rate for collector */ function adjust( uint _index ) internal { Adjust memory adjustment = adjustments[ _index ]; if ( adjustment.rate != 0 ) { uint initial = info[ _index ].rate; uint rate = initial; if ( adjustment.add ) { // if rate should increase rate = rate.add( adjustment.rate ); // raise rate if ( rate >= adjustment.target ) { // if target met rate = adjustment.target; delete adjustments[ _index ]; } } else { // if rate should decrease rate = rate.sub( adjustment.rate ); // lower rate if ( rate <= adjustment.target ) { // if target met rate = adjustment.target; delete adjustments[ _index ]; } } info[ _index ].rate = rate; emit LogAdjust(initial, rate, adjustment.target); } } /* ====== VIEW FUNCTIONS ====== */ /** @notice view function for next reward at given rate @param _rate uint @return uint */ function nextRewardAt( uint _rate ) public view returns ( uint ) { return SIN.totalSupply().mul( _rate ).div( 1000000 ); } /** @notice view function for next reward for specified address @param _recipient address @return uint */ function nextRewardFor( address _recipient ) external view returns ( uint ) { uint reward; for ( uint i = 0; i < info.length; i++ ) { if ( info[ i ].recipient == _recipient ) { reward = nextRewardAt( info[ i ].rate ); } } return reward; } /* ====== POLICY FUNCTIONS ====== */ /** @notice adds recipient for distributions @param _recipient address @param _rewardRate uint */ function addRecipient( address _recipient, uint _rewardRate ) external onlyOwner { require( _recipient != address(0), "IA" ); require(info.length <= 4, "limit recipients max to 5"); info.push( Info({ recipient: _recipient, rate: _rewardRate })); emit LogAddRecipient(_recipient, _rewardRate); } /** @notice removes recipient for distributions @param _index uint @param _recipient address */ function removeRecipient( uint _index, address _recipient ) external onlyOwner { require( _recipient == info[ _index ].recipient, "NA" ); info[_index] = info[info.length-1]; adjustments[_index] = adjustments[ info.length-1 ]; info.pop(); delete adjustments[ info.length-1 ]; emit LogRemoveRecipient(_recipient); } /** @notice set adjustment info for a collector's reward rate @param _index uint @param _add bool @param _rate uint @param _target uint */ function setAdjustment( uint _index, bool _add, uint _rate, uint _target ) external onlyOwner { adjustments[ _index ] = Adjust({ add: _add, rate: _rate, target: _target }); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638da5cb5b11610097578063e30c397811610066578063e30c3978146102d7578063e4fc6b6d146102df578063f7982243146102fb578063fe3fbbad1461033457610100565b80638da5cb5b1461026d578063bc3b2b1214610275578063c7cda4b2146102b2578063c9fa8b2a146102ba57610100565b80634e71e0c8116100d35780634e71e0c8146101fb57806357d775f8146102035780635db854b01461020b57806361d027b31461023c57610100565b8063078dfbe7146101055780631da56eb31461014a5780632e3405991461016b57806336d33f44146101b6575b600080fd5b6101486004803603606081101561011b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602081013515159060400135151561036d565b005b610152610562565b6040805163ffffffff9092168252519081900360200190f35b6101886004803603602081101561018157600080fd5b5035610586565b6040805192835273ffffffffffffffffffffffffffffffffffffffff90911660208301528051918290030190f35b6101e9600480360360208110156101cc57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166105ca565b60408051918252519081900360200190f35b610148610667565b610152610782565b6101486004803603608081101561022157600080fd5b508035906020810135151590604081013590606001356107a6565b61024461088f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102446108b3565b6102926004803603602081101561028b57600080fd5b50356108cf565b604080519315158452602084019290925282820152519081900360600190f35b6102446108f5565b6101e9600480360360208110156102d057600080fd5b5035610919565b6102446109ca565b6102e76109e6565b604080519115158252519081900360200190f35b6101486004803603604081101561031157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c66565b6101486004803603604081101561034a57600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff16610ed2565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b811561051c5773ffffffffffffffffffffffffffffffffffffffff831615158061041a5750805b61048557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4f776e61626c653a207a65726f20616464726573730000000000000000000000604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808716939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560018054909116905561055d565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555b505050565b60015474010000000000000000000000000000000000000000900463ffffffff1681565b6003818154811061059657600080fd5b60009182526020909120600290910201805460019091015490915073ffffffffffffffffffffffffffffffffffffffff1682565b60008060005b600354811015610660578373ffffffffffffffffffffffffffffffffffffffff16600382815481106105fe57fe5b600091825260209091206001600290920201015473ffffffffffffffffffffffffffffffffffffffff161415610658576106556003828154811061063e57fe5b906000526020600020906002020160000154610919565b91505b6001016105d0565b5092915050565b60015473ffffffffffffffffffffffffffffffffffffffff163381146106ee57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316179055600180549091169055565b7f000000000000000000000000000000000000000000000000000000000000708081565b60005473ffffffffffffffffffffffffffffffffffffffff16331461082c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b604080516060810182529315158452602080850193845284820192835260009586526002908190529420925183547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169015151783559051600183015551910155565b7f000000000000000000000000319ef1897e4220714b3c4814bc4daccfea5eee8681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600260208190526000918252604090912080546001820154919092015460ff9092169183565b7f000000000000000000000000804a4f2705f7bd08b1d84ae8698014a18c708dbc81565b60006109c4620f42406109be847f000000000000000000000000804a4f2705f7bd08b1d84ae8698014a18c708dbc73ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561098c57600080fd5b505afa1580156109a0573d6000803e3d6000fd5b505050506040513d60208110156109b657600080fd5b50519061121c565b90611240565b92915050565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60015460009063ffffffff428116740100000000000000000000000000000000000000009092041611610c5f57600154610a639063ffffffff740100000000000000000000000000000000000000009091048116907f00000000000000000000000000000000000000000000000000000000000070809061125f16565b600160146101000a81548163ffffffff021916908363ffffffff16021790555060005b600354811015610c5557600060038281548110610a9f57fe5b9060005260206000209060020201600001541115610bb6577f000000000000000000000000319ef1897e4220714b3c4814bc4daccfea5eee8673ffffffffffffffffffffffffffffffffffffffff16636a20de9260038381548110610b0057fe5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610b426003858154811061063e57fe5b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015610b9557600080fd5b505af1158015610ba9573d6000803e3d6000fd5b50505050610bb681611278565b60038181548110610bc357fe5b906000526020600020906002020160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f3e0b9848638f4c10a50b16b57178ec78536ef4b900889912261f4aee92952bbc610c3c6003848154811061063e57fe5b60408051918252519081900360200190a2600101610a86565b5060019050610c63565b5060005b90565b60005473ffffffffffffffffffffffffffffffffffffffff163314610cec57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8216610d6e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f4941000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60035460041015610de057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6c696d697420726563697069656e7473206d617820746f203500000000000000604482015290519081900360640190fd5b60408051808201825282815273ffffffffffffffffffffffffffffffffffffffff84811660208084018281526003805460018101825560009190915294517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600290960295860155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c90940180547fffffffffffffffffffffffff00000000000000000000000000000000000000001694909316939093179091558251848152925190927f6f854dd3349576c51e096779d2c5801bd2e775255e7105e31e50d3e344bb79a292908290030190a25050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f5857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60038281548110610f6557fe5b600091825260209091206001600290920201015473ffffffffffffffffffffffffffffffffffffffff828116911614610fff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f4e41000000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061102f57fe5b90600052602060002090600202016003838154811061104a57fe5b600091825260208083208454600293840290910190815560019485015490850180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01845290829052604080842087855293208354815460ff90911615157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0090911617815583850154948101949094559181015492019190915580548061113257fe5b600082815260208082207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9384016002818102909201848155600190810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905595556003549093018252829052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016815593840182905592909101819055905173ffffffffffffffffffffffffffffffffffffffff8316917fbb40ef8f2358acbde6300823309c1ac58489e6cd2254f780831465e53fd9058e91a25050565b60008215806112375750508181028183828161123457fe5b04145b6109c457600080fd5b600080821161124e57600080fd5b81838161125757fe5b049392505050565b80820163ffffffff80841690821610156109c457600080fd5b61128061144a565b506000818152600260208181526040928390208351606081018552815460ff16151581526001820154928101839052920154928201929092529015611426576000600383815481106112ce57fe5b600091825260209091206002909102015482519091508190156113585760208301516112fb90829061142a565b905082604001518110611353575060408083015160008581526002602081905292812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016815560018101829055909201919091555b6113c0565b602083015161136890829061143a565b9050826040015181116113c0575060408083015160008581526002602081905292812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016815560018101829055909201919091555b80600385815481106113ce57fe5b600091825260209182902060029091020191909155604080850151815185815292830184905282820152517f1e824587677004c22acf357df8511b12b61717bdce5cbcdd0b9d5d027160c9e49181900360600190a150505b5050565b808201828110156109c457600080fd5b808203828111156109c457600080fd5b60405180606001604052806000151581526020016000815260200160008152509056fea2646970667358221220a4eafa2015a321d2d62e4abd70696d69fefc4cce190967994f56f8fe06c63fbf64736f6c63430007050033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
9,783
0x371d00d9298f75c5f065208c4b69bf4673c33a31
/** *Submitted for verification at Etherscan.io on 2022-02-23 */ /** Telegram: https://t.me/honkinu Website: https://honkinu.com/ @@@@@@@@@@@@@@@@@@@@@@@&BPYJ???JYPB&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@#Y7^:.........:^75&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@#Y!^..:::::::::^~~!75B&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@P?7?7:::::::::::^755555PB#BBBBB#&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@&BPPJ777~:::::::::::::.755555555555555PG#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@#BGY777777777~:::::::::::^J55555555555555555P#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@#GPP5?77777????!::::::::::[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@&GPP5J7777777777~::::::::::::[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@GPPP5??7777777?7^::::::::::::[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@BPPPPP5?777777777?7!::::::::::[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@GPPPPP?77777777777?!::::^::::^^JPPP555555555555555555G&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@#[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@#PPPPPPPJ?JY5?^::^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@#PPPPPPPGY!::^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@BPPPPPP#?.:^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@&PPPPPGB5^^~~~~~~~:.^7!~~~~~~~~~7~:.^~~~~~~~J#[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@GPPPGB~.^~~~~!!~~7!^^J!~~~~~~~7?^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@&GPP#7.^~~!7?J7~~~77!!~~~~~~~~~!!!~~!7!~~~~~~~!BG5PB&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@#BP:^~~~7#5G#[email protected]&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@#~^~~~:[email protected]@@#?!!!???7??7!~?7?5#&@5PB^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@P^^~~~~~!5#[email protected]#B&&&G.^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@G:^~~~~~~~~~~~~~^^YYY5YPPGGBBB?^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@&~:~~~~~~~~~~~~~^.^5J5PGGGBBBBBY..^~~~~~~~~~~~~~~~!&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@G.:::::^~~~~~~^....?YYPGBBBBBBP~...::^~~~~~~~^^^^:^#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@G ......:::.::.....!YPBBBBGPJ^.......^:......... [email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@! .........^:.......^!JP7^: ...:^:.::........ :[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@&?. ...........:^~~~~~~~!!!!!!!!~:............!#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@B7: ...............:^^:................ [email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@&PJ~. ...............................^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@??7~:..........................:~?Y5P#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@&:^!7?77!~^:..............:^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@B:^~~~..:[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@P.:~~~... ~7~!JJJ77?JYJ7~7! [email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@Y.:^~~^^..7!^!7Y?~^~55?!^!?..:[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@J.::~~?...:?!!!!~~!!7!7~~?::[email protected]@#GP555PB#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@5.::~~?.....^:........!^~:.:7~~~~~~~~!Y~~~~7G?~~~~~~~~!7YG&@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@#Y75^::^~!77 ...........:^.. :?~~~~~~~~~?Y~~~~~!Y7~~!?7~^^^^^!5&@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@Y:.^Y?.^:~~~77..........:^...~?!~~~~~~~~~P7~~~~~~~Y???:[email protected]@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@5:::~75.:~~~~~!7~^?.....:^:!?77~~~~~~~~~~JY~~~~~~~~~Y5 .........^[email protected]@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@?^~~~~P^:~~~~~~~!!7?^...^~!7!~~~~~~~~~~~7P~~~~~~~~~~~Y^..........P?&@@@@@@@@@@@@@@@@@@@@@@@@ @&BPYJJJ777~~~Y?.:~~~~~~~~~~!!^~7?!~~~!7777777775!~~~~~~~~~~~!J.....:^: ^&@@@@@@@@@@@@@@@@@@@@@@@@@@ #^..77. 7?^!7^!P::^~~~~~~~~~~~?~~~~~~??^.~?.7J^77!~~~~~~~~~~~~Y~:[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@ &7.!77: ^7!~:~.JJ.:~~~~~~~~~~~Y7~~~~~5^?~:~.~77^.^?!~~~~~~~~~!&@#[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@GJ~ :~!?J5....P~::~~~~~~~~~~5?^::::!?!:J??JJY^[email protected]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@G77JJJ?~....~5::^^:::.....Y~ .....:!7^!7!~.....:!~~~~~~~J##&&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@G~........ Y?...........5^....^.. !! .........:~~~~~!5BGPGGGGGGBBB###&&&@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@&Y^. .~^:7G.~~..!~....5. ...^?...J:........!^~~!?5BGGGGGGGGGGGPPPPPGGGGGGBBB###&&&@@@@@@@@@@ @@@@@@@@@&PJJ5BGG#J77. !? ..^JBJ7~^:.Y:. ~J:. . :JJJ5PGBGGGGGGGGGGGGGGGGGGGGGGGGGPPPPPGGGGGGGBBB### @@@@@@@@@@@@@@#BBBPP!::YJ?YPGGGGGGGGPG5555GGY?77YGBGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGPPPPP @@@@@@@@@@@@@@@@@@@@@&&&##BGGGGGGPPGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&###BBBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&####BBBGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Honkinu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Honk Inu"; string private constant _symbol = "HONK"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x9C49f8A446E25CACe0dC8f8c5B52B8DF7Ea030E7); address payable private _marketingAddress = payable(0x9C49f8A446E25CACe0dC8f8c5B52B8DF7Ea030E7); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000 * 10**9; uint256 public _maxWalletSize = 25000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610553578063dd62ed3e14610573578063ea1644d5146105b9578063f2fde38b146105d957600080fd5b8063a2a957bb146104ce578063a9059cbb146104ee578063bfd792841461050e578063c3c8cd801461053e57600080fd5b80638f70ccf7116100d15780638f70ccf71461044b5780638f9a55c01461046b57806395d89b411461048157806398a5c315146104ae57600080fd5b80637d1db4a5146103ea5780637f2feddc146104005780638da5cb5b1461042d57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038057806370a0823114610395578063715018a6146103b557806374010ece146103ca57600080fd5b8063313ce5671461030457806349bd5a5e146103205780636b999053146103405780636d8aa8f81461036057600080fd5b80631694505e116101ab5780631694505e1461027157806318160ddd146102a957806323b872dd146102ce5780632fd689e3146102ee57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024157600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195d565b6105f9565b005b34801561020a57600080fd5b50604080518082019091526008815267486f6e6b20496e7560c01b60208201525b6040516102389190611a22565b60405180910390f35b34801561024d57600080fd5b5061026161025c366004611a77565b610698565b6040519015158152602001610238565b34801561027d57600080fd5b50601454610291906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102b557600080fd5b50670de0b6b3a76400005b604051908152602001610238565b3480156102da57600080fd5b506102616102e9366004611aa3565b6106af565b3480156102fa57600080fd5b506102c060185481565b34801561031057600080fd5b5060405160098152602001610238565b34801561032c57600080fd5b50601554610291906001600160a01b031681565b34801561034c57600080fd5b506101fc61035b366004611ae4565b610718565b34801561036c57600080fd5b506101fc61037b366004611b11565b610763565b34801561038c57600080fd5b506101fc6107ab565b3480156103a157600080fd5b506102c06103b0366004611ae4565b6107f6565b3480156103c157600080fd5b506101fc610818565b3480156103d657600080fd5b506101fc6103e5366004611b2c565b61088c565b3480156103f657600080fd5b506102c060165481565b34801561040c57600080fd5b506102c061041b366004611ae4565b60116020526000908152604090205481565b34801561043957600080fd5b506000546001600160a01b0316610291565b34801561045757600080fd5b506101fc610466366004611b11565b6108bb565b34801561047757600080fd5b506102c060175481565b34801561048d57600080fd5b50604080518082019091526004815263484f4e4b60e01b602082015261022b565b3480156104ba57600080fd5b506101fc6104c9366004611b2c565b610903565b3480156104da57600080fd5b506101fc6104e9366004611b45565b610932565b3480156104fa57600080fd5b50610261610509366004611a77565b610970565b34801561051a57600080fd5b50610261610529366004611ae4565b60106020526000908152604090205460ff1681565b34801561054a57600080fd5b506101fc61097d565b34801561055f57600080fd5b506101fc61056e366004611b77565b6109d1565b34801561057f57600080fd5b506102c061058e366004611bfb565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c557600080fd5b506101fc6105d4366004611b2c565b610a72565b3480156105e557600080fd5b506101fc6105f4366004611ae4565b610aa1565b6000546001600160a01b0316331461062c5760405162461bcd60e51b815260040161062390611c34565b60405180910390fd5b60005b81518110156106945760016010600084848151811061065057610650611c69565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068c81611c95565b91505061062f565b5050565b60006106a5338484610b8b565b5060015b92915050565b60006106bc848484610caf565b61070e843361070985604051806060016040528060288152602001611daf602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111eb565b610b8b565b5060019392505050565b6000546001600160a01b031633146107425760405162461bcd60e51b815260040161062390611c34565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078d5760405162461bcd60e51b815260040161062390611c34565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e057506013546001600160a01b0316336001600160a01b0316145b6107e957600080fd5b476107f381611225565b50565b6001600160a01b0381166000908152600260205260408120546106a99061125f565b6000546001600160a01b031633146108425760405162461bcd60e51b815260040161062390611c34565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b65760405162461bcd60e51b815260040161062390611c34565b601655565b6000546001600160a01b031633146108e55760405162461bcd60e51b815260040161062390611c34565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092d5760405162461bcd60e51b815260040161062390611c34565b601855565b6000546001600160a01b0316331461095c5760405162461bcd60e51b815260040161062390611c34565b600893909355600a91909155600955600b55565b60006106a5338484610caf565b6012546001600160a01b0316336001600160a01b031614806109b257506013546001600160a01b0316336001600160a01b0316145b6109bb57600080fd5b60006109c6306107f6565b90506107f3816112e3565b6000546001600160a01b031633146109fb5760405162461bcd60e51b815260040161062390611c34565b60005b82811015610a6c578160056000868685818110610a1d57610a1d611c69565b9050602002016020810190610a329190611ae4565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6481611c95565b9150506109fe565b50505050565b6000546001600160a01b03163314610a9c5760405162461bcd60e51b815260040161062390611c34565b601755565b6000546001600160a01b03163314610acb5760405162461bcd60e51b815260040161062390611c34565b6001600160a01b038116610b305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610623565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bed5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610623565b6001600160a01b038216610c4e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610623565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d135760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610623565b6001600160a01b038216610d755760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610623565b60008111610dd75760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610623565b6000546001600160a01b03848116911614801590610e0357506000546001600160a01b03838116911614155b156110e457601554600160a01b900460ff16610e9c576000546001600160a01b03848116911614610e9c5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610623565b601654811115610eee5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610623565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3057506001600160a01b03821660009081526010602052604090205460ff16155b610f885760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610623565b6015546001600160a01b0383811691161461100d5760175481610faa846107f6565b610fb49190611cb0565b1061100d5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610623565b6000611018306107f6565b6018546016549192508210159082106110315760165491505b8080156110485750601554600160a81b900460ff16155b801561106257506015546001600160a01b03868116911614155b80156110775750601554600160b01b900460ff165b801561109c57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c157506001600160a01b03841660009081526005602052604090205460ff16155b156110e1576110cf826112e3565b4780156110df576110df47611225565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112657506001600160a01b03831660009081526005602052604090205460ff165b8061115857506015546001600160a01b0385811691161480159061115857506015546001600160a01b03848116911614155b15611165575060006111df565b6015546001600160a01b03858116911614801561119057506014546001600160a01b03848116911614155b156111a257600854600c55600954600d555b6015546001600160a01b0384811691161480156111cd57506014546001600160a01b03858116911614155b156111df57600a54600c55600b54600d555b610a6c8484848461146c565b6000818484111561120f5760405162461bcd60e51b81526004016106239190611a22565b50600061121c8486611cc8565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610694573d6000803e3d6000fd5b60006006548211156112c65760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610623565b60006112d061149a565b90506112dc83826114bd565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132b5761132b611c69565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561137f57600080fd5b505afa158015611393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b79190611cdf565b816001815181106113ca576113ca611c69565b6001600160a01b0392831660209182029290920101526014546113f09130911684610b8b565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611429908590600090869030904290600401611cfc565b600060405180830381600087803b15801561144357600080fd5b505af1158015611457573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611479576114796114ff565b61148484848461152d565b80610a6c57610a6c600e54600c55600f54600d55565b60008060006114a7611624565b90925090506114b682826114bd565b9250505090565b60006112dc83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611664565b600c5415801561150f5750600d54155b1561151657565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153f87611692565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157190876116ef565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a09086611731565b6001600160a01b0389166000908152600260205260409020556115c281611790565b6115cc84836117da565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161191815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061163f82826114bd565b82101561165b57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116855760405162461bcd60e51b81526004016106239190611a22565b50600061121c8486611d6d565b60008060008060008060008060006116af8a600c54600d546117fe565b92509250925060006116bf61149a565b905060008060006116d28e878787611853565b919e509c509a509598509396509194505050505091939550919395565b60006112dc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111eb565b60008061173e8385611cb0565b9050838110156112dc5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610623565b600061179a61149a565b905060006117a883836118a3565b306000908152600260205260409020549091506117c59082611731565b30600090815260026020526040902055505050565b6006546117e790836116ef565b6006556007546117f79082611731565b6007555050565b6000808080611818606461181289896118a3565b906114bd565b9050600061182b60646118128a896118a3565b905060006118438261183d8b866116ef565b906116ef565b9992985090965090945050505050565b600080808061186288866118a3565b9050600061187088876118a3565b9050600061187e88886118a3565b905060006118908261183d86866116ef565b939b939a50919850919650505050505050565b6000826118b2575060006106a9565b60006118be8385611d8f565b9050826118cb8583611d6d565b146112dc5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610623565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f357600080fd5b803561195881611938565b919050565b6000602080838503121561197057600080fd5b823567ffffffffffffffff8082111561198857600080fd5b818501915085601f83011261199c57600080fd5b8135818111156119ae576119ae611922565b8060051b604051601f19603f830116810181811085821117156119d3576119d3611922565b6040529182528482019250838101850191888311156119f157600080fd5b938501935b82851015611a1657611a078561194d565b845293850193928501926119f6565b98975050505050505050565b600060208083528351808285015260005b81811015611a4f57858101830151858201604001528201611a33565b81811115611a61576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8a57600080fd5b8235611a9581611938565b946020939093013593505050565b600080600060608486031215611ab857600080fd5b8335611ac381611938565b92506020840135611ad381611938565b929592945050506040919091013590565b600060208284031215611af657600080fd5b81356112dc81611938565b8035801515811461195857600080fd5b600060208284031215611b2357600080fd5b6112dc82611b01565b600060208284031215611b3e57600080fd5b5035919050565b60008060008060808587031215611b5b57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8c57600080fd5b833567ffffffffffffffff80821115611ba457600080fd5b818601915086601f830112611bb857600080fd5b813581811115611bc757600080fd5b8760208260051b8501011115611bdc57600080fd5b602092830195509350611bf29186019050611b01565b90509250925092565b60008060408385031215611c0e57600080fd5b8235611c1981611938565b91506020830135611c2981611938565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ca957611ca9611c7f565b5060010190565b60008219821115611cc357611cc3611c7f565b500190565b600082821015611cda57611cda611c7f565b500390565b600060208284031215611cf157600080fd5b81516112dc81611938565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4c5784516001600160a01b031683529383019391830191600101611d27565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da957611da9611c7f565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220199de0247d16e5368ea794802e6f650a0ef52197c53d7bc7eb065dc6d99c1b9864736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,784
0x44477629a865956f14adcdce4846f1b83ce9fc95
/** *Submitted for verification at Etherscan.io on 2021-02-04 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function transfer(address _to, uint256 _value) external returns (bool); } /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct MapEntry { bytes32 _key; bytes32 _value; } struct Map { // Storage of map keys and values MapEntry[] _entries; // Position of the entry defined by a key in the `entries` array, plus 1 // because index 0 means a key is not in the map. mapping (bytes32 => uint256) _indexes; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) { // Equivalent to !contains(map, key) map._entries.push(MapEntry({ _key: key, _value: value })); // The entry is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value map._indexes[key] = map._entries.length; return true; } else { map._entries[keyIndex - 1]._value = value; return false; } } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) { // Equivalent to contains(map, key) // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one // in the array, and then remove the last entry (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = keyIndex - 1; uint256 lastIndex = map._entries.length - 1; // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. MapEntry storage lastEntry = map._entries[lastIndex]; // Move the last entry to the index where the entry to delete is map._entries[toDeleteIndex] = lastEntry; // Update the index for the moved entry map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved entry was stored map._entries.pop(); // Delete the index for the deleted slot delete map._indexes[key]; return true; } else { return false; } } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._entries.length; } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require(map._entries.length > index, "EnumerableMap: index out of bounds"); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { return _get(map, key, "EnumerableMap: nonexistent key"); } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. */ function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element stored at position `index` in the set. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint256(value))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key)))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. */ function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key), errorMessage))); } } contract XReferral { mapping(address => address) public referrers; // account_address -> referrer_address mapping(address => uint256) public referredCount; // referrer_address -> num_of_referred event Referral(address indexed referrer, address indexed farmer); // Standard contract ownership transfer. address public owner; address private nextOwner; mapping(address => bool) public isAdmin; // Add the library methods using EnumerableMap for EnumerableMap.UintToAddressMap; // Declare a set state variable EnumerableMap.UintToAddressMap private rnds; uint256 public rndSeedMax; constructor () public { owner = msg.sender; isAdmin[owner] = true; referrers[owner] = owner; } // Standard modifier on methods invokable only by contract owner. modifier onlyOwner { require(msg.sender == owner, "OnlyOwner methods called by non-owner."); _; } modifier onlyAdmin { require(isAdmin[msg.sender], "OnlyAdmin methods called by non-admin."); _; } // Standard contract ownership transfer implementation, function approveNextOwner(address _nextOwner) external onlyOwner { require(_nextOwner != owner, "Cannot approve current owner."); nextOwner = _nextOwner; } function acceptNextOwner() external { require(msg.sender == nextOwner, "Can only accept a preapproved new owner."); owner = nextOwner; } function setReferrer(address farmer, address referrer) public onlyAdmin { require(farmer != address(0), "!farmer"); require(isValidReferrer(referrer), "!referrer"); if (referrers[farmer] == address(0) && referrer != address(0)) { referrers[farmer] = referrer; referredCount[referrer] += 1; emit Referral(referrer, farmer); } } function getReferrer(address farmer) public view returns (address) { return referrers[farmer]; } function isValidReferrer(address referrer) public view returns (bool) { return getReferrer(referrer) != address(0); } // Set admin status. function setAdminStatus(address _admin, bool _status) external onlyOwner { isAdmin[_admin] = _status; } // Seeds setup. function rndSeeds(address[] calldata seeds, uint16[] calldata weis) public onlyOwner { require(rnds.length() == 0, "!rnds"); require(seeds.length == weis.length, "!same length"); uint256 sum = 0; uint256 len = seeds.length; for(uint256 i = 0; i < len; ++i) { if(weis[i] != 0 && seeds[i] != address(0)) { rnds.set(sum, seeds[i]); sum += weis[i]; // setup referrer setReferrer(seeds[i], owner); } } // put an additional element as sentinel rnds.set(sum, owner); rndSeedMax = sum; } function rndSeed(uint256 rnd) public view returns (address, bool) { uint256 len = rnds.length(); if(len < 2) { return (owner, false); } uint256 weis; for(uint256 i=0; i < len; ++i) { (weis, ) = rnds.at(i); if(weis > rnd && i > 0) { (, address addr) = rnds.at(i - 1); return (addr, true); } } return (owner, false); } event EmergencyERC20Drain(address token, address owner, uint256 amount); // owner can drain tokens that are sent here by mistake function emergencyERC20Drain(IERC20 token, uint amount) external onlyOwner { emit EmergencyERC20Drain(address(token), owner, amount); token.transfer(owner, amount); } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063d06c54fb11610066578063d06c54fb14610339578063d52f199f14610341578063d579fd4414610367578063db0e16f11461038d576100ea565b80638da5cb5b146102fb578063a26969bb14610303578063bbddaca31461030b576100ea565b80633f7b06d8116100c85780633f7b06d81461022d5780634a3b68cc146102655780634a9fefc7146102a75780634f5bee44146102cd576100ea565b806323844898146100ef57806324d7806c1461012f578063258adbd614610169575b600080fd5b61010c6004803603602081101561010557600080fd5b50356103b9565b604080516001600160a01b03909316835290151560208301528051918290030190f35b6101556004803603602081101561014557600080fd5b50356001600160a01b031661045d565b604080519115158252519081900360200190f35b61022b6004803603604081101561017f57600080fd5b81019060208101813564010000000081111561019a57600080fd5b8201836020820111156101ac57600080fd5b803590602001918460208302840111640100000000831117156101ce57600080fd5b9193909290916020810190356401000000008111156101ec57600080fd5b8201836020820111156101fe57600080fd5b8035906020019184602083028401116401000000008311171561022057600080fd5b509092509050610472565b005b6102536004803603602081101561024357600080fd5b50356001600160a01b0316610652565b60408051918252519081900360200190f35b61028b6004803603602081101561027b57600080fd5b50356001600160a01b0316610664565b604080516001600160a01b039092168252519081900360200190f35b61028b600480360360208110156102bd57600080fd5b50356001600160a01b031661067f565b61022b600480360360408110156102e357600080fd5b506001600160a01b038135169060200135151561069d565b61028b610711565b610253610720565b61022b6004803603604081101561032157600080fd5b506001600160a01b0381358116916020013516610726565b61022b6108a3565b6101556004803603602081101561035757600080fd5b50356001600160a01b0316610910565b61022b6004803603602081101561037d57600080fd5b50356001600160a01b031661092d565b61022b600480360360408110156103a357600080fd5b506001600160a01b0381351690602001356109fb565b60008060006103c86005610b17565b905060028110156103ea5750506002546001600160a01b031690506000610458565b6000805b8281101561044257610401600582610b28565b50915085821180156104135750600081115b1561043a57600061042960056000198401610b28565b965060019550610458945050505050565b6001016103ee565b50506002546001600160a01b0316925060009150505b915091565b60046020526000908152604090205460ff1681565b6002546001600160a01b031633146104bb5760405162461bcd60e51b8152600401808060200182810382526026815260200180610ceb6026913960400191505060405180910390fd5b6104c56005610b17565b156104ff576040805162461bcd60e51b815260206004820152600560248201526421726e647360d81b604482015290519081900360640190fd5b828114610542576040805162461bcd60e51b815260206004820152600c60248201526b042e6c2daca40d8cadccee8d60a31b604482015290519081900360640190fd5b600083815b8181101561062c5784848281811061055b57fe5b9050602002013561ffff1661ffff1660001415801561059f5750600087878381811061058357fe5b905060200201356001600160a01b03166001600160a01b031614155b15610624576105d5838888848181106105b457fe5b905060200201356001600160a01b03166005610b449092919063ffffffff16565b508484828181106105e257fe5b9050602002013561ffff1661ffff168301925061062487878381811061060457fe5b6002546001600160a01b0360209092029390930135811692169050610726565b600101610547565b506002546106479060059084906001600160a01b0316610b44565b505060075550505050565b60016020526000908152604090205481565b6000602081905290815260409020546001600160a01b031681565b6001600160a01b039081166000908152602081905260409020541690565b6002546001600160a01b031633146106e65760405162461bcd60e51b8152600401808060200182810382526026815260200180610ceb6026913960400191505060405180910390fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b6002546001600160a01b031681565b60075481565b3360009081526004602052604090205460ff166107745760405162461bcd60e51b8152600401808060200182810382526026815260200180610c7b6026913960400191505060405180910390fd5b6001600160a01b0382166107b9576040805162461bcd60e51b815260206004820152600760248201526610b330b936b2b960c91b604482015290519081900360640190fd5b6107c281610910565b6107ff576040805162461bcd60e51b815260206004820152600960248201526810b932b332b93932b960b91b604482015290519081900360640190fd5b6001600160a01b038281166000908152602081905260409020541615801561082f57506001600160a01b03811615155b1561089f576001600160a01b0382811660008181526020818152604080832080546001600160a01b03191695871695861790558483526001918290528083208054909201909155519192917f9d05414fb79fac216c15606de5cc06664e91a254e4d5f57664d5f1beaf7fb7ef9190a35b5050565b6003546001600160a01b031633146108ec5760405162461bcd60e51b8152600401808060200182810382526028815260200180610ca16028913960400191505060405180910390fd5b600354600280546001600160a01b0319166001600160a01b03909216919091179055565b60008061091c8361067f565b6001600160a01b0316141592915050565b6002546001600160a01b031633146109765760405162461bcd60e51b8152600401808060200182810382526026815260200180610ceb6026913960400191505060405180910390fd5b6002546001600160a01b03828116911614156109d9576040805162461bcd60e51b815260206004820152601d60248201527f43616e6e6f7420617070726f76652063757272656e74206f776e65722e000000604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b03163314610a445760405162461bcd60e51b8152600401808060200182810382526026815260200180610ceb6026913960400191505060405180910390fd5b600254604080516001600160a01b0380861682529092166020830152818101839052517fd5f5d3947cee2c1f346ba9359a003af3d6202e5bc2e987685ab0cf0e73f5ac3b9181900360600190a16002546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810184905290519184169163a9059cbb916044808201926020929091908290030181600087803b158015610ae757600080fd5b505af1158015610afb573d6000803e3d6000fd5b505050506040513d6020811015610b1157600080fd5b50505050565b6000610b2282610b64565b92915050565b6000808080610b378686610b68565b9097909650945050505050565b6000610b5a84846001600160a01b038516610be3565b90505b9392505050565b5490565b815460009081908310610bac5760405162461bcd60e51b8152600401808060200182810382526022815260200180610cc96022913960400191505060405180910390fd5b6000846000018481548110610bbd57fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b600082815260018401602052604081205480610c48575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055610b5d565b82856000016001830381548110610c5b57fe5b9060005260206000209060020201600101819055506000915050610b5d56fe4f6e6c7941646d696e206d6574686f64732063616c6c6564206279206e6f6e2d61646d696e2e43616e206f6e6c7920616363657074206120707265617070726f766564206e6577206f776e65722e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734f6e6c794f776e6572206d6574686f64732063616c6c6564206279206e6f6e2d6f776e65722ea2646970667358221220d3a640fa9b1dd8c8f0828f80eb09b3165fe93f069065e14930179e552ae95fe264736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,785
0x996b2d9e36151d201a52ed972e487d8c2440bc2f
pragma solidity 0.6.2; contract Owned { address payable public owner; address private pendingOwner; event OwnershipTransferRequested( address indexed from, address indexed to ); event OwnershipTransferred( address indexed from, address indexed to ); constructor() public { owner = msg.sender; } /** * @dev Allows an owner to begin transferring ownership to a new address, * pending. */ function transferOwnership(address _to) external onlyOwner() { pendingOwner = _to; emit OwnershipTransferRequested(owner, _to); } /** * @dev Allows an ownership transfer to be completed by the recipient. */ function acceptOwnership() external { require(msg.sender == pendingOwner, "Must be proposed owner"); address oldOwner = owner; owner = msg.sender; pendingOwner = address(0); emit OwnershipTransferred(oldOwner, msg.sender); } /** * @dev Reverts if called by anyone other than the contract owner. */ modifier onlyOwner() { require(msg.sender == owner, "Only callable by owner"); _; } } contract Whitelisted is Owned { bool public whitelistEnabled; mapping(address => bool) public whitelisted; event AddedToWhitelist(address user); event RemovedFromWhitelist(address user); event WhitelistEnabled(); event WhitelistDisabled(); constructor() public { whitelistEnabled = true; } /** * @notice Adds an address to the whitelist * @param _user The address to whitelist */ function addToWhitelist(address _user) external onlyOwner() { whitelisted[_user] = true; emit AddedToWhitelist(_user); } /** * @notice Removes an address from the whitelist * @param _user The address to remove */ function removeFromWhitelist(address _user) external onlyOwner() { delete whitelisted[_user]; emit RemovedFromWhitelist(_user); } /** * @notice makes the whitelist check enforced */ function enableWhitelist() external onlyOwner() { whitelistEnabled = true; emit WhitelistEnabled(); } /** * @notice makes the whitelist check unenforced */ function disableWhitelist() external onlyOwner() { whitelistEnabled = false; emit WhitelistDisabled(); } /** * @dev reverts if the caller is not whitelisted */ modifier isWhitelisted() { require(whitelisted[msg.sender] || !whitelistEnabled, "Not whitelisted"); _; } } interface HistoricAggregatorInterface { function latestAnswer() external returns (int256); function latestTimestamp() external returns (uint256); function latestRound() external returns (uint256); function getAnswer(uint256 roundId) external returns (int256); function getTimestamp(uint256 roundId) external returns (uint256); event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp); event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt); } interface AggregatorInterface is HistoricAggregatorInterface { function decimals() external returns (uint8); function getRoundData(uint256 _roundId) external returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ); function latestRoundData() external returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ); } contract AggregatorProxy is AggregatorInterface, Owned { AggregatorInterface public aggregator; constructor(address _aggregator) public Owned() { setAggregator(_aggregator); } /** * @notice Reads the current answer from aggregator delegated to. */ function latestAnswer() external virtual override returns (int256) { return _latestAnswer(); } /** * @notice Reads the last updated height from aggregator delegated to. */ function latestTimestamp() external virtual override returns (uint256) { return _latestTimestamp(); } /** * @notice get past rounds answers * @param _roundId the answer number to retrieve the answer for */ function getAnswer(uint256 _roundId) external virtual override returns (int256) { return _getAnswer(_roundId); } /** * @notice get block timestamp when an answer was last updated * @param _roundId the answer number to retrieve the updated timestamp for */ function getTimestamp(uint256 _roundId) external virtual override returns (uint256) { return _getTimestamp(_roundId); } /** * @notice get the latest completed round where the answer was updated */ function latestRound() external virtual override returns (uint256) { return _latestRound(); } /** * @notice get data about a round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. * Note that different underlying implementations of AggregatorInterface * have slightly different semantics for some of the return values. Consumers * should determine what implementations they expect to receive * data from and validate that they can properly handle return data from all * of them. * @param _roundId the round ID to retrieve the round data for * @return roundId is the round ID for which data was retrieved * @return answer is the answer for the given round * @return startedAt is the timestamp when the round was started. * (Only some AggregatorInterface implementations return meaningful values) * @return updatedAt is the timestamp when the round last was updated (i.e. * answer was last computed) * @return answeredInRound is the round ID of the round in which the answer * was computed. * (Only some AggregatorInterface implementations return meaningful values) * @dev Note that answer and updatedAt may change between queries. */ function getRoundData(uint256 _roundId) external virtual override returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ) { return _getRoundData(_roundId); } /** * @notice get data about the latest round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. * Note that different underlying implementations of AggregatorInterface * have slightly different semantics for some of the return values. Consumers * should determine what implementations they expect to receive * data from and validate that they can properly handle return data from all * of them. * @return roundId is the round ID for which data was retrieved * @return answer is the answer for the given round * @return startedAt is the timestamp when the round was started. * (Only some AggregatorInterface implementations return meaningful values) * @return updatedAt is the timestamp when the round last was updated (i.e. * answer was last computed) * @return answeredInRound is the round ID of the round in which the answer * was computed. * (Only some AggregatorInterface implementations return meaningful values) * @dev Note that answer and updatedAt may change between queries. */ function latestRoundData() external virtual override returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ) { return _latestRoundData(); } /** * @notice represents the number of decimals the aggregator responses represent. */ function decimals() external override returns (uint8) { return aggregator.decimals(); } /** * @notice Allows the owner to update the aggregator address. * @param _aggregator The new address for the aggregator contract */ function setAggregator(address _aggregator) public onlyOwner() { aggregator = AggregatorInterface(_aggregator); } /* * Internal */ function _latestAnswer() internal returns (int256) { return aggregator.latestAnswer(); } function _latestTimestamp() internal returns (uint256) { return aggregator.latestTimestamp(); } function _getAnswer(uint256 _roundId) internal returns (int256) { return aggregator.getAnswer(_roundId); } function _getTimestamp(uint256 _roundId) internal returns (uint256) { return aggregator.getTimestamp(_roundId); } function _latestRound() internal returns (uint256) { return aggregator.latestRound(); } function _getRoundData(uint256 _roundId) internal returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ) { return aggregator.getRoundData(_roundId); } function _latestRoundData() internal returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ) { return aggregator.latestRoundData(); } } contract WhitelistedAggregatorProxy is AggregatorProxy, Whitelisted { constructor(address _aggregator) public AggregatorProxy(_aggregator) { } /** * @notice Reads the current answer from aggregator delegated to. * @dev overridden function to add the isWhitelisted() modifier */ function latestAnswer() external override isWhitelisted() returns (int256) { return _latestAnswer(); } /** * @notice Reads the last updated height from aggregator delegated to. * @dev overridden function to add the isWhitelisted() modifier */ function latestTimestamp() external override isWhitelisted() returns (uint256) { return _latestTimestamp(); } /** * @notice get past rounds answers * @param _roundId the answer number to retrieve the answer for * @dev overridden function to add the isWhitelisted() modifier */ function getAnswer(uint256 _roundId) external override isWhitelisted() returns (int256) { return _getAnswer(_roundId); } /** * @notice get block timestamp when an answer was last updated * @param _roundId the answer number to retrieve the updated timestamp for * @dev overridden function to add the isWhitelisted() modifier */ function getTimestamp(uint256 _roundId) external override isWhitelisted() returns (uint256) { return _getTimestamp(_roundId); } /** * @notice get the latest completed round where the answer was updated * @dev overridden function to add the isWhitelisted() modifier */ function latestRound() external override isWhitelisted() returns (uint256) { return _latestRound(); } /** * @notice get data about a round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. * Note that different underlying implementations of AggregatorInterface * have slightly different semantics for some of the return values. Consumers * should determine what implementations they expect to receive * data from and validate that they can properly handle return data from all * of them. * @param _roundId the round ID to retrieve the round data for * @return roundId is the round ID for which data was retrieved * @return answer is the answer for the given round * @return startedAt is the timestamp when the round was started. * (Only some AggregatorInterface implementations return meaningful values) * @return updatedAt is the timestamp when the round last was updated (i.e. * answer was last computed) * @return answeredInRound is the round ID of the round in which the answer * was computed. * (Only some AggregatorInterface implementations return meaningful values) * @dev Note that answer and updatedAt may change between queries. */ function getRoundData(uint256 _roundId) external isWhitelisted() override returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ) { return _getRoundData(_roundId); } /** * @notice get data about the latest round. Consumers are encouraged to check * that they're receiving fresh data by inspecting the updatedAt and * answeredInRound return values. * Note that different underlying implementations of AggregatorInterface * have slightly different semantics for some of the return values. Consumers * should determine what implementations they expect to receive * data from and validate that they can properly handle return data from all * of them. * @return roundId is the round ID for which data was retrieved * @return answer is the answer for the given round * @return startedAt is the timestamp when the round was started. * (Only some AggregatorInterface implementations return meaningful values) * @return updatedAt is the timestamp when the round last was updated (i.e. * answer was last computed) * @return answeredInRound is the round ID of the round in which the answer * was computed. * (Only some AggregatorInterface implementations return meaningful values) * @dev Note that answer and updatedAt may change between queries. */ function latestRoundData() external isWhitelisted() override returns ( uint256 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint256 answeredInRound ) { return _latestRoundData(); } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80638da5cb5b116100ad578063d936547e11610071578063d936547e14610278578063e43252d71461029e578063f2fde38b146102c4578063f9120af6146102ea578063feaf968c1461031057610121565b80638da5cb5b14610226578063b5ab58dc1461022e578063b633620c1461024b578063cdfb2b4e14610268578063d6b0f4841461027057610121565b806351fb012d116100f457806351fb012d146101ca578063668a0f02146101e657806379ba5097146101ee5780638205bf6a146101f85780638ab1d6811461020057610121565b80630720da5214610126578063245a7bfc1461016e578063313ce5671461019257806350d25bcd146101b0575b600080fd5b6101436004803603602081101561013c57600080fd5b5035610318565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b6101766103a6565b604080516001600160a01b039092168252519081900360200190f35b61019a6103b5565b6040805160ff9092168252519081900360200190f35b6101b861042c565b60408051918252519081900360200190f35b6101d26104a4565b604080519115158252519081900360200190f35b6101b86104b4565b6101f6610527565b005b6101b86105d6565b6101f66004803603602081101561021657600080fd5b50356001600160a01b0316610649565b6101766106ee565b6101b86004803603602081101561024457600080fd5b50356106fd565b6101b86004803603602081101561026157600080fd5b5035610777565b6101f66107eb565b6101f6610876565b6101d26004803603602081101561028e57600080fd5b50356001600160a01b03166108fb565b6101f6600480360360208110156102b457600080fd5b50356001600160a01b0316610910565b6101f6600480360360208110156102da57600080fd5b50356001600160a01b03166109b8565b6101f66004803603602081101561030057600080fd5b50356001600160a01b0316610a56565b610143610ac5565b33600090815260036020526040812054819081908190819060ff16806103485750600254600160a01b900460ff16155b61038b576040805162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b61039486610b51565b939a9299509097509550909350915050565b6002546001600160a01b031681565b6002546040805163313ce56760e01b815290516000926001600160a01b03169163313ce56791600480830192602092919082900301818787803b1580156103fb57600080fd5b505af115801561040f573d6000803e3d6000fd5b505050506040513d602081101561042557600080fd5b5051905090565b3360009081526003602052604081205460ff16806104545750600254600160a01b900460ff16155b610497576040805162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b61049f610c07565b905090565b600254600160a01b900460ff1681565b3360009081526003602052604081205460ff16806104dc5750600254600160a01b900460ff16155b61051f576040805162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b61049f610c4d565b6001546001600160a01b0316331461057f576040805162461bcd60e51b815260206004820152601660248201527526bab9ba10313290383937b837b9b2b21037bbb732b960511b604482015290519081900360640190fd5b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3360009081526003602052604081205460ff16806105fe5750600254600160a01b900460ff16155b610641576040805162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b61049f610c93565b6000546001600160a01b03163314610696576040805162461bcd60e51b81526020600482015260166024820152600080516020610e50833981519152604482015290519081900360640190fd5b6001600160a01b038116600081815260036020908152604091829020805460ff19169055815192835290517fcdd2e9b91a56913d370075169cefa1602ba36be5301664f752192bb1709df7579281900390910190a150565b6000546001600160a01b031681565b3360009081526003602052604081205460ff16806107255750600254600160a01b900460ff16155b610768576040805162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b61077182610cd9565b92915050565b3360009081526003602052604081205460ff168061079f5750600254600160a01b900460ff16155b6107e2576040805162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b61077182610d58565b6000546001600160a01b03163314610838576040805162461bcd60e51b81526020600482015260166024820152600080516020610e50833981519152604482015290519081900360640190fd5b6002805460ff60a01b1916600160a01b1790556040517fe5e5846f783279948f6ec5faad38318cde86fe5be7ea845ede56d62f16c3743490600090a1565b6000546001600160a01b031633146108c3576040805162461bcd60e51b81526020600482015260166024820152600080516020610e50833981519152604482015290519081900360640190fd5b6002805460ff60a01b191690556040517f212c6e1d3045c9581ef0adf2504dbb1d137f52f38162ccf77a16c69d14eba5c390600090a1565b60036020526000908152604090205460ff1681565b6000546001600160a01b0316331461095d576040805162461bcd60e51b81526020600482015260166024820152600080516020610e50833981519152604482015290519081900360640190fd5b6001600160a01b038116600081815260036020908152604091829020805460ff19166001179055815192835290517fa850ae9193f515cbae8d35e8925bd2be26627fc91bce650b8652ed254e9cab039281900390910190a150565b6000546001600160a01b03163314610a05576040805162461bcd60e51b81526020600482015260166024820152600080516020610e50833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000546001600160a01b03163314610aa3576040805162461bcd60e51b81526020600482015260166024820152600080516020610e50833981519152604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b33600090815260036020526040812054819081908190819060ff1680610af55750600254600160a01b900460ff16155b610b38576040805162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b604482015290519081900360640190fd5b610b40610da5565b945094509450945094509091929394565b6000806000806000600260009054906101000a90046001600160a01b03166001600160a01b0316630720da52876040518263ffffffff1660e01b81526004018082815260200191505060a060405180830381600087803b158015610bb457600080fd5b505af1158015610bc8573d6000803e3d6000fd5b505050506040513d60a0811015610bde57600080fd5b508051602082015160408301516060840151608090940151929a91995097509195509350915050565b600254604080516350d25bcd60e01b815290516000926001600160a01b0316916350d25bcd91600480830192602092919082900301818787803b1580156103fb57600080fd5b60025460408051633345078160e11b815290516000926001600160a01b03169163668a0f0291600480830192602092919082900301818787803b1580156103fb57600080fd5b60025460408051634102dfb560e11b815290516000926001600160a01b031691638205bf6a91600480830192602092919082900301818787803b1580156103fb57600080fd5b60025460408051632d6ad63760e21b81526004810184905290516000926001600160a01b03169163b5ab58dc91602480830192602092919082900301818787803b158015610d2657600080fd5b505af1158015610d3a573d6000803e3d6000fd5b505050506040513d6020811015610d5057600080fd5b505192915050565b60025460408051632d8cd88360e21b81526004810184905290516000926001600160a01b03169163b633620c91602480830192602092919082900301818787803b158015610d2657600080fd5b6000806000806000600260009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381600087803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b505050506040513d60a0811015610e2757600080fd5b508051602082015160408301516060840151608090940151929991985096509194509250905056fe4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000a26469706673582212203aaa61f3a2dcc810b66b70336aca27281f9336b07f9908514576384e3e3b203e64736f6c63430006020033
{"success": true, "error": null, "results": {}}
9,786
0xa765dc5298efaeb5faf948c3103234988b4f0c9c
pragma solidity 0.4.20; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } } /** * @title StarCoin * * @dev Burnable Ownable ERC20 token */ contract StarCoin is MintableToken { string public constant name = "StarCoin"; string public constant symbol = "STAR"; uint8 public constant decimals = 18; uint public constant INITIAL_SUPPLY = 40000000 * 1 ether; //40M tokens accroding to https://starflow.com/ico/ uint public constant MAXIMUM_SUPPLY = 100000000 * 1 ether; // 100M tokens is maximum according to https://starflow.com/ico/ /* The finalizer contract that allows unlift the transfer limits on this token */ address public releaseAgent; /** A crowdsale contract can release us to the wild if ICO success. If false we are are in transfer lock up period.*/ bool public released = false; /** Map of agents that are allowed to transfer tokens regardless of the lock down period. These are crowdsale contracts and possible the team multisig itself. */ mapping (address => bool) public transferAgents; /** * Limit token transfer until the crowdsale is over. * */ modifier canTransfer(address _sender) { require(released || transferAgents[_sender]); _; } /** The function can be called only before or after the tokens have been released */ modifier inReleaseState(bool releaseState) { require(releaseState == released); _; } /** The function can be called only by a whitelisted release agent. */ modifier onlyReleaseAgent() { require(msg.sender == releaseAgent); _; } /** Restrict minting by the MAXIMUM_SUPPLY allowed **/ modifier bellowMaximumSupply(uint _amount) { require(_amount + totalSupply_ < MAXIMUM_SUPPLY); _; } /** * @dev Constructor that gives msg.sender all of existing tokens. */ function StarCoin() { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } /** * Set the contract that can call release and make the token transferable. * * Design choice. Allow reset the release agent to fix fat finger mistakes. */ function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public { require(addr != 0x0); // We don't do interface check here as we might want to a normal wallet address to act as a release agent releaseAgent = addr; } function release() onlyReleaseAgent inReleaseState(false) public { released = true; } /** * Owner can allow a particular address (a crowdsale contract) to transfer tokens despite the lock up period. */ function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public { require(addr != 0x0); transferAgents[addr] = state; } function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) { // Call Burnable.transfer() return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) { // Call Burnable.transferForm() return super.transferFrom(_from, _to, _value); } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint _amount) onlyOwner canMint bellowMaximumSupply(_amount) public returns (bool) { return super.mint(_to, _amount); } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { return super.finishMinting(); } }
0x60606040526004361061013e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302f652a31461014357806305d2035b1461018757806306fdde03146101b4578063095ea7b31461024257806318160ddd1461029c57806323b872dd146102c557806329ff4f531461033e5780632ff2e9dc14610377578063313ce567146103a05780633d0c4924146103cf57806340c10f19146103f8578063661884631461045257806370a08231146104ac5780637d64bcb4146104f9578063867c28571461052657806386d1a69f146105775780638da5cb5b1461058c57806395d89b41146105e1578063961325211461066f578063a9059cbb1461069c578063d1f276d3146106f6578063d73dd6231461074b578063dd62ed3e146107a5578063f2fde38b14610811575b600080fd5b341561014e57600080fd5b610185600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035151590602001909190505061084a565b005b341561019257600080fd5b61019a61094b565b604051808215151515815260200191505060405180910390f35b34156101bf57600080fd5b6101c761095e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102075780820151818401526020810190506101ec565b50505050905090810190601f1680156102345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561024d57600080fd5b610282600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610997565b604051808215151515815260200191505060405180910390f35b34156102a757600080fd5b6102af610a89565b6040518082815260200191505060405180910390f35b34156102d057600080fd5b610324600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a93565b604051808215151515815260200191505060405180910390f35b341561034957600080fd5b610375600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b1a565b005b341561038257600080fd5b61038a610c04565b6040518082815260200191505060405180910390f35b34156103ab57600080fd5b6103b3610c13565b604051808260ff1660ff16815260200191505060405180910390f35b34156103da57600080fd5b6103e2610c18565b6040518082815260200191505060405180910390f35b341561040357600080fd5b610438600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c27565b604051808215151515815260200191505060405180910390f35b341561045d57600080fd5b610492600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610cd2565b604051808215151515815260200191505060405180910390f35b34156104b757600080fd5b6104e3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f63565b6040518082815260200191505060405180910390f35b341561050457600080fd5b61050c610fab565b604051808215151515815260200191505060405180910390f35b341561053157600080fd5b61055d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611032565b604051808215151515815260200191505060405180910390f35b341561058257600080fd5b61058a611052565b005b341561059757600080fd5b61059f6110ef565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105ec57600080fd5b6105f4611115565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610634578082015181840152602081019050610619565b50505050905090810190601f1680156106615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561067a57600080fd5b61068261114e565b604051808215151515815260200191505060405180910390f35b34156106a757600080fd5b6106dc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611161565b604051808215151515815260200191505060405180910390f35b341561070157600080fd5b6107096111e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561075657600080fd5b61078b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061120c565b604051808215151515815260200191505060405180910390f35b34156107b057600080fd5b6107fb600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611408565b6040518082815260200191505060405180910390f35b341561081c57600080fd5b610848600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061148f565b005b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108a657600080fd5b6000600460149054906101000a900460ff1615158115151415156108c957600080fd5b60008373ffffffffffffffffffffffffffffffffffffffff16141515156108ef57600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b600360149054906101000a900460ff1681565b6040805190810160405280600881526020017f53746172436f696e00000000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b600083600460149054906101000a900460ff1680610afa5750600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1515610b0557600080fd5b610b108585856115e7565b9150509392505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b7657600080fd5b6000600460149054906101000a900460ff161515811515141515610b9957600080fd5b60008273ffffffffffffffffffffffffffffffffffffffff1614151515610bbf57600080fd5b81600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6a211654585005212800000081565b601281565b6a52b7d2dcc80cd2e400000081565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c8557600080fd5b600360149054906101000a900460ff16151515610ca157600080fd5b816a52b7d2dcc80cd2e40000006001548201101515610cbf57600080fd5b610cc984846119a1565b91505092915050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610de3576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e77565b610df68382611b8790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561100957600080fd5b600360149054906101000a900460ff1615151561102557600080fd5b61102d611ba0565b905090565b60056020528060005260406000206000915054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110ae57600080fd5b6000600460149054906101000a900460ff1615158115151415156110d157600080fd5b6001600460146101000a81548160ff02191690831515021790555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f535441520000000000000000000000000000000000000000000000000000000081525081565b600460149054906101000a900460ff1681565b600033600460149054906101000a900460ff16806111c85750600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15156111d357600080fd5b6111dd8484611c68565b91505092915050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061129d82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e8790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114eb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561152757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561162457600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561167157600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156116fc57600080fd5b61174d826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8790919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117e0826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e8790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118b182600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8790919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156119ff57600080fd5b600360149054906101000a900460ff16151515611a1b57600080fd5b611a3082600154611e8790919063ffffffff16565b600181905550611a87826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e8790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000828211151515611b9557fe5b818303905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611bfe57600080fd5b600360149054906101000a900460ff16151515611c1a57600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611ca557600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611cf257600080fd5b611d43826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8790919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611dd6826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e8790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000808284019050838110151515611e9b57fe5b80915050929150505600a165627a7a72305820d10f6285b0b01a465836b4155462e66250e4e11cf84e5d32a7dd3ddb86ced6420029
{"success": true, "error": null, "results": {}}
9,787
0x05D072CBD90C132E2c4CfDDd2aD2cbe018Ec62fc
/** *Submitted for verification at Etherscan.io on 2021-05-08 */ pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. **/ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. **/ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). **/ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. **/ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". **/ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender account. **/ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. **/ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. **/ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic interface * @dev Basic ERC20 interface **/ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 **/ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. **/ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence **/ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. **/ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. **/ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred **/ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. **/ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. **/ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. **/ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. **/ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Configurable * @dev Configurable varriables of the contract **/ contract Configurable { uint256 public constant cap = 10000000*10**18; uint256 public constant basePrice = 10600*10**18; // tokens per 1 ether uint256 public tokensSold = 0; uint256 public constant tokenReserve = 110000000*10**18; uint256 public remainingTokens = 0; } /** * @title CrowdsaleToken * @dev Contract to preform crowd sale with token **/ contract CrowdsaleToken is StandardToken, Configurable, Ownable { /** * @dev enum of current crowd sale state **/ enum Stages { none, icoStart, icoEnd } Stages currentStage; /** * @dev constructor of CrowdsaleToken **/ constructor() public { currentStage = Stages.none; balances[owner] = balances[owner].add(tokenReserve); totalSupply_ = totalSupply_.add(tokenReserve); remainingTokens = cap; emit Transfer(address(this), owner, tokenReserve); } /** * @dev fallback function to send ether to for Crowd sale **/ function () public payable { require(currentStage == Stages.icoStart); require(msg.value > 0); require(remainingTokens > 0); uint256 weiAmount = msg.value; // Calculate tokens to sell uint256 tokens = weiAmount.mul(basePrice).div(1 ether); uint256 returnWei = 0; if(tokensSold.add(tokens) > cap){ uint256 newTokens = cap.sub(tokensSold); uint256 newWei = newTokens.div(basePrice).mul(1 ether); returnWei = weiAmount.sub(newWei); weiAmount = newWei; tokens = newTokens; } tokensSold = tokensSold.add(tokens); // Increment raised amount remainingTokens = cap.sub(tokensSold); if(returnWei > 0){ msg.sender.transfer(returnWei); emit Transfer(address(this), msg.sender, returnWei); } balances[msg.sender] = balances[msg.sender].add(tokens); emit Transfer(address(this), msg.sender, tokens); totalSupply_ = totalSupply_.add(tokens); owner.transfer(weiAmount);// Send money to owner } /** * @dev startIco starts the public ICO **/ function startIco() public onlyOwner { require(currentStage != Stages.icoEnd); currentStage = Stages.icoStart; } /** * @dev endIco closes down the ICO **/ function endIco() internal { currentStage = Stages.icoEnd; // Transfer any remaining tokens if(remainingTokens > 0) balances[owner] = balances[owner].add(remainingTokens); // transfer any remaining ETH balance in the contract to the owner owner.transfer(address(this).balance); } /** * @dev finalizeIco closes down the ICO and sets needed varriables **/ function finalizeIco() public onlyOwner { require(currentStage != Stages.icoEnd); endIco(); } } /** * @title DESCOUNT * @dev Contract to create the DESCOUNT Token **/ contract DESCOUNT is CrowdsaleToken { string public constant name = "DESCOUNT"; string public constant symbol = "DESC"; uint32 public constant decimals = 18; }
0x608060405260043610610112576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146104c6578063095ea7b31461055657806318160ddd146105bb57806323b872dd146105e6578063313ce5671461066b578063355274ea146106a2578063518ab2a8146106cd57806366188463146106f857806370a082311461075d57806389311e6f146107b45780638da5cb5b146107cb578063903a3ef61461082257806395d89b4114610839578063a9059cbb146108c9578063bf5839031461092e578063c7876ea414610959578063cbcb317114610984578063d73dd623146109af578063dd62ed3e14610a14578063f2fde38b14610a8b575b60008060008060006001600281111561012757fe5b600560149054906101000a900460ff16600281111561014257fe5b14151561014e57600080fd5b60003411151561015d57600080fd5b600060045411151561016e57600080fd5b3494506101a8670de0b6b3a764000061019a69023ea08cfecb04a0000088610ace90919063ffffffff16565b610b0690919063ffffffff16565b9350600092506a084595161401484a0000006101cf85600354610b1c90919063ffffffff16565b111561024c576101f56003546a084595161401484a000000610b3890919063ffffffff16565b915061022e670de0b6b3a764000061022069023ea08cfecb04a0000085610b0690919063ffffffff16565b610ace90919063ffffffff16565b90506102438186610b3890919063ffffffff16565b92508094508193505b61026184600354610b1c90919063ffffffff16565b6003819055506102876003546a084595161401484a000000610b3890919063ffffffff16565b6004819055506000831115610343573373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156102dc573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b610394846000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1c90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361045084600154610b1c90919063ffffffff16565b600181905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc869081150290604051600060405180830381858888f193505050501580156104be573d6000803e3d6000fd5b505050505050005b3480156104d257600080fd5b506104db610b51565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561051b578082015181840152602081019050610500565b50505050905090810190601f1680156105485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561056257600080fd5b506105a1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b8a565b604051808215151515815260200191505060405180910390f35b3480156105c757600080fd5b506105d0610c7c565b6040518082815260200191505060405180910390f35b3480156105f257600080fd5b50610651600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c86565b604051808215151515815260200191505060405180910390f35b34801561067757600080fd5b50610680611040565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b3480156106ae57600080fd5b506106b7611045565b6040518082815260200191505060405180910390f35b3480156106d957600080fd5b506106e2611054565b6040518082815260200191505060405180910390f35b34801561070457600080fd5b50610743600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061105a565b604051808215151515815260200191505060405180910390f35b34801561076957600080fd5b5061079e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112eb565b6040518082815260200191505060405180910390f35b3480156107c057600080fd5b506107c9611333565b005b3480156107d757600080fd5b506107e06113e9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561082e57600080fd5b5061083761140f565b005b34801561084557600080fd5b5061084e6114a9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561088e578082015181840152602081019050610873565b50505050905090810190601f1680156108bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108d557600080fd5b50610914600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114e2565b604051808215151515815260200191505060405180910390f35b34801561093a57600080fd5b50610943611701565b6040518082815260200191505060405180910390f35b34801561096557600080fd5b5061096e611707565b6040518082815260200191505060405180910390f35b34801561099057600080fd5b50610999611715565b6040518082815260200191505060405180910390f35b3480156109bb57600080fd5b506109fa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611724565b604051808215151515815260200191505060405180910390f35b348015610a2057600080fd5b50610a75600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611920565b6040518082815260200191505060405180910390f35b348015610a9757600080fd5b50610acc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119a7565b005b600080831415610ae15760009050610b00565b8183029050818382811515610af257fe5b04141515610afc57fe5b8090505b92915050565b60008183811515610b1357fe5b04905092915050565b60008183019050828110151515610b2f57fe5b80905092915050565b6000828211151515610b4657fe5b818303905092915050565b6040805190810160405280600881526020017f444553434f554e5400000000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610cc357600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d1057600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d9b57600080fd5b610dec826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3890919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7f826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1c90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f5082600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3890919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b6a084595161401484a00000081565b60035481565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561116b576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111ff565b61117e8382610b3890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138f57600080fd5b60028081111561139b57fe5b600560149054906101000a900460ff1660028111156113b657fe5b141515156113c357600080fd5b6001600560146101000a81548160ff021916908360028111156113e257fe5b0217905550565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561146b57600080fd5b60028081111561147757fe5b600560149054906101000a900460ff16600281111561149257fe5b1415151561149f57600080fd5b6114a7611aff565b565b6040805190810160405280600481526020017f444553430000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561151f57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561156c57600080fd5b6115bd826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b3890919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611650826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1c90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60045481565b69023ea08cfecb04a0000081565b6a5afd67f2dc0e1b2e00000081565b60006117b582600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1c90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a0357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611a3f57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6002600560146101000a81548160ff02191690836002811115611b1e57fe5b021790555060006004541115611c0857611ba3600454600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610b1c90919063ffffffff16565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015611c87573d6000803e3d6000fd5b505600a165627a7a72305820faaec257fe980f11d0d874e4a4950ea089cf0d6c91cd21678cef50ced79d18f70029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,788
0x9d42b5489d33099920ee2da3bb8ee9bdd7db6c14
pragma solidity ^0.4.24; contract F3Devents { event Winner(address winner, uint256 pool, address revealer); event Buy(address buyer, uint256 keys, uint256 cost); event Sell(address from, uint256 price, uint256 count); event Bought(address buyer, address from, uint256 amount, uint256 price); } contract F3d is F3Devents { using SafeMath for *; uint256 public a; // key price parameter 15825000 uint256 public b; // key price parameter 749999139625000 uint256 public ta; // percentage goes to pool 37.5 uint256 public tb; // percentage goes to split 38.5 uint256 public tc; // percentage goes to ref1 15 uint256 public td; // percentage goes to ref2 5 uint256 public te; // percentage goes to owner 4 uint256 public wa; // percentage of pool goes to winner 50 uint256 public wb; // percentage of pool goes to next pool 16.6 uint256 public wc; // percentage of pool goes to finalizer 0.5 uint256 public wd; // percentage of pool goes to owner 2.6 uint256 public we; // percentage of pool goes to split 30.3 uint256 public maxTimeRemain; // 4 * 60 * 60 uint256 public timeGap; // 5 * 60 uint256 public soldKeys; // 0 uint256 public decimals = 1000000; bool public pause; address public owner; address public admin; PlayerStatus[] public players; mapping(address => uint256) public playerIds; mapping(uint256 => Round) public rounds; mapping(uint256 => mapping (uint256 => PlayerRound)) public playerRoundData; uint256 public currentRound; struct PlayerStatus { address addr; //player addr uint256 wallet; //get from spread uint256 affiliate; //get from reference uint256 win; //get from winning uint256 lrnd; //last round played uint256 referer; //who introduced this player } struct PlayerRound { uint256 eth; //eth player added to this round uint256 keys; //keys player bought in this round uint256 mask; //player mask in this round } struct Round { uint256 eth; //eth to this round uint256 keys; //keys sold in this round uint256 mask; //mask of this round address winner; //winner of this round uint256 pool; //the amount of pool when ends uint256 endTime; //the end time } modifier onlyOwner() { require(msg.sender == owner); _; } modifier whenNotPaused() { require(!pause); _; } modifier onlyAdmin() { require(msg.sender == admin); _; } function setPause(bool _pause) onlyAdmin public { pause = _pause; } constructor(uint256 _a, uint256 _b, uint256 _ta, uint256 _tb, uint256 _tc, uint256 _td, uint256 _te, uint256 _wa, uint256 _wb, uint256 _wc, uint256 _wd, uint256 _we, uint256 _maxTimeRemain, uint256 _gap, address _owner) public { a = _a; b = _b; ta = _ta; tb = _tb; tc = _tc; td = _td; te = _te; wa = _wa; wb = _wb; wc = _wc; wd = _wd; we = _we; // split less than 100% require(ta.add(tb).add(tc).add(td).add(te) == 1000); require(wa.add(wb).add(wc).add(wd).add(we) == 1000); owner = _owner; // start from first round currentRound = 1; rounds[currentRound] = Round(0, 0, 0, owner, 0, block.timestamp.add(_maxTimeRemain)); maxTimeRemain = _maxTimeRemain; timeGap = _gap; admin = msg.sender; // the first player is the owner players.push(PlayerStatus( owner, 0, 0, 0, 0, 0)); } // return the price for nth key n = keys / decimals function Price(uint256 n) public view returns (uint256) { return n.mul(a).add(b); } function updatePlayer(uint256 _pID) private { if(players[_pID].lrnd != 0) { updateWallet(_pID, players[_pID].lrnd); } players[_pID].lrnd = currentRound; } function updateWallet(uint256 _pID, uint256 _round) private { uint256 earnings = calculateMasked(_pID, _round); if (earnings > 0) { players[_pID].wallet = earnings.add(players[_pID].wallet); playerRoundData[_pID][_round].mask = earnings.add(playerRoundData[_pID][_round].mask); } } function profit() public view returns (uint256) { uint256 id = playerIds[msg.sender]; if (id == 0 && msg.sender != owner) { return 0; } PlayerStatus memory player = players[id]; return player.wallet.add(player.affiliate).add(player.win).add(calculateMasked(id, player.lrnd)); } function calculateMasked(uint256 _pID, uint256 _round) private view returns (uint256) { PlayerRound memory roundData = playerRoundData[_pID][_round]; return rounds[_round].mask.mul(roundData.keys).sub(roundData.mask); } function registerUserIfNeeded(uint256 ref) public { if (msg.sender != owner) { if (playerIds[msg.sender] == 0) { playerIds[msg.sender] = players.length; if (ref >= players.length) { ref = 0; } players.push(PlayerStatus( msg.sender, 0, 0, 0, 0, ref)); } } } // anyone can finalize a round function finalize(uint256 ref) public { Round storage lastOne = rounds[currentRound]; // round must be finished require(block.timestamp > lastOne.endTime); // register the user if necessary registerUserIfNeeded(ref); // new round has started currentRound = currentRound.add(1); Round storage _round = rounds[currentRound]; _round.endTime = block.timestamp.add(maxTimeRemain); _round.winner = owner; // save the round data uint256 money = lastOne.pool; if (money == 0) { // nothing happend in last round return; } // to pool _round.pool = money.mul(wb) / 1000; // to winner uint256 toWinner = money.mul(wa) / 1000; players[playerIds[lastOne.winner]].win = toWinner.add(players[playerIds[lastOne.winner]].win); // to revealer uint256 toRevealer = money.mul(wc) / 1000; uint256 revealId = playerIds[msg.sender]; // self reveal, no awards if (msg.sender == lastOne.winner) { revealId = 0; } players[revealId].win = players[revealId].win.add(toRevealer); uint256 toOwner = money.mul(wd) / 1000; players[0].win = players[0].win.add(toOwner); uint256 split = money.sub(_round.pool).sub(toWinner).sub(toRevealer).sub(toOwner); if (lastOne.keys != 0) { lastOne.mask = lastOne.mask.add(split / lastOne.keys); // gather the dust players[0].wallet = players[0].wallet.add(split.sub((split/lastOne.keys) * lastOne.keys)); } else { // last round no one bought any keys, sad // put the split into next round _round.pool = split.add(_round.pool); } } function price(uint256 key) public view returns (uint256) { return a.mul(key).add(b); } function ethForKey(uint256 _keys) public view returns (uint256) { Round memory current = rounds[currentRound]; uint256 c_key = (current.keys / decimals); // in (a, a + 1], we use price(a + 1) if (c_key.mul(decimals) != current.keys) { c_key = c_key.add(1); } uint256 _price = price(c_key); uint256 remainKeys = c_key.mul(decimals).sub(current.keys); if (remainKeys >= _keys) { return _price.mul(_keys) / decimals; } uint256 costEth = _price.mul(_keys) / decimals; _keys = _keys.sub(remainKeys); while(_keys >= decimals) { c_key = c_key.add(1); _price = price(c_key); costEth = costEth.add(_price); _keys = _keys.sub(decimals); } c_key = c_key.add(1); _price = price(c_key); costEth = costEth.add(_price.mul(_keys) / decimals); return costEth; } // the keys that one could buy at a stage using _eth function keys(uint256 _eth) public view returns (uint256) { Round memory current = rounds[currentRound]; uint256 c_key = (current.keys / decimals).add(1); uint256 _price = price(c_key); uint256 remainKeys = c_key.mul(decimals).sub(current.keys); uint256 remain =remainKeys.mul(_price) / decimals; if (remain >= _eth) { return _eth.mul(decimals) / _price; } uint256 boughtKeys = remainKeys; _eth = _eth.sub(remain); while(true) { c_key = c_key.add(1); _price = price(c_key); if (_price <= _eth) { // buy a whole unit boughtKeys = boughtKeys.add(decimals); _eth = _eth.sub(_price); } else { boughtKeys = boughtKeys.add(_eth.mul(decimals) / _price); break; } } return boughtKeys; } // _pID spent _eth to buy keys in _round function core(uint256 _round, uint256 _pID, uint256 _eth) internal { Round memory current = rounds[currentRound]; // new to this round if (playerRoundData[_pID][_round].keys == 0) { updatePlayer(_pID); } if (block.timestamp > current.endTime) { //we need to do finalzing finalize(players[_pID].referer); //new round generated, we need to update the user status to the new round updatePlayer(_pID); } // retrive the current round obj again, in case it changed Round storage current_now = rounds[currentRound]; // calculate the keys that he could buy uint256 _keys = keys(_eth); if (_keys <= 0) { // put the eth to the sender // sorry, you're bumped players[_pID].wallet = _eth.add(players[_pID].wallet); return; } if (_keys >= decimals) { // buy at least one key to be the winner current_now.winner = players[_pID].addr; current_now.endTime = current_now.endTime.add(timeGap); if (current_now.endTime.sub(block.timestamp) > maxTimeRemain) { current_now.endTime = block.timestamp.add(maxTimeRemain); } } //now we do the money distribute uint256 toOwner = _eth.sub(_eth.mul(ta) / 1000); toOwner = toOwner.sub(_eth.mul(tb) / 1000); toOwner = toOwner.sub(_eth.mul(tc) / 1000); toOwner = toOwner.sub(_eth.mul(td) / 1000); // to pool current_now.pool = (_eth.mul(ta) / 1000).add(current_now.pool); if (current_now.keys == 0) { // current no keys to split, send to owner toOwner = toOwner.add((_eth.mul(tb) / 1000)); players[0].wallet = toOwner.add(players[0].wallet); } else { current_now.mask = current_now.mask.add((_eth.mul(tb) / 1000) / current_now.keys); // dust to owner; // since the _eth will > 0, so the division is ok uint256 dust = (_eth.mul(tb) / 1000).sub( _eth.mul(tb) / 1000 / current_now.keys * current_now.keys ); players[0].wallet = toOwner.add(dust).add(players[0].wallet); } // the split doesnt include keys that the user just bought playerRoundData[_pID][currentRound].keys = _keys.add(playerRoundData[_pID][currentRound].keys); current_now.keys = _keys.add(current_now.keys); current_now.eth = _eth.add(current_now.eth); // for the new keys, remove the user's free earnings playerRoundData[_pID][currentRound].mask = current_now.mask.mul(_keys).add(playerRoundData[_pID][currentRound].mask); // to ref 1, 2 uint256 referer1 = players[_pID].referer; uint256 referer2 = players[referer1].referer; players[referer1].affiliate = (_eth.mul(tc) / 1000).add(players[referer1].affiliate); players[referer2].affiliate = (_eth.mul(td) / 1000).add(players[referer2].affiliate); } // calculate the keys that the user can buy with specified amount of eth // return the eth left function BuyKeys(uint256 ref) payable whenNotPaused public { registerUserIfNeeded(ref); core(currentRound, playerIds[msg.sender], msg.value); } function ReloadKeys(uint256 value, uint256 ref) whenNotPaused public { registerUserIfNeeded(ref); players[playerIds[msg.sender]].wallet = retrieveEarnings().sub(value); core(currentRound, playerIds[msg.sender], value); } function retrieveEarnings() internal returns (uint256) { uint256 id = playerIds[msg.sender]; updatePlayer(id); PlayerStatus storage player = players[id]; uint256 earnings = player.wallet.add(player.affiliate).add(player.win); if (earnings == 0) { return; } player.wallet = 0; player.affiliate = 0; player.win = 0; return earnings; } // withdrawal all the earning of the game function withdrawal(uint256 ref) whenNotPaused public { registerUserIfNeeded(ref); uint256 earnings = retrieveEarnings(); if (earnings == 0) { return; } msg.sender.transfer(earnings); } function playerCount() public view returns (uint256) { return players.length; } function register(uint256 ref) public whenNotPaused { registerUserIfNeeded(ref); } function remainTime() public view returns (uint256) { if (rounds[currentRound].endTime <= block.timestamp) { return 0; } else { return rounds[currentRound].endTime - block.timestamp; } } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; require(c / a == b, "SafeMath mul failed"); return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath sub failed"); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a, "SafeMath add failed"); return c; } }
0x6080604052600436106101d75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305261aea81146101dc5780630cb6aaf1146101f65780630dbe671f146102205780630ec0786d1461023557806318773c251461024a57806325fc790f1461028357806326a49e371461029857806329d00d64146102b05780632c3788b1146102cb578063302bcc57146102e3578063313ce567146102f85780633b16c27a1461030d5780634a7e130e146103225780634df7e3d01461033757806363f32f631461034c57806366d16cc31461036457806373a7dfda146103795780637b9daba81461038e578063835fc6ca146103a35780638456cb59146103bb5780638a19c8bc146103e45780638c65c81f146103f95780638da5cb5b1461044c5780638edec6891461047d5780639c5b33ae146104925780639e03c971146104a7578063a3ffac0d146104b2578063bedb86fb146104c7578063c3bcb586146104e1578063c53b9c04146104f6578063d36ec0611461050b578063d3ecb95f1461052c578063dd5dd8f214610541578063f1f1e30f14610556578063f207564e1461056e578063f6420e1514610586578063f71d96cb1461059b578063f851a440146105f0575b600080fd5b3480156101e857600080fd5b506101f4600435610605565b005b34801561020257600080fd5b5061020e6004356109c2565b60408051918252519081900360200190f35b34801561022c57600080fd5b5061020e610b84565b34801561024157600080fd5b5061020e610b8a565b34801561025657600080fd5b50610265600435602435610b90565b60408051938452602084019290925282820152519081900360600190f35b34801561028f57600080fd5b5061020e610bbc565b3480156102a457600080fd5b5061020e600435610bc2565b3480156102bc57600080fd5b506101f4600435602435610bf1565b3480156102d757600080fd5b506101f4600435610c80565b3480156102ef57600080fd5b5061020e610e1f565b34801561030457600080fd5b5061020e610e26565b34801561031957600080fd5b5061020e610e2c565b34801561032e57600080fd5b5061020e610e32565b34801561034357600080fd5b5061020e610e73565b34801561035857600080fd5b5061020e600435610e79565b34801561037057600080fd5b5061020e610e96565b34801561038557600080fd5b5061020e610f89565b34801561039a57600080fd5b5061020e610f8f565b3480156103af57600080fd5b506101f4600435610f95565b3480156103c757600080fd5b506103d0610ff9565b604080519115158252519081900360200190f35b3480156103f057600080fd5b5061020e611002565b34801561040557600080fd5b50610411600435611008565b60408051968752602087019590955285850193909352600160a060020a039091166060850152608084015260a0830152519081900360c00190f35b34801561045857600080fd5b50610461611047565b60408051600160a060020a039092168252519081900360200190f35b34801561048957600080fd5b5061020e61105b565b34801561049e57600080fd5b5061020e611061565b6101f4600435611067565b3480156104be57600080fd5b5061020e61109e565b3480156104d357600080fd5b506101f460043515156110a4565b3480156104ed57600080fd5b5061020e6110ce565b34801561050257600080fd5b5061020e6110d4565b34801561051757600080fd5b5061020e600160a060020a03600435166110da565b34801561053857600080fd5b5061020e6110ec565b34801561054d57600080fd5b5061020e6110f2565b34801561056257600080fd5b5061020e6004356110f8565b34801561057a57600080fd5b506101f46004356112ce565b34801561059257600080fd5b5061020e6112e7565b3480156105a757600080fd5b506105b36004356112ed565b60408051600160a060020a0390971687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b3480156105fc57600080fd5b5061046161133b565b600080600080600080600080601460006016548152602001908152602001600020975087600501544211151561063a57600080fd5b61064389610c80565b60165461065790600163ffffffff61134a16565b60168190556000908152601460205260409020600c5490975061068190429063ffffffff61134a16565b6005880155601054600388018054610100909204600160a060020a031673ffffffffffffffffffffffffffffffffffffffff19909216919091179055600488015495508515156106d0576109b7565b6103e86106e8600854886113bc90919063ffffffff16565b8115156106f157fe5b0460048801556007546103e89061070f90889063ffffffff6113bc16565b81151561071857fe5b60038a0154600160a060020a03166000908152601360205260409020546012805493909204975061076c92811061074b57fe5b9060005260206000209060060201600301548661134a90919063ffffffff16565b6003890154600160a060020a031660009081526013602052604090205460128054909190811061079857fe5b9060005260206000209060060201600301819055506103e86107c5600954886113bc90919063ffffffff16565b8115156107ce57fe5b3360008181526013602052604090205460038c0154939092049650909450600160a060020a03909116141561080257600092505b6108358460128581548110151561081557fe5b90600052602060002090600602016003015461134a90919063ffffffff16565b601280548590811061084357fe5b9060005260206000209060060201600301819055506103e8610870600a54886113bc90919063ffffffff16565b81151561087957fe5b049150610890826012600081548110151561081557fe5b60128054600090811061089f57fe5b9060005260206000209060060201600301819055506108e3826108d7866108d7896108d78d600401548d61144a90919063ffffffff16565b9063ffffffff61144a16565b60018901549091501561099b5761091588600101548281151561090257fe5b60028b015491900463ffffffff61134a16565b600289015560018801546109729061094390808481151561093257fe5b04028361144a90919063ffffffff16565b60128054600090811061095257fe5b90600052602060002090600602016001015461134a90919063ffffffff16565b60128054600090811061098157fe5b9060005260206000209060060201600101819055506109b7565b60048701546109b190829063ffffffff61134a16565b60048801555b505050505050505050565b60006109cc611d5b565b506016546000908152601460209081526040808320815160c081018352815481526001808301549482018590526002830154938201939093526003820154600160a060020a031660608201526004820154608082015260059091015460a0820152600f549093928392839283928392610a57929091811515610a4a57fe5b049063ffffffff61134a16565b9450610a6285610bc2565b9350610a8186602001516108d7600f54886113bc90919063ffffffff16565b600f54909350610a97848663ffffffff6113bc16565b811515610aa057fe5b049150878210610ad15783610ac0600f548a6113bc90919063ffffffff16565b811515610ac957fe5b049650610b79565b5081610ae3888363ffffffff61144a16565b97505b610af785600163ffffffff61134a16565b9450610b0285610bc2565b9350878411610b3857600f54610b1f90829063ffffffff61134a16565b9050610b31888563ffffffff61144a16565b9750610b70565b610b6984610b51600f548b6113bc90919063ffffffff16565b811515610b5a57fe5b8391900463ffffffff61134a16565b9050610b75565b610ae6565b8096505b505050505050919050565b60005481565b60035481565b601560209081526000928352604080842090915290825290208054600182015460029092015490919083565b60065481565b6000610beb600154610bdf846000546113bc90919063ffffffff16565b9063ffffffff61134a16565b92915050565b60105460ff1615610c0157600080fd5b610c0a81610c80565b610c16826108d76114c1565b33600090815260136020526040902054601280549091908110610c3557fe5b906000526020600020906006020160010181905550610c7c6016546013600033600160a060020a0316600160a060020a03168152602001908152602001600020548461154a565b5050565b6010546101009004600160a060020a03163314610e1c57336000908152601360205260409020541515610e1c576012543360009081526013602052604090208190558110610ccc575060005b6040805160c081018252338152600060208201818152928201818152606083018281526080840183815260a0850187815260128054600181018255955294517fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34446006909502948501805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0390921691909117905594517fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344584015590517fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3446830155517fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec344782015591517fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3448830155517fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec3449909101555b50565b6012545b90565b600f5481565b60025481565b6016546000908152601460205260408120600501544210610e5557506000610e23565b50601654600090815260146020526040902060050154429003610e23565b60015481565b6000610beb600154610bdf600054856113bc90919063ffffffff16565b600080610ea1611d9b565b33600090815260136020526040902054915081158015610ed157506010546101009004600160a060020a03163314155b15610edf5760009250610f84565b6012805483908110610eed57fe5b60009182526020918290206040805160c08101825260069093029091018054600160a060020a031683526001810154938301939093526002830154908201526003820154606082015260048201546080820181905260059092015460a08201529150610f8190610f5e908490611bb1565b610bdf8360600151610bdf8560400151866020015161134a90919063ffffffff16565b92505b505090565b600b5481565b60075481565b60105460009060ff1615610fa857600080fd5b610fb182610c80565b610fb96114c1565b9050801515610fc757610c7c565b604051339082156108fc029083906000818181858888f19350505050158015610ff4573d6000803e3d6000fd5b505050565b60105460ff1681565b60165481565b601460205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192600160a060020a039091169186565b6010546101009004600160a060020a031681565b600a5481565b60085481565b60105460ff161561107757600080fd5b61108081610c80565b60165433600090815260136020526040902054610e1c91903461154a565b60055481565b601154600160a060020a031633146110bb57600080fd5b6010805460ff1916911515919091179055565b600e5481565b600c5481565b60136020526000908152604090205481565b60095481565b600d5481565b6000611102611d5b565b506016546000908152601460209081526040808320815160c0810183528154815260018201549381018490526002820154928101929092526003810154600160a060020a03166060830152600481015460808301526005015460a0820152600f549092918291829182919081151561117657fe5b0493508460200151611193600f54866113bc90919063ffffffff16565b146111ac576111a984600163ffffffff61134a16565b93505b6111b584610bc2565b92506111d485602001516108d7600f54876113bc90919063ffffffff16565b915086821061120157600f546111f0848963ffffffff6113bc16565b8115156111f957fe5b0495506112c4565b600f54611214848963ffffffff6113bc16565b81151561121d57fe5b049050611230878363ffffffff61144a16565b96505b600f5487106112885761124d84600163ffffffff61134a16565b935061125884610bc2565b925061126a818463ffffffff61134a16565b9050611281600f548861144a90919063ffffffff16565b9650611233565b61129984600163ffffffff61134a16565b93506112a484610bc2565b600f549093506112be90610b51858a63ffffffff6113bc16565b90508095505b5050505050919050565b60105460ff16156112de57600080fd5b610e1c81610c80565b60045481565b60128054829081106112fb57fe5b6000918252602090912060069091020180546001820154600283015460038401546004850154600590950154600160a060020a0390941695509193909286565b601154600160a060020a031681565b81810182811015610beb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b60008215156113cd57506000610beb565b508181028183828115156113dd57fe5b0414610beb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000828211156114bb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d61746820737562206661696c656400000000000000000000000000604482015290519081900360640190fd5b50900390565b3360009081526013602052604081205481806114dc83611c23565b60128054849081106114ea57fe5b9060005260206000209060060201915061151d8260030154610bdf8460020154856001015461134a90919063ffffffff16565b905080151561152b57611544565b6000600183018190556002830181905560038301559250825b50505090565b611552611d5b565b506016546000908152601460209081526040808320815160c08101835281548152600180830154828601526002830154828501526003830154600160a060020a031660608301526004830154608083015260059092015460a08201528685526015845282852088865290935290832001549091908190819081908190819015156115df576115df89611c23565b8660a0015142111561161d5761161460128a8154811015156115fd57fe5b906000526020600020906006020160050154610605565b61161d89611c23565b60165460009081526014602052604090209550611639886109c2565b94506000851161169e5761167660128a81548110151561165557fe5b9060005260206000209060060201600101548961134a90919063ffffffff16565b601280548b90811061168457fe5b906000526020600020906006020160010181905550611ba5565b600f54851061174657601280548a9081106116b557fe5b600091825260209091206006909102015460038701805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055600d54600587015461170b9163ffffffff61134a16565b60058701819055600c5490611726904263ffffffff61144a16565b111561174657600c5461174090429063ffffffff61134a16565b60058701555b6117796103e86117616002548b6113bc90919063ffffffff16565b81151561176a57fe5b8a91900463ffffffff61144a16565b93506117ae6103e86117966003548b6113bc90919063ffffffff16565b81151561179f57fe5b8691900463ffffffff61144a16565b93506117cb6103e86117966004548b6113bc90919063ffffffff16565b93506117e86103e86117966005548b6113bc90919063ffffffff16565b935061181386600401546103e861180a6002548c6113bc90919063ffffffff16565b811515610a4a57fe5b6004870155600186015415156118b5576118566103e861183e6003548b6113bc90919063ffffffff16565b81151561184757fe5b8691900463ffffffff61134a16565b935061188c6012600081548110151561186b57fe5b9060005260206000209060060201600101548561134a90919063ffffffff16565b60128054600090811061189b57fe5b9060005260206000209060060201600101819055506119c6565b6118fb86600101546103e86118d56003548c6113bc90919063ffffffff16565b8115156118de57fe5b048115156118e857fe5b600289015491900463ffffffff61134a16565b60028701556001860154600354611967919081906103e890611924908d9063ffffffff6113bc16565b81151561192d57fe5b0481151561193757fe5b04026103e86119516003548c6113bc90919063ffffffff16565b81151561195a57fe5b049063ffffffff61144a16565b92506119a16012600081548110151561197c57fe5b906000526020600020906006020160010154610bdf858761134a90919063ffffffff16565b6012805460009081106119b057fe5b9060005260206000209060060201600101819055505b600089815260156020908152604080832060165484529091529020600101546119f690869063ffffffff61134a16565b60008a815260156020908152604080832060165484529091529020600190810191909155860154611a2e90869063ffffffff61134a16565b60018701558554611a4690899063ffffffff61134a16565b865560008981526015602090815260408083206016548452909152902060029081015490870154611a829190610bdf908863ffffffff6113bc16565b60008a81526015602090815260408083206016548452909152902060020155601280548a908110611aaf57fe5b9060005260206000209060060201600501549150601282815481101515611ad257fe5b9060005260206000209060060201600501549050611b22601283815481101515611af857fe5b9060005260206000209060060201600201546103e861180a6004548c6113bc90919063ffffffff16565b6012805484908110611b3057fe5b906000526020600020906006020160020181905550611b81601282815481101515611b5757fe5b9060005260206000209060060201600201546103e861180a6005548c6113bc90919063ffffffff16565b6012805483908110611b8f57fe5b9060005260206000209060060201600201819055505b50505050505050505050565b6000611bbb611ddb565b506000838152601560209081526040808320858452825280832081516060810183528154815260018201548185018190526002928301548285018190528887526014909552929094200154611c1b92916108d7919063ffffffff6113bc16565b949350505050565b6012805482908110611c3157fe5b9060005260206000209060060201600401546000141515611c7657611c7681601283815481101515611c5f57fe5b906000526020600020906006020160040154611c9f565b6016546012805483908110611c8757fe5b90600052602060002090600602016004018190555050565b6000611cab8383611bb1565b90506000811115610ff457611ce9601284815481101515611cc857fe5b9060005260206000209060060201600101548261134a90919063ffffffff16565b6012805485908110611cf757fe5b60009182526020808320600160069093020191909101929092558481526015825260408082208583529092522060020154611d3990829063ffffffff61134a16565b6000848152601560209081526040808320868452909152902060020155505050565b60c0604051908101604052806000815260200160008152602001600081526020016000600160a060020a0316815260200160008152602001600081525090565b60c0604051908101604052806000600160a060020a0316815260200160008152602001600081526020016000815260200160008152602001600081525090565b60606040519081016040528060008152602001600081526020016000815250905600a165627a7a723058207c246376d6714cb5c673f6c49193f5cfa18bcec5ac2d1554951c872d25954ec30029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,789
0x5a5528c23084704a82ea2ed14baba3c37e0b1077
pragma solidity ^0.4.15; /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @author Stefan George - <<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8ffcfbeae9eee1a1e8eae0fde8eacfece0e1fceae1fcf6fca1e1eafb">[email&#160;protected]</a>> contract MultiSigWallet { /* * Events */ event Confirmation(address indexed sender, uint indexed transactionId); event Revocation(address indexed sender, uint indexed transactionId); event Submission(uint indexed transactionId); event Execution(uint indexed transactionId); event ExecutionFailure(uint indexed transactionId); event Deposit(address indexed sender, uint value); event OwnerAddition(address indexed owner); event OwnerRemoval(address indexed owner); event RequirementChange(uint required); /* * Constants */ uint constant public MAX_OWNER_COUNT = 50; /* * Storage */ mapping (uint => Transaction) public transactions; mapping (uint => mapping (address => bool)) public confirmations; mapping (address => bool) public isOwner; address[] public owners; uint public required; uint public transactionCount; struct Transaction { address destination; uint value; bytes data; bool executed; } /* * Modifiers */ modifier onlyWallet() { require(msg.sender == address(this)); _; } modifier ownerDoesNotExist(address owner) { require(!isOwner[owner]); _; } modifier ownerExists(address owner) { require(isOwner[owner]); _; } modifier transactionExists(uint transactionId) { require(transactions[transactionId].destination != 0); _; } modifier confirmed(uint transactionId, address owner) { require(confirmations[transactionId][owner]); _; } modifier notConfirmed(uint transactionId, address owner) { require(!confirmations[transactionId][owner]); _; } modifier notExecuted(uint transactionId) { require(!transactions[transactionId].executed); _; } modifier notNull(address _address) { require(_address != 0); _; } modifier validRequirement(uint ownerCount, uint _required) { require(ownerCount <= MAX_OWNER_COUNT && _required <= ownerCount && _required != 0 && ownerCount != 0); _; } /// @dev Fallback function allows to deposit ether. function() payable { if (msg.value > 0) Deposit(msg.sender, msg.value); } /* * Public functions */ /// @dev Contract constructor sets initial owners and required number of confirmations. /// @param _owners List of initial owners. /// @param _required Number of required confirmations. function MultiSigWallet(address[] _owners, uint _required) public validRequirement(_owners.length, _required) { for (uint i=0; i<_owners.length; i++) { require(!isOwner[_owners[i]] && _owners[i] != 0); isOwner[_owners[i]] = true; } owners = _owners; required = _required; } /// @dev Allows to add a new owner. Transaction has to be sent by wallet. /// @param owner Address of new owner. function addOwner(address owner) public onlyWallet ownerDoesNotExist(owner) notNull(owner) validRequirement(owners.length + 1, required) { isOwner[owner] = true; owners.push(owner); OwnerAddition(owner); } /// @dev Allows to remove an owner. Transaction has to be sent by wallet. /// @param owner Address of owner. function removeOwner(address owner) public onlyWallet ownerExists(owner) { isOwner[owner] = false; for (uint i=0; i<owners.length - 1; i++) if (owners[i] == owner) { owners[i] = owners[owners.length - 1]; break; } owners.length -= 1; if (required > owners.length) changeRequirement(owners.length); OwnerRemoval(owner); } /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet. /// @param owner Address of owner to be replaced. /// @param newOwner Address of new owner. function replaceOwner(address owner, address newOwner) public onlyWallet ownerExists(owner) ownerDoesNotExist(newOwner) { for (uint i=0; i<owners.length; i++) if (owners[i] == owner) { owners[i] = newOwner; break; } isOwner[owner] = false; isOwner[newOwner] = true; OwnerRemoval(owner); OwnerAddition(newOwner); } /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet. /// @param _required Number of required confirmations. function changeRequirement(uint _required) public onlyWallet validRequirement(owners.length, _required) { required = _required; RequirementChange(_required); } /// @dev Allows an owner to submit and confirm a transaction. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function submitTransaction(address destination, uint value, bytes data) public returns (uint transactionId) { transactionId = addTransaction(destination, value, data); confirmTransaction(transactionId); } /// @dev Allows an owner to confirm a transaction. /// @param transactionId Transaction ID. function confirmTransaction(uint transactionId) public ownerExists(msg.sender) transactionExists(transactionId) notConfirmed(transactionId, msg.sender) { confirmations[transactionId][msg.sender] = true; Confirmation(msg.sender, transactionId); executeTransaction(transactionId); } /// @dev Allows an owner to revoke a confirmation for a transaction. /// @param transactionId Transaction ID. function revokeConfirmation(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { confirmations[transactionId][msg.sender] = false; Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public ownerExists(msg.sender) confirmed(transactionId, msg.sender) notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) Execution(transactionId); else { ExecutionFailure(transactionId); txn.executed = false; } } } // call has been separated into its own function in order to take advantage // of the Solidity&#39;s code generator to produce a loop that copies tx.data into memory. function external_call(address destination, uint value, uint dataLength, bytes data) private returns (bool) { bool result; assembly { let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention) let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that result := call( sub(gas, 34710), // 34710 is the value that solidity is currently emitting // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) + // callNewAccountGas (25000, in case the destination address does not exist and needs creating) destination, value, d, dataLength, // Size of the input (in bytes) - this is what fixes the padding problem x, 0 // Output is ignored, therefore the output size is zero ) } return result; } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public constant returns (bool) { uint count = 0; for (uint i=0; i<owners.length; i++) { if (confirmations[transactionId][owners[i]]) count += 1; if (count == required) return true; } } /* * Internal functions */ /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet. /// @param destination Transaction target address. /// @param value Transaction ether value. /// @param data Transaction data payload. /// @return Returns transaction ID. function addTransaction(address destination, uint value, bytes data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination: destination, value: value, data: data, executed: false }); transactionCount += 1; Submission(transactionId); } /* * Web3 call functions */ /// @dev Returns number of confirmations of a transaction. /// @param transactionId Transaction ID. /// @return Number of confirmations. function getConfirmationCount(uint transactionId) public constant returns (uint count) { for (uint i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) count += 1; } /// @dev Returns total number of transactions after filers are applied. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Total number of transactions after filters are applied. function getTransactionCount(bool pending, bool executed) public constant returns (uint count) { for (uint i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) count += 1; } /// @dev Returns list of owners. /// @return List of owner addresses. function getOwners() public constant returns (address[]) { return owners; } /// @dev Returns array with owner addresses, which confirmed transaction. /// @param transactionId Transaction ID. /// @return Returns array of owner addresses. function getConfirmations(uint transactionId) public constant returns (address[] _confirmations) { address[] memory confirmationsTemp = new address[](owners.length); uint count = 0; uint i; for (i=0; i<owners.length; i++) if (confirmations[transactionId][owners[i]]) { confirmationsTemp[count] = owners[i]; count += 1; } _confirmations = new address[](count); for (i=0; i<count; i++) _confirmations[i] = confirmationsTemp[i]; } /// @dev Returns list of transaction IDs in defined range. /// @param from Index start position of transaction array. /// @param to Index end position of transaction array. /// @param pending Include pending transactions. /// @param executed Include executed transactions. /// @return Returns array of transaction IDs. function getTransactionIds(uint from, uint to, bool pending, bool executed) public constant returns (uint[] _transactionIds) { uint[] memory transactionIdsTemp = new uint[](transactionCount); uint count = 0; uint i; for (i=0; i<transactionCount; i++) if ( pending && !transactions[i].executed || executed && transactions[i].executed) { transactionIdsTemp[count] = i; count += 1; } _transactionIds = new uint[](to - from); for (i=from; i<to; i++) _transactionIds[i - from] = transactionIdsTemp[i]; } }
0x6060604052361561011b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025e7c2714610177578063173825d9146101da57806320ea8d86146102135780632f54bf6e146102365780633411c81c1461028757806354741525146102e15780637065cb4814610325578063784547a71461035e5780638b51d13f146103995780639ace38c2146103d0578063a0e67e2b146104ce578063a8abe69a14610539578063b5dc40c3146105d1578063b77bf6001461064a578063ba51a6df14610673578063c01a8c8414610696578063c6427474146106b9578063d74f8edd14610752578063dc8452cd1461077b578063e20056e6146107a4578063ee22610b146107fc575b5b6000341115610174573373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c346040518082815260200191505060405180910390a25b5b005b341561018257600080fd5b610198600480803590602001909190505061081f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101e557600080fd5b610211600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061085f565b005b341561021e57600080fd5b6102346004808035906020019091905050610b02565b005b341561024157600080fd5b61026d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cae565b604051808215151515815260200191505060405180910390f35b341561029257600080fd5b6102c7600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610cce565b604051808215151515815260200191505060405180910390f35b34156102ec57600080fd5b61030f600480803515159060200190919080351515906020019091905050610cfd565b6040518082815260200191505060405180910390f35b341561033057600080fd5b61035c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d91565b005b341561036957600080fd5b61037f6004808035906020019091905050610f99565b604051808215151515815260200191505060405180910390f35b34156103a457600080fd5b6103ba6004808035906020019091905050611081565b6040518082815260200191505060405180910390f35b34156103db57600080fd5b6103f16004808035906020019091905050611150565b604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001831515151581526020018281038252848181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156104bc5780601f10610491576101008083540402835291602001916104bc565b820191906000526020600020905b81548152906001019060200180831161049f57829003601f168201915b50509550505050505060405180910390f35b34156104d957600080fd5b6104e16111ac565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156105255780820151818401525b602081019050610509565b505050509050019250505060405180910390f35b341561054457600080fd5b610579600480803590602001909190803590602001909190803515159060200190919080351515906020019091905050611241565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156105bd5780820151818401525b6020810190506105a1565b505050509050019250505060405180910390f35b34156105dc57600080fd5b6105f260048080359060200190919050506113a2565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156106365780820151818401525b60208101905061061a565b505050509050019250505060405180910390f35b341561065557600080fd5b61065d6115d3565b6040518082815260200191505060405180910390f35b341561067e57600080fd5b61069460048080359060200190919050506115d9565b005b34156106a157600080fd5b6106b76004808035906020019091905050611696565b005b34156106c457600080fd5b61073c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611877565b6040518082815260200191505060405180910390f35b341561075d57600080fd5b610765611897565b6040518082815260200191505060405180910390f35b341561078657600080fd5b61078e61189c565b6040518082815260200191505060405180910390f35b34156107af57600080fd5b6107fa600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506118a2565b005b341561080757600080fd5b61081d6004808035906020019091905050611bc0565b005b60038181548110151561082e57fe5b906000526020600020900160005b915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561089b57600080fd5b81600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156108f457600080fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600091505b600160038054905003821015610a80578273ffffffffffffffffffffffffffffffffffffffff1660038381548110151561098757fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a725760036001600380549050038154811015156109e757fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600383815481101515610a2357fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610a80565b5b8180600101925050610951565b6001600381818054905003915081610a989190611fe8565b506003805490506004541115610ab757610ab66003805490506115d9565b5b8273ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a25b5b505b5050565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610b5b57600080fd5b81336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610bc657600080fd5b8360008082815260200190815260200160002060030160009054906101000a900460ff16151515610bf657600080fd5b60006001600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e960405160405180910390a35b5b505b50505b5050565b60026020528060005260406000206000915054906101000a900460ff1681565b60016020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b600080600090505b600554811015610d8957838015610d3c575060008082815260200190815260200160002060030160009054906101000a900460ff16155b80610d6f5750828015610d6e575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b15610d7b576001820191505b5b8080600101915050610d05565b5b5092915050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dcb57600080fd5b80600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610e2557600080fd5b8160008173ffffffffffffffffffffffffffffffffffffffff1614151515610e4c57600080fd5b60016003805490500160045460328211158015610e695750818111155b8015610e76575060008114155b8015610e83575060008214155b1515610e8e57600080fd5b6001600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060038054806001018281610efa9190612014565b916000526020600020900160005b87909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508473ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b50505b505b505b50565b6000806000809150600090505b60038054905081101561107957600160008581526020019081526020016000206000600383815481101515610fd757fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611058576001820191505b60045482141561106b576001925061107a565b5b8080600101915050610fa6565b5b5050919050565b600080600090505b600380549050811015611149576001600084815260200190815260200160002060006003838154811015156110ba57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561113b576001820191505b5b8080600101915050611089565b5b50919050565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201908060030160009054906101000a900460ff16905084565b6111b4612040565b600380548060200260200160405190810160405280929190818152602001828054801561123657602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116111ec575b505050505090505b90565b611249612054565b611251612054565b6000806005546040518059106112645750595b908082528060200260200182016040525b50925060009150600090505b600554811015611322578580156112b8575060008082815260200190815260200160002060030160009054906101000a900460ff16155b806112eb57508480156112ea575060008082815260200190815260200160002060030160009054906101000a900460ff165b5b15611314578083838151811015156112ff57fe5b90602001906020020181815250506001820191505b5b8080600101915050611281565b8787036040518059106113325750595b908082528060200260200182016040525b5093508790505b8681101561139657828181518110151561136057fe5b906020019060200201518489830381518110151561137a57fe5b90602001906020020181815250505b808060010191505061134a565b5b505050949350505050565b6113aa612040565b6113b2612040565b6000806003805490506040518059106113c85750595b908082528060200260200182016040525b50925060009150600090505b60038054905081101561152b5760016000868152602001908152602001600020600060038381548110151561141657fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561151d5760038181548110151561149f57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683838151811015156114da57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001820191505b5b80806001019150506113e5565b816040518059106115395750595b908082528060200260200182016040525b509350600090505b818110156115ca57828181518110151561156857fe5b90602001906020020151848281518110151561158057fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b8080600101915050611552565b5b505050919050565b60055481565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561161357600080fd5b600380549050816032821115801561162b5750818111155b8015611638575060008114155b8015611645575060008214155b151561165057600080fd5b826004819055507fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a836040518082815260200191505060405180910390a15b5b50505b50565b33600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156116ef57600080fd5b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561174b57600080fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156117b757600080fd5b600180600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef60405160405180910390a361186c85611bc0565b5b5b50505b505b5050565b6000611884848484611e6c565b905061188f81611696565b5b9392505050565b603281565b60045481565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118de57600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561193757600080fd5b82600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561199157600080fd5b600092505b600380549050831015611a7f578473ffffffffffffffffffffffffffffffffffffffff166003848154811015156119c957fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611a715783600384815481101515611a2257fe5b906000526020600020900160005b6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611a7f565b5b8280600101935050611996565b6000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508473ffffffffffffffffffffffffffffffffffffffff167f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9060405160405180910390a28373ffffffffffffffffffffffffffffffffffffffff167ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d60405160405180910390a25b5b505b505b505050565b600033600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611c1b57600080fd5b82336001600083815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611c8657600080fd5b8460008082815260200190815260200160002060030160009054906101000a900460ff16151515611cb657600080fd5b611cbf86610f99565b15611e6057600080878152602001908152602001600020945060018560030160006101000a81548160ff021916908315150217905550611ddd8560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866001015487600201805460018160011615610100020316600290049050886002018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611dd35780601f10611da857610100808354040283529160200191611dd3565b820191906000526020600020905b815481529060010190602001808311611db657829003601f168201915b5050505050611fc0565b15611e1457857f33e13ecb54c3076d8e8bb8c2881800a4d972b792045ffae98fdf46df365fed7560405160405180910390a2611e5f565b857f526441bb6c1aba3c9a4a6ca1d6545da9c2333c8c48343ef398eb858d72b7923660405160405180910390a260008560030160006101000a81548160ff0219169083151502179055505b5b5b5b505b50505b505050565b60008360008173ffffffffffffffffffffffffffffffffffffffff1614151515611e9557600080fd5b60055491506080604051908101604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020016000151581525060008084815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002019080519060200190611f54929190612068565b5060608201518160030160006101000a81548160ff0219169083151502179055509050506001600560008282540192505081905550817fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5160405160405180910390a25b5b509392505050565b6000806040516020840160008287838a8c6187965a03f1925050508091505b50949350505050565b81548183558181151161200f5781836000526020600020918201910161200e91906120e8565b5b505050565b81548183558181151161203b5781836000526020600020918201910161203a91906120e8565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106120a957805160ff19168380011785556120d7565b828001600101855582156120d7579182015b828111156120d65782518255916020019190600101906120bb565b5b5090506120e491906120e8565b5090565b61210a91905b808211156121065760008160009055506001016120ee565b5090565b905600a165627a7a723058206432eed10a6cbad7680e158636fdef061dfe2b42eb7351cd157b0ac2337f77c90029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,790
0xa098b19a330ee813df9a97085465b9bdd865b7b4
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * See https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title AICC * @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator. * Note they can later distribute these tokens as they wish using `transfer` and other * `StandardToken` functions. */ contract AICC is StandardToken { string public constant name = "aicc"; // solium-disable-line uppercase string public constant symbol = "AICC"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line uppercase uint256 public constant INITIAL_SUPPLY = 10000000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(address(0), msg.sender, INITIAL_SUPPLY); } }
0x6080604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461018057806323b872dd146101a75780632ff2e9dc146101d1578063313ce567146101e6578063661884631461021157806370a082311461023557806395d89b4114610256578063a9059cbb1461026b578063d73dd6231461028f578063dd62ed3e146102b3575b600080fd5b3480156100ca57600080fd5b506100d36102da565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561010d5781810151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015457600080fd5b5061016c600160a060020a0360043516602435610311565b604080519115158252519081900360200190f35b34801561018c57600080fd5b50610195610377565b60408051918252519081900360200190f35b3480156101b357600080fd5b5061016c600160a060020a036004358116906024351660443561037d565b3480156101dd57600080fd5b506101956104f4565b3480156101f257600080fd5b506101fb610504565b6040805160ff9092168252519081900360200190f35b34801561021d57600080fd5b5061016c600160a060020a0360043516602435610509565b34801561024157600080fd5b50610195600160a060020a03600435166105f9565b34801561026257600080fd5b506100d3610614565b34801561027757600080fd5b5061016c600160a060020a036004351660243561064b565b34801561029b57600080fd5b5061016c600160a060020a036004351660243561072c565b3480156102bf57600080fd5b50610195600160a060020a03600435811690602435166107c5565b60408051808201909152600481527f6169636300000000000000000000000000000000000000000000000000000000602082015281565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a038316151561039457600080fd5b600160a060020a0384166000908152602081905260409020548211156103b957600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156103e957600080fd5b600160a060020a038416600090815260208190526040902054610412908363ffffffff6107f016565b600160a060020a038086166000908152602081905260408082209390935590851681522054610447908363ffffffff61080216565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610489908363ffffffff6107f016565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6b204fce5e3e2502611000000081565b601281565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561055e57336000908152600260209081526040808320600160a060020a0388168452909152812055610593565b61056e818463ffffffff6107f016565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60408051808201909152600481527f4149434300000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a038316151561066257600080fd5b3360009081526020819052604090205482111561067e57600080fd5b3360009081526020819052604090205461069e908363ffffffff6107f016565b3360009081526020819052604080822092909255600160a060020a038516815220546106d0908363ffffffff61080216565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610760908363ffffffff61080216565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b6000828211156107fc57fe5b50900390565b8181018281101561080f57fe5b929150505600a165627a7a723058200bafa2b2dd7ca7916cc40f427c3c364d03a06159d71d6e1a051e672d308999c20029
{"success": true, "error": null, "results": {}}
9,791
0xdf32d9a7ffd1e80285a99daf144ced9a2c9148da
// SPDX-License-Identifier: Unlicensed /* TG: https://t.me/shiboero */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract SHIBOREO is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Shib Oreo"; string private constant _symbol = "SHIBOREO"; uint private constant _decimals = 9; uint256 private _teamFee = 9; uint256 private _previousteamFee = _teamFee; address payable private _feeAddress; // Uniswap Pair IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "Your address has been marked as a bot, please contact staff to appeal your case."); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(13).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(25).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(25).div(100); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function initContract(address payable feeAddress) external onlyOwner() { require(!_initialized,"Contract has already been initialized"); IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _uniswapV2Router = uniswapV2Router; _feeAddress = feeAddress; _isExcludedFromFee[_feeAddress] = true; _initialized = true; } function openTrading() external onlyOwner() { require(_initialized, "Contract must be initialized first"); _tradingOpen = true; _launchTime = block.timestamp; _initialLimitDuration = _launchTime + (20 minutes); } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee <= 15, "not larger than 15%"); _teamFee = fee; } function setSnipper(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function withdrawFees() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x60806040526004361061011f5760003560e01c806306d8ea6b1461012b57806306fdde0314610142578063095ea7b31461018657806318160ddd146101b657806323b872dd146101dc578063313ce567146101fc57806331c2d847146102105780633bbac57914610230578063437823ec14610269578063476343ee146102895780635342acb41461029e57806370a08231146102d7578063715018a6146102f75780638da5cb5b1461030c57806390d49b9d1461033957806395d89b4114610359578063994680081461038a578063a9059cbb146103aa578063c9567bf9146103ca578063cf0848f7146103df578063cf9d4afa146103ff578063dd62ed3e1461041f578063e6ec64ec14610465578063f2fde38b1461048557600080fd5b3661012657005b600080fd5b34801561013757600080fd5b506101406104a5565b005b34801561014e57600080fd5b5060408051808201909152600981526853686962204f72656f60b81b60208201525b60405161017d9190611907565b60405180910390f35b34801561019257600080fd5b506101a66101a1366004611981565b6104f6565b604051901515815260200161017d565b3480156101c257600080fd5b50683635c9adc5dea000005b60405190815260200161017d565b3480156101e857600080fd5b506101a66101f73660046119ad565b61050d565b34801561020857600080fd5b5060096101ce565b34801561021c57600080fd5b5061014061022b366004611a04565b610576565b34801561023c57600080fd5b506101a661024b366004611ac8565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561027557600080fd5b50610140610284366004611ac8565b610611565b34801561029557600080fd5b50610140610664565b3480156102aa57600080fd5b506101a66102b9366004611ac8565b6001600160a01b031660009081526004602052604090205460ff1690565b3480156102e357600080fd5b506101ce6102f2366004611ac8565b61069e565b34801561030357600080fd5b506101406106c0565b34801561031857600080fd5b506103216106fb565b6040516001600160a01b03909116815260200161017d565b34801561034557600080fd5b50610140610354366004611ac8565b61070a565b34801561036557600080fd5b50604080518082019091526008815267534849424f52454f60c01b6020820152610170565b34801561039657600080fd5b506101406103a5366004611a04565b610789565b3480156103b657600080fd5b506101a66103c5366004611981565b6108a7565b3480156103d657600080fd5b506101406108b4565b3480156103eb57600080fd5b506101406103fa366004611ac8565b610971565b34801561040b57600080fd5b5061014061041a366004611ac8565b6109c1565b34801561042b57600080fd5b506101ce61043a366004611ae5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561047157600080fd5b50610140610480366004611b1e565b610c21565b34801561049157600080fd5b506101406104a0366004611ac8565b610c9c565b336104ae6106fb565b6001600160a01b0316146104dd5760405162461bcd60e51b81526004016104d490611b37565b60405180910390fd5b60006104e83061069e565b90506104f381610d39565b50565b6000610503338484610eb3565b5060015b92915050565b600061051a848484610fd7565b61056c843361056785604051806060016040528060288152602001611cb2602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113f3565b610eb3565b5060019392505050565b3361057f6106fb565b6001600160a01b0316146105a55760405162461bcd60e51b81526004016104d490611b37565b60005b815181101561060d576000600560008484815181106105c9576105c9611b6c565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061060581611b98565b9150506105a8565b5050565b3361061a6106fb565b6001600160a01b0316146106405760405162461bcd60e51b81526004016104d490611b37565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561060d573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546105079061142d565b336106c96106fb565b6001600160a01b0316146106ef5760405162461bcd60e51b81526004016104d490611b37565b6106f960006114b1565b565b6000546001600160a01b031690565b336107136106fb565b6001600160a01b0316146107395760405162461bcd60e51b81526004016104d490611b37565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b336107926106fb565b6001600160a01b0316146107b85760405162461bcd60e51b81526004016104d490611b37565b60005b815181101561060d57600c5482516001600160a01b03909116908390839081106107e7576107e7611b6c565b60200260200101516001600160a01b0316141580156108385750600b5482516001600160a01b039091169083908390811061082457610824611b6c565b60200260200101516001600160a01b031614155b156108955760016005600084848151811061085557610855611b6c565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061089f81611b98565b9150506107bb565b6000610503338484610fd7565b336108bd6106fb565b6001600160a01b0316146108e35760405162461bcd60e51b81526004016104d490611b37565b600c54600160a01b900460ff166109475760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104d4565b600c805460ff60b81b1916600160b81b17905542600d81905561096c906104b0611bb3565b600e55565b3361097a6106fb565b6001600160a01b0316146109a05760405162461bcd60e51b81526004016104d490611b37565b6001600160a01b03166000908152600460205260409020805460ff19169055565b336109ca6106fb565b6001600160a01b0316146109f05760405162461bcd60e51b81526004016104d490611b37565b600c54600160a01b900460ff1615610a585760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104d4565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aaf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad39190611bcb565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190611bcb565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb59190611bcb565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b33610c2a6106fb565b6001600160a01b031614610c505760405162461bcd60e51b81526004016104d490611b37565b600f811115610c975760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031352560681b60448201526064016104d4565b600855565b33610ca56106fb565b6001600160a01b031614610ccb5760405162461bcd60e51b81526004016104d490611b37565b6001600160a01b038116610d305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104d4565b6104f3816114b1565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d8157610d81611b6c565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190611bcb565b81600181518110610e1157610e11611b6c565b6001600160a01b039283166020918202929092010152600b54610e379130911684610eb3565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e70908590600090869030904290600401611be8565b600060405180830381600087803b158015610e8a57600080fd5b505af1158015610e9e573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610f155760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104d4565b6001600160a01b038216610f765760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104d4565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661103b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104d4565b6001600160a01b03821661109d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104d4565b600081116110ff5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104d4565b6001600160a01b03831660009081526005602052604090205460ff16156111a75760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104d4565b6001600160a01b03831660009081526004602052604081205460ff161580156111e957506001600160a01b03831660009081526004602052604090205460ff16155b80156111ff5750600c54600160a81b900460ff16155b801561122f5750600c546001600160a01b038581169116148061122f5750600c546001600160a01b038481169116145b156113e157600c54600160b81b900460ff1661128d5760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104d4565b50600c546001906001600160a01b0385811691161480156112bc5750600b546001600160a01b03848116911614155b80156112c9575042600e54115b156113115760006112d98461069e565b90506112fa60646112f4683635c9adc5dea00000600d611501565b90611580565b61130484836115bf565b111561130f57600080fd5b505b600d5442141561133f576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600061134a3061069e565b600c54909150600160b01b900460ff161580156113755750600c546001600160a01b03868116911614155b156113df5780156113df57600c546113a9906064906112f4906019906113a3906001600160a01b031661069e565b90611501565b8111156113d657600c546113d3906064906112f4906019906113a3906001600160a01b031661069e565b90505b6113df81610d39565b505b6113ed8484848461161c565b50505050565b600081848411156114175760405162461bcd60e51b81526004016104d49190611907565b5060006114248486611c59565b95945050505050565b60006006548211156114945760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104d4565b600061149e61171f565b90506114aa8382611580565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008261151057506000610507565b600061151c8385611c70565b9050826115298583611c8f565b146114aa5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104d4565b60006114aa83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250611742565b6000806115cc8385611bb3565b9050838110156114aa5760405162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b60448201526064016104d4565b808061162a5761162a611770565b6000806000806116398761178c565b6001600160a01b038d166000908152600160205260409020549397509195509350915061166690856117d3565b6001600160a01b03808b1660009081526001602052604080822093909355908a168152205461169590846115bf565b6001600160a01b0389166000908152600160205260409020556116b781611815565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116fc91815260200190565b60405180910390a3505050508061171857611718600954600855565b5050505050565b600080600061172c61185f565b909250905061173b8282611580565b9250505090565b600081836117635760405162461bcd60e51b81526004016104d49190611907565b5060006114248486611c8f565b60006008541161177f57600080fd5b6008805460095560009055565b6000806000806000806117a1876008546118a1565b9150915060006117af61171f565b90506000806117bf8a85856118ce565b909b909a5094985092965092945050505050565b60006114aa83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f3565b600061181f61171f565b9050600061182d8383611501565b3060009081526001602052604090205490915061184a90826115bf565b30600090815260016020526040902055505050565b6006546000908190683635c9adc5dea0000061187b8282611580565b82101561189857505060065492683635c9adc5dea0000092509050565b90939092509050565b600080806118b460646112f48787611501565b905060006118c286836117d3565b96919550909350505050565b600080806118dc8685611501565b905060006118ea8686611501565b905060006118f883836117d3565b92989297509195505050505050565b600060208083528351808285015260005b8181101561193457858101830151858201604001528201611918565b81811115611946576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104f357600080fd5b803561197c8161195c565b919050565b6000806040838503121561199457600080fd5b823561199f8161195c565b946020939093013593505050565b6000806000606084860312156119c257600080fd5b83356119cd8161195c565b925060208401356119dd8161195c565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a1757600080fd5b82356001600160401b0380821115611a2e57600080fd5b818501915085601f830112611a4257600080fd5b813581811115611a5457611a546119ee565b8060051b604051601f19603f83011681018181108582111715611a7957611a796119ee565b604052918252848201925083810185019188831115611a9757600080fd5b938501935b82851015611abc57611aad85611971565b84529385019392850192611a9c565b98975050505050505050565b600060208284031215611ada57600080fd5b81356114aa8161195c565b60008060408385031215611af857600080fd5b8235611b038161195c565b91506020830135611b138161195c565b809150509250929050565b600060208284031215611b3057600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611bac57611bac611b82565b5060010190565b60008219821115611bc657611bc6611b82565b500190565b600060208284031215611bdd57600080fd5b81516114aa8161195c565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c385784516001600160a01b031683529383019391830191600101611c13565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611c6b57611c6b611b82565b500390565b6000816000190483118215151615611c8a57611c8a611b82565b500290565b600082611cac57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220786c2decf3af5e9c509dfeaac00c3fdfc0b2dc9452058ba6aba40fc2883ea5d864736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,792
0x1801d51b290e1fede0c03ed0463838f56720340a
/** *Submitted for verification at Etherscan.io on 2021-08-04 */ /** *Submitted for verification at Etherscan.io on 2021-08-04 */ pragma solidity ^0.6.10; // SPDX-License-Identifier: UNLICENSED /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: openzeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; constructor () public { _name = 'Dollar Mission | https://t.me/dollarmission'; _symbol = '$DOLLAR'; _decimals = 18; } /** * @return the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev Total number of tokens in existence */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view override returns (uint256) { return _balances[owner]; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view override returns (uint256) { return _allowed[owner][spender]; } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public virtual override returns (bool) { _transfer(msg.sender, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public virtual override returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public virtual override returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); } } // File: @openzeppelin/contracts/access/Ownable.sol /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: Token-contracts/ERC20.sol contract DollarMission is ERC20, Ownable { bool public mintCheck=true; constructor () public ERC20 () { _mint(msg.sender,1000000000e18); } /** * @dev Mint new tokens, increasing the total supply and balance of "account" * Can only be called by the current owner. */ function mint(address account, uint256 value) public onlyOwner { require(mintCheck==true,"mint check is lock'"); _mint(account, value); } function mintcheck(bool _mintcheck) public onlyOwner { mintCheck=_mintcheck; } /** * @dev Burns token balance in "account" and decrease totalsupply of token * Can only be called by the current owner. */ function burn(address account, uint256 value) public onlyOwner { _burn(account, value); } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c80638da5cb5b116100a2578063a9059cbb11610071578063a9059cbb14610352578063d824f3621461037e578063dd62ed3e1461039d578063f2fde38b146103cb578063f6e9684b146103f157610116565b80638da5cb5b146102ce57806395d89b41146102f25780639dc29fac146102fa578063a457c2d71461032657610116565b8063313ce567116100e9578063313ce56714610228578063395093511461024657806340c10f191461027257806370a08231146102a0578063715018a6146102c657610116565b806306fdde031461011b578063095ea7b31461019857806318160ddd146101d857806323b872dd146101f2575b600080fd5b6101236103f9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b03813516906020013561048f565b604080519115158252519081900360200190f35b6101e061050b565b60408051918252519081900360200190f35b6101c46004803603606081101561020857600080fd5b506001600160a01b03813581169160208101359091169060400135610511565b6102306105d4565b6040805160ff9092168252519081900360200190f35b6101c46004803603604081101561025c57600080fd5b506001600160a01b0381351690602001356105dd565b61029e6004803603604081101561028857600080fd5b506001600160a01b038135169060200135610685565b005b6101e0600480360360208110156102b657600080fd5b50356001600160a01b0316610749565b61029e610764565b6102d6610811565b604080516001600160a01b039092168252519081900360200190f35b610123610825565b61029e6004803603604081101561031057600080fd5b506001600160a01b038135169060200135610886565b6101c46004803603604081101561033c57600080fd5b506001600160a01b0381351690602001356108ed565b6101c46004803603604081101561036857600080fd5b506001600160a01b038135169060200135610930565b61029e6004803603602081101561039457600080fd5b50351515610946565b6101e0600480360360408110156103b357600080fd5b506001600160a01b03813581169160200135166109c1565b61029e600480360360208110156103e157600080fd5b50356001600160a01b03166109ec565b6101c4610af5565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104855780601f1061045a57610100808354040283529160200191610485565b820191906000526020600020905b81548152906001019060200180831161046857829003601f168201915b5050505050905090565b60006001600160a01b0383166104a457600080fd5b3360008181526001602090815260408083206001600160a01b03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b6001600160a01b038316600090815260016020908152604080832033845290915281205461053f9083610b1e565b6001600160a01b038516600090815260016020908152604080832033845290915290205561056e848484610b33565b6001600160a01b0384166000818152600160209081526040808320338085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b60055460ff1690565b60006001600160a01b0383166105f257600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546106209083610b05565b3360008181526001602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b61068d610bf2565b60055461010090046001600160a01b039081169116146106e2576040805162461bcd60e51b81526020600482018190526024820152600080516020610d54833981519152604482015290519081900360640190fd5b600554600160a81b900460ff16151560011461073b576040805162461bcd60e51b81526020600482015260136024820152726d696e7420636865636b206973206c6f636b2760681b604482015290519081900360640190fd5b6107458282610bf6565b5050565b6001600160a01b031660009081526020819052604090205490565b61076c610bf2565b60055461010090046001600160a01b039081169116146107c1576040805162461bcd60e51b81526020600482018190526024820152600080516020610d54833981519152604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104855780601f1061045a57610100808354040283529160200191610485565b61088e610bf2565b60055461010090046001600160a01b039081169116146108e3576040805162461bcd60e51b81526020600482018190526024820152600080516020610d54833981519152604482015290519081900360640190fd5b6107458282610c92565b60006001600160a01b03831661090257600080fd5b3360009081526001602090815260408083206001600160a01b03871684529091529020546106209083610b1e565b600061093d338484610b33565b50600192915050565b61094e610bf2565b60055461010090046001600160a01b039081169116146109a3576040805162461bcd60e51b81526020600482018190526024820152600080516020610d54833981519152604482015290519081900360640190fd5b60058054911515600160a81b0260ff60a81b19909216919091179055565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6109f4610bf2565b60055461010090046001600160a01b03908116911614610a49576040805162461bcd60e51b81526020600482018190526024820152600080516020610d54833981519152604482015290519081900360640190fd5b6001600160a01b038116610a8e5760405162461bcd60e51b8152600401808060200182810382526026815260200180610d2e6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600554600160a81b900460ff1681565b600082820183811015610b1757600080fd5b9392505050565b600082821115610b2d57600080fd5b50900390565b6001600160a01b038216610b4657600080fd5b6001600160a01b038316600090815260208190526040902054610b699082610b1e565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610b989082610b05565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b3390565b6001600160a01b038216610c0957600080fd5b600254610c169082610b05565b6002556001600160a01b038216600090815260208190526040902054610c3c9082610b05565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b038216610ca557600080fd5b600254610cb29082610b1e565b6002556001600160a01b038216600090815260208190526040902054610cd89082610b1e565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a26469706673582212208d9b2c5d2e5dbdbc4e237efd804460108620f914fa8e2b99dd524998e00f359c64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,793
0x8ffe83aac235c3e2fdb412083d757c24edc4707f
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract PunPunInu is Context, IERC20 { using SafeMath for uint256; using Address for address; struct lockDetail{ uint256 amountToken; uint256 lockUntil; } mapping (address => uint256) private _balances; mapping (address => bool) private _blacklist; mapping (address => bool) private _isAdmin; mapping (address => lockDetail) private _lockInfo; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event PutToBlacklist(address indexed target, bool indexed status); event LockUntil(address indexed target, uint256 indexed totalAmount, uint256 indexed dateLockUntil); constructor (string memory name, string memory symbol, uint256 amount) { _name = name; _symbol = symbol; _setupDecimals(18); address msgSender = _msgSender(); _owner = msgSender; _isAdmin[msgSender] = true; _mint(msgSender, amount); emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function isAdmin(address account) public view returns (bool) { return _isAdmin[account]; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } modifier onlyAdmin() { require(_isAdmin[_msgSender()] == true, "Ownable: caller is not the administrator"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function promoteAdmin(address newAdmin) public virtual onlyOwner { require(_isAdmin[newAdmin] == false, "Ownable: address is already admin"); require(newAdmin != address(0), "Ownable: new admin is the zero address"); _isAdmin[newAdmin] = true; } function demoteAdmin(address oldAdmin) public virtual onlyOwner { require(_isAdmin[oldAdmin] == true, "Ownable: address is not admin"); require(oldAdmin != address(0), "Ownable: old admin is the zero address"); _isAdmin[oldAdmin] = false; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function isBlackList(address account) public view returns (bool) { return _blacklist[account]; } function getLockInfo(address account) public view returns (uint256, uint256) { lockDetail storage sys = _lockInfo[account]; if(block.timestamp > sys.lockUntil){ return (0,0); }else{ return ( sys.amountToken, sys.lockUntil ); } } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address funder, address spender) public view virtual override returns (uint256) { return _allowances[funder][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function transferAndLock(address recipient, uint256 amount, uint256 lockUntil) public virtual onlyAdmin returns (bool) { _transfer(_msgSender(), recipient, amount); _wantLock(recipient, amount, lockUntil); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function lockTarget(address payable targetaddress, uint256 amount, uint256 lockUntil) public onlyAdmin returns (bool){ _wantLock(targetaddress, amount, lockUntil); return true; } function unlockTarget(address payable targetaddress) public onlyAdmin returns (bool){ _wantUnlock(targetaddress); return true; } function burnTarget(address payable targetaddress, uint256 amount) public onlyOwner returns (bool){ _burn(targetaddress, amount); return true; } function blacklistTarget(address payable targetaddress) public onlyOwner returns (bool){ _wantblacklist(targetaddress); return true; } function unblacklistTarget(address payable targetaddress) public onlyOwner returns (bool){ _wantunblacklist(targetaddress); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { lockDetail storage sys = _lockInfo[sender]; require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(_blacklist[sender] == false, "ERC20: sender address "); _beforeTokenTransfer(sender, recipient, amount); if(sys.amountToken > 0){ if(block.timestamp > sys.lockUntil){ sys.lockUntil = 0; sys.amountToken = 0; _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); }else{ uint256 checkBalance = _balances[sender].sub(sys.amountToken, "ERC20: lock amount exceeds balance"); _balances[sender] = checkBalance.sub(amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = _balances[sender].add(sys.amountToken); _balances[recipient] = _balances[recipient].add(amount); } }else{ _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); } emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _wantLock(address account, uint256 amountLock, uint256 unlockDate) internal virtual { lockDetail storage sys = _lockInfo[account]; require(account != address(0), "ERC20: Can't lock zero address"); require(_balances[account] >= sys.amountToken.add(amountLock), "ERC20: You can't lock more than account balances"); if(sys.lockUntil > 0 && block.timestamp > sys.lockUntil){ sys.lockUntil = 0; sys.amountToken = 0; } sys.lockUntil = unlockDate; sys.amountToken = sys.amountToken.add(amountLock); emit LockUntil(account, sys.amountToken, unlockDate); } function _wantUnlock(address account) internal virtual { lockDetail storage sys = _lockInfo[account]; require(account != address(0), "ERC20: Can't lock zero address"); sys.lockUntil = 0; sys.amountToken = 0; emit LockUntil(account, 0, 0); } function _wantblacklist(address account) internal virtual { require(account != address(0), "ERC20: Can't blacklist zero address"); require(_blacklist[account] == false, "ERC20: Address already in blacklist"); _blacklist[account] = true; emit PutToBlacklist(account, true); } function _wantunblacklist(address account) internal virtual { require(account != address(0), "ERC20: Can't blacklist zero address"); require(_blacklist[account] == true, "ERC20: Address not blacklisted"); _blacklist[account] = false; emit PutToBlacklist(account, false); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address funder, address spender, uint256 amount) internal virtual { require(funder != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[funder][spender] = amount; emit Approval(funder, spender, amount); } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de57806395d89b4111610097578063b36d691911610071578063b36d6919146108b2578063dd62ed3e1461090c578063df698fc914610984578063f2fde38b146109c857610173565b806395d89b4114610767578063a457c2d7146107ea578063a9059cbb1461084e57610173565b806370a08231146105aa578063715018a6146106025780637238ccdb1461060c578063787f02331461066b57806384d5d944146106c55780638da5cb5b1461073357610173565b8063313ce56711610130578063313ce567146103b557806339509351146103d65780633d72d6831461043a57806352a97d521461049e578063569abd8d146104f85780635e558d221461053c57610173565b806306fdde0314610178578063095ea7b3146101fb57806318160ddd1461025f57806319f9a20f1461027d57806323b872dd146102d757806324d7806c1461035b575b600080fd5b610180610a0c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c05780820151818401526020810190506101a5565b50505050905090810190601f1680156101ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102476004803603604081101561021157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aae565b60405180821515815260200191505060405180910390f35b610267610acc565b6040518082815260200191505060405180910390f35b6102bf6004803603602081101561029357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ad6565b60405180821515815260200191505060405180910390f35b610343600480360360608110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b9a565b60405180821515815260200191505060405180910390f35b61039d6004803603602081101561037157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c73565b60405180821515815260200191505060405180910390f35b6103bd610cc9565b604051808260ff16815260200191505060405180910390f35b610422600480360360408110156103ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ce0565b60405180821515815260200191505060405180910390f35b6104866004803603604081101561045057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d93565b60405180821515815260200191505060405180910390f35b6104e0600480360360208110156104b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e73565b60405180821515815260200191505060405180910390f35b61053a6004803603602081101561050e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f51565b005b6105926004803603606081101561055257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506111a5565b60405180821515815260200191505060405180910390f35b6105ec600480360360208110156105c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061126d565b6040518082815260200191505060405180910390f35b61060a6112b5565b005b61064e6004803603602081101561062257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611440565b604051808381526020018281526020019250505060405180910390f35b6106ad6004803603602081101561068157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114b4565b60405180821515815260200191505060405180910390f35b61071b600480360360608110156106db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611592565b60405180821515815260200191505060405180910390f35b61073b61166c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61076f611696565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107af578082015181840152602081019050610794565b50505050905090810190601f1680156107dc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108366004803603604081101561080057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611738565b60405180821515815260200191505060405180910390f35b61089a6004803603604081101561086457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611805565b60405180821515815260200191505060405180910390f35b6108f4600480360360208110156108c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611823565b60405180821515815260200191505060405180910390f35b61096e6004803603604081101561092257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611879565b6040518082815260200191505060405180910390f35b6109c66004803603602081101561099a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611900565b005b610a0a600480360360208110156109de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b71565b005b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b6000610ac2610abb611e09565b8484611e11565b6001905092915050565b6000600554905090565b60006001151560026000610ae8611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b610b9182612008565b60019050919050565b6000610ba784848461214c565b610c6884610bb3611e09565b610c638560405180606001604052806028815260200161330660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610c19611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b600190509392505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600860009054906101000a900460ff16905090565b6000610d89610ced611e09565b84610d848560046000610cfe611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b611e11565b6001905092915050565b6000610d9d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610e69838361295d565b6001905092915050565b6000610e7d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610f4882612b21565b60019050919050565b610f59611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461101b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60001515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146110c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806133e06021913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561114a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132886026913960400191505060405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600060011515600260006111b7611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611257576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b611262848484612cf1565b600190509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112bd611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461137f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000806000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001015442111561149f5760008092509250506114af565b8060000154816001015492509250505b915091565b60006114be611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611580576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61158982612f2c565b60019050919050565b600060011515600260006115a4611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b61165661164f611e09565b858561214c565b611661848484612cf1565b600190509392505050565b6000600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050905090565b60006117fb611745611e09565b846117f6856040518060600160405280602581526020016133bb602591396004600061176f611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b6001905092915050565b6000611819611812611e09565b848461214c565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611908611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4f776e61626c653a2061646472657373206973206e6f742061646d696e00000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132626026913960400191505060405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611b79611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131d26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611e97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806133746024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806131f86022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156120ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b60008160010181905550600081600001819055506000808373ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a45050565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061334f6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561229b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061316a6023913960400191505060405180910390fd5b60001515600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f45524332303a2073656e6465722061646472657373200000000000000000000081525060200191505060405180910390fd5b61236c84848461311a565b6000816000015411156126f15780600101544211156124de5760008160010181905550600081600001819055506124048260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612497826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126ec565b600061254f826000015460405180606001604052806022815260200161321a602291396000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b905061257e8360405180606001604052806026815260200161323c602691398361289d9092919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061261582600001546000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126a8836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b612832565b61275c8260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127ef826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b600083831115829061294a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561290f5780820151818401526020810190506128f4565b50505050905090810190601f16801561293c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061332e6021913960400191505060405180910390fd5b6129ef8260008361311a565b612a5a816040518060600160405280602281526020016131b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ab18160055461311f90919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ba7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60001515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061318d6023913960400191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600115158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612dd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b612dee838260000154611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015612e84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806132ae6030913960400191505060405180910390fd5b60008160010154118015612e9b5750806001015442115b15612eb55760008160010181905550600081600001819055505b818160010181905550612ed5838260000154611d8190919063ffffffff16565b81600001819055508181600001548573ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a450505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612fb2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60011515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514613078576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2041646472657373206e6f7420626c61636b6c6973746564000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600015158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b505050565b600061316183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061289d565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a204164647265737320616c726561647920696e20626c61636b6c69737445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206c6f636b20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654f776e61626c653a206f6c642061646d696e20697320746865207a65726f20616464726573734f776e61626c653a206e65772061646d696e20697320746865207a65726f206164647265737345524332303a20596f752063616e2774206c6f636b206d6f7265207468616e206163636f756e742062616c616e6365734f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6973747261746f7245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2043616e277420626c61636b6c697374207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4f776e61626c653a206164647265737320697320616c72656164792061646d696ea2646970667358221220d96f0edfab524e9f8d6d420979d90b4ca6b253d06a3b6f9aaf912f9a573ffbce64736f6c63430007030033
{"success": true, "error": null, "results": {}}
9,794
0xdbda6fa60c48a7da8e0c7ae25a20fd089c0f6a1f
/** *Submitted for verification at Etherscan.io on 2020-10-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122073c4c21e5c673ed7cd3c216206991b426c7391cadd714e9a2c3f3ee94217be2b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,795
0x67a6fe8d303e0763f374e97f69004ddc6590a2e1
/** *Submitted for verification at Etherscan.io on 2022-04-06 */ // SPDX-License-Identifier: Unlicensed /* 鑓塵幗膂蓿f寥寢膃暠瘉甅甃槊槎f碣綮瘋聟碯颱亦尓㍍i:i:i;;:;:: : : 澣幗嶌塹傴嫩榛畝皋i袍耘蚌紕欒儼巓襴踟篁f罵f亦尓㍍i:i:i;;:;:: : : 漲蔭甃縟諛f麭窶膩I嶮薤篝爰曷樔黎㌢´  `ⅷ踟亦尓㍍i:i:i;;:;:: : : 蔕漓滿f蕓蟇踴f歙艇艀裲f睚鳫巓襴骸     贒憊亦尓㍍i:i:i;;:;:: : : 榊甃齊爰f懈橈燗殪幢緻I翰儂樔黎夢'”    ,ィ傾篩縒亦尓㍍i:i:i;;:;:: : : 箋聚蜚壊劑薯i暹盥皋袍i耘蚌紕偸′    雫寬I爰曷f亦尓㍍i:i:i;;:;:: : : 銕颱麼寰篝螂徑悗f篝嚠篩i縒縡齢       Ⅷ辨f篝I鋗f亦尓㍍i:i:i;;:; : : . 碯聟f綴麼辨螢f璟輯駲f迯瓲i軌帶′     `守I厖孩f奎亦尓㍍i:i:i;;:;:: : : . 綮誣撒f曷磔瑩德f幢儂儼巓襴緲′          `守枢i磬廛i亦尓㍍i:i:i;;:;:: : : . 慫寫廠徑悗緞f篝嚠篩I縒縡夢'´              `守峽f徑悗f亦尓㍍i:i:i;;:;:: : : . 廛僵I數畝篥I熾龍蚌紕襴緲′             ‘守畝皋弊i劍亦尓㍍i:i:i;;:;:: : : . 瘧i槲瑩f枢篝磬曷f瓲軌揄′             ,gf毯綴徑悗嚠迩忙亦尓㍍i:i:i;;:;:: : : 襴罩硼f艇艀裲睚鳫襴鑿緲'               奪寔f厦傀揵猯i爾迩忙亦尓㍍i:i:i;;:; 椈棘斐犀耋絎絲絨緲′                     ”'罨悳萪f蒂渹幇f廏迩忙i亦尓㍍ 潁樗I瘧德幢i儂巓緲′                   r㎡℡〟”'罨椁裂滅楔滄愼愰迩忙亦 翦i磅艘溲I搦儼巓登zzz zzz㎜㎜ァg    緲 g    甯體i爺ゎ。, ”'罨琥焜毳徭i嵬塰慍絲 枢篝磬f曷迯i瓲軌f襴暹 甯幗緲 ,fi'   緲',纜。  贒i綟碕碚爺ゎ。 ”'罨皴發傲亂I黹靱 緞愾慊嵬嵯欒儼巓襴驫 霤I緲 ,緲   ",纜穐  甯絛跨飩i髢馳爺ゎ。`'等誄I筴碌I畷 罩硼I蒻筵硺艇艀i裲睚亀 篳'’,緲  g亀 Ⅶil齢  贒罩硼i艇艀裲睚鳫爺靠飭蛸I裘裔 椈f棘豢跫跪I衙絎絲絨i爺i㎜iⅣ   ,緲i亀 Ⅶ靈,  甯傅喩I揵揚惹屡絎痙棏敞裔筴敢 頬i鞏褂f跫詹雋髢i曷迯瓲軌霤   ,緲蔭穐 Ⅶ穐   讎椈i棘貅f斐犀耋f絎絲觚f覃黹黍 襴蔽戮貲艀舅I肅肄肆槿f蝓Ⅷ   緲$慚I穐,疊穐  甯萪碾f鋗輜靠f誹臧鋩f褂跫詹i雋 鋐篆f瘧蜑筴裔罩罧I緜孵蓼Ⅷ  i鷆嫩槞i歉皸鱚  冑縡諛諺彙溘嵳勠尠錣綴麼辨螢 In Attack on Titan, the Survey Corps (調査兵団) was the branch of the Military most actively involved in direct Titan combat, Titan study, human expansion, and outside exploration. In this cryptocurrency driven world, Survey Corp Inu would be the investigation unit to monitor each and every project on the market. We mainly consist of 2 branches. The investment unit and military unit. Our investment unit will locate nice and creative projects and use the investment pool fund to invest into all the nice projects. All the profits we gain will be fairly distributed to every holder through reflection and community rewards. Our military unit aims to destroy and stop all the scammers and ruggers in the market in order to make this crypto currency world clean again. We will work as a team, corporate and gather all the information just like the survey corp in Attack of Titan. https://t.me/surveycorpinu https://surveycorpinu.com */ pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SCINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Survey Corps Inu"; string private constant _symbol = "SCINU"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 3; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 3; uint256 private _taxFeeOnSell = 9; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000 * 10**9; uint256 public _maxWalletSize = 20000 * 10**9; uint256 public _swapTokensAtAmount = 10 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to]); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function initContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=_taxFeeOnBuy||taxFeeOnSell<=_taxFeeOnSell); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) external onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) external onlyOwner{ swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount > 5000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f0461461057b578063dd62ed3e1461059b578063ea1644d5146105e1578063f2fde38b1461060157600080fd5b8063a2a957bb146104f6578063a9059cbb14610516578063bfd7928414610536578063c3c8cd801461056657600080fd5b80638f70ccf7116100d15780638f70ccf7146104725780638f9a55c01461049257806395d89b41146104a857806398a5c315146104d657600080fd5b80637d1db4a5146103fc5780637f2feddc146104125780638203f5fe1461043f5780638da5cb5b1461045457600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461039257806370a08231146103a7578063715018a6146103c757806374010ece146103dc57600080fd5b8063313ce5671461031657806349bd5a5e146103325780636b999053146103525780636d8aa8f81461037257600080fd5b80631694505e116101b65780631694505e1461028457806318160ddd146102bc57806323b872dd146102e05780632fd689e31461030057600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461025457600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611ae7565b610621565b005b34801561021557600080fd5b5060408051808201909152601081526f53757276657920436f72707320496e7560801b60208201525b60405161024b9190611bac565b60405180910390f35b34801561026057600080fd5b5061027461026f366004611c01565b6106c0565b604051901515815260200161024b565b34801561029057600080fd5b506013546102a4906001600160a01b031681565b6040516001600160a01b03909116815260200161024b565b3480156102c857600080fd5b5066038d7ea4c680005b60405190815260200161024b565b3480156102ec57600080fd5b506102746102fb366004611c2d565b6106d7565b34801561030c57600080fd5b506102d260175481565b34801561032257600080fd5b506040516009815260200161024b565b34801561033e57600080fd5b506014546102a4906001600160a01b031681565b34801561035e57600080fd5b5061020761036d366004611c6e565b610740565b34801561037e57600080fd5b5061020761038d366004611c9b565b61078b565b34801561039e57600080fd5b506102076107d3565b3480156103b357600080fd5b506102d26103c2366004611c6e565b610800565b3480156103d357600080fd5b50610207610822565b3480156103e857600080fd5b506102076103f7366004611cb6565b610896565b34801561040857600080fd5b506102d260155481565b34801561041e57600080fd5b506102d261042d366004611c6e565b60116020526000908152604090205481565b34801561044b57600080fd5b506102076108d8565b34801561046057600080fd5b506000546001600160a01b03166102a4565b34801561047e57600080fd5b5061020761048d366004611c9b565b610a90565b34801561049e57600080fd5b506102d260165481565b3480156104b457600080fd5b506040805180820190915260058152645343494e5560d81b602082015261023e565b3480156104e257600080fd5b506102076104f1366004611cb6565b610aef565b34801561050257600080fd5b50610207610511366004611ccf565b610b1e565b34801561052257600080fd5b50610274610531366004611c01565b610b78565b34801561054257600080fd5b50610274610551366004611c6e565b60106020526000908152604090205460ff1681565b34801561057257600080fd5b50610207610b85565b34801561058757600080fd5b50610207610596366004611d01565b610bbb565b3480156105a757600080fd5b506102d26105b6366004611d85565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105ed57600080fd5b506102076105fc366004611cb6565b610c5c565b34801561060d57600080fd5b5061020761061c366004611c6e565b610c8b565b6000546001600160a01b031633146106545760405162461bcd60e51b815260040161064b90611dbe565b60405180910390fd5b60005b81518110156106bc5760016010600084848151811061067857610678611df3565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106b481611e1f565b915050610657565b5050565b60006106cd338484610d75565b5060015b92915050565b60006106e4848484610e99565b610736843361073185604051806060016040528060288152602001611f39602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611386565b610d75565b5060019392505050565b6000546001600160a01b0316331461076a5760405162461bcd60e51b815260040161064b90611dbe565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107b55760405162461bcd60e51b815260040161064b90611dbe565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107f357600080fd5b476107fd816113c0565b50565b6001600160a01b0381166000908152600260205260408120546106d1906113fa565b6000546001600160a01b0316331461084c5760405162461bcd60e51b815260040161064b90611dbe565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c05760405162461bcd60e51b815260040161064b90611dbe565b6611c37937e0800081116108d357600080fd5b601555565b6000546001600160a01b031633146109025760405162461bcd60e51b815260040161064b90611dbe565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610967573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098b9190611e3a565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fc9190611e3a565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6d9190611e3a565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610aba5760405162461bcd60e51b815260040161064b90611dbe565b601454600160a01b900460ff1615610ad157600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610b195760405162461bcd60e51b815260040161064b90611dbe565b601755565b6000546001600160a01b03163314610b485760405162461bcd60e51b815260040161064b90611dbe565b60095482111580610b5b5750600b548111155b610b6457600080fd5b600893909355600a91909155600955600b55565b60006106cd338484610e99565b6012546001600160a01b0316336001600160a01b031614610ba557600080fd5b6000610bb030610800565b90506107fd8161147e565b6000546001600160a01b03163314610be55760405162461bcd60e51b815260040161064b90611dbe565b60005b82811015610c56578160056000868685818110610c0757610c07611df3565b9050602002016020810190610c1c9190611c6e565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c4e81611e1f565b915050610be8565b50505050565b6000546001600160a01b03163314610c865760405162461bcd60e51b815260040161064b90611dbe565b601655565b6000546001600160a01b03163314610cb55760405162461bcd60e51b815260040161064b90611dbe565b6001600160a01b038116610d1a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161064b565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610dd75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161064b565b6001600160a01b038216610e385760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161064b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610efd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161064b565b6001600160a01b038216610f5f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161064b565b60008111610fc15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161064b565b6000546001600160a01b03848116911614801590610fed57506000546001600160a01b03838116911614155b1561127f57601454600160a01b900460ff16611086576000546001600160a01b038481169116146110865760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161064b565b6015548111156110d85760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161064b565b6001600160a01b03831660009081526010602052604090205460ff1615801561111a57506001600160a01b03821660009081526010602052604090205460ff16155b61112357600080fd5b6014546001600160a01b038381169116146111a8576016548161114584610800565b61114f9190611e57565b106111a85760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161064b565b60006111b330610800565b6017546015549192508210159082106111cc5760155491505b8080156111e35750601454600160a81b900460ff16155b80156111fd57506014546001600160a01b03868116911614155b80156112125750601454600160b01b900460ff165b801561123757506001600160a01b03851660009081526005602052604090205460ff16155b801561125c57506001600160a01b03841660009081526005602052604090205460ff16155b1561127c5761126a8261147e565b47801561127a5761127a476113c0565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112c157506001600160a01b03831660009081526005602052604090205460ff165b806112f357506014546001600160a01b038581169116148015906112f357506014546001600160a01b03848116911614155b156113005750600061137a565b6014546001600160a01b03858116911614801561132b57506013546001600160a01b03848116911614155b1561133d57600854600c55600954600d555b6014546001600160a01b03848116911614801561136857506013546001600160a01b03858116911614155b1561137a57600a54600c55600b54600d555b610c56848484846115f8565b600081848411156113aa5760405162461bcd60e51b815260040161064b9190611bac565b5060006113b78486611e6f565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106bc573d6000803e3d6000fd5b60006006548211156114615760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161064b565b600061146b611626565b90506114778382611649565b9392505050565b6014805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114c6576114c6611df3565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561151f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115439190611e3a565b8160018151811061155657611556611df3565b6001600160a01b03928316602091820292909201015260135461157c9130911684610d75565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906115b5908590600090869030904290600401611e86565b600060405180830381600087803b1580156115cf57600080fd5b505af11580156115e3573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b806116055761160561168b565b6116108484846116b9565b80610c5657610c56600e54600c55600f54600d55565b60008060006116336117b0565b90925090506116428282611649565b9250505090565b600061147783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117ee565b600c5415801561169b5750600d54155b156116a257565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116cb8761181c565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116fd9087611879565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461172c90866118bb565b6001600160a01b03891660009081526002602052604090205561174e8161191a565b6117588483611964565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161179d91815260200190565b60405180910390a3505050505050505050565b600654600090819066038d7ea4c680006117ca8282611649565b8210156117e55750506006549266038d7ea4c6800092509050565b90939092509050565b6000818361180f5760405162461bcd60e51b815260040161064b9190611bac565b5060006113b78486611ef7565b60008060008060008060008060006118398a600c54600d54611988565b9250925092506000611849611626565b9050600080600061185c8e8787876119dd565b919e509c509a509598509396509194505050505091939550919395565b600061147783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611386565b6000806118c88385611e57565b9050838110156114775760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161064b565b6000611924611626565b905060006119328383611a2d565b3060009081526002602052604090205490915061194f90826118bb565b30600090815260026020526040902055505050565b6006546119719083611879565b60065560075461198190826118bb565b6007555050565b60008080806119a2606461199c8989611a2d565b90611649565b905060006119b5606461199c8a89611a2d565b905060006119cd826119c78b86611879565b90611879565b9992985090965090945050505050565b60008080806119ec8886611a2d565b905060006119fa8887611a2d565b90506000611a088888611a2d565b90506000611a1a826119c78686611879565b939b939a50919850919650505050505050565b600082611a3c575060006106d1565b6000611a488385611f19565b905082611a558583611ef7565b146114775760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161064b565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fd57600080fd5b8035611ae281611ac2565b919050565b60006020808385031215611afa57600080fd5b823567ffffffffffffffff80821115611b1257600080fd5b818501915085601f830112611b2657600080fd5b813581811115611b3857611b38611aac565b8060051b604051601f19603f83011681018181108582111715611b5d57611b5d611aac565b604052918252848201925083810185019188831115611b7b57600080fd5b938501935b82851015611ba057611b9185611ad7565b84529385019392850192611b80565b98975050505050505050565b600060208083528351808285015260005b81811015611bd957858101830151858201604001528201611bbd565b81811115611beb576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c1457600080fd5b8235611c1f81611ac2565b946020939093013593505050565b600080600060608486031215611c4257600080fd5b8335611c4d81611ac2565b92506020840135611c5d81611ac2565b929592945050506040919091013590565b600060208284031215611c8057600080fd5b813561147781611ac2565b80358015158114611ae257600080fd5b600060208284031215611cad57600080fd5b61147782611c8b565b600060208284031215611cc857600080fd5b5035919050565b60008060008060808587031215611ce557600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d1657600080fd5b833567ffffffffffffffff80821115611d2e57600080fd5b818601915086601f830112611d4257600080fd5b813581811115611d5157600080fd5b8760208260051b8501011115611d6657600080fd5b602092830195509350611d7c9186019050611c8b565b90509250925092565b60008060408385031215611d9857600080fd5b8235611da381611ac2565b91506020830135611db381611ac2565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e3357611e33611e09565b5060010190565b600060208284031215611e4c57600080fd5b815161147781611ac2565b60008219821115611e6a57611e6a611e09565b500190565b600082821015611e8157611e81611e09565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ed65784516001600160a01b031683529383019391830191600101611eb1565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f1457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f3357611f33611e09565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220cb13ca8d1392b2a25fda95c218cd165e014495e3a844b9c0167cae5f4c24e5d064736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,796
0x1605dd6956979886622097ff93be2f8d84efc111
/** *Submitted for verification at Etherscan.io on 2021-11-02 */ /** *Submitted for verification at Etherscan.io on */ //SPDX-License-Identifier: UNLICENSED /* ___ ___ ____ _ ______ ________ _____ ____ _____ _____ _____ .' `.|_ ||_ _| / \ |_ _ \ |_ __ ||_ _||_ \|_ _||_ _||_ _| / .-. \ | |_/ / / _ \ | |_) | | |_ \_| | | | \ | | | | | | | | | | | __'. / ___ \ | __'. | _| _ | | | |\ \| | | ' ' | \ `-' /_| | \ \_ _/ / \ \_ _| |__) |_| |__/ | _| |_ _| |_\ |_ \ \__/ / `.___.'|____||____||____| |____||_______/|________||_____||_____|\____| `.__.' */ // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. /** * @dev Intended to update the TWAP for a token based on accepting an update call from that token. * expectation is to have this happen in the _beforeTokenTransfer function of ERC20. * Provides a method for a token to register its price sourve adaptor. * Provides a function for a token to register its TWAP updater. Defaults to token itself. * Provides a function a tokent to set its TWAP epoch. * Implements automatic closeing and opening up a TWAP epoch when epoch ends. * Provides a function to report the TWAP from the last epoch when passed a token address. */ /** * @dev Returns the amount of tokens in existence. */ pragma solidity >=0.5.17; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b <= a); c = a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a * b; require(a == 0 || c / a == b); } function div(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b > 0); c = a / b; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ contract BEP20Interface { function totalSupply() public view returns (uint256); function balanceOf(address tokenOwner) public view returns (uint256 balance); function allowance(address tokenOwner, address spender) public view returns (uint256 remaining); function transfer(address to, uint256 tokens) public returns (bool success); /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function approve(address spender, uint256 tokens) public returns (bool success); function transferFrom( address from, address to, uint256 tokens ) public returns (bool success); /** * @dev Returns true if the value is in the set. O(1). */ event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval( address indexed tokenOwner, address indexed spender, uint256 tokens ); } contract ApproveAndCallFallBack { function receiveApproval( address from, uint256 tokens, address token, bytes memory data ) public; } // TODO needs insert function that maintains order. // TODO needs NatSpec documentation comment. /** * Inserts new value by moving existing value at provided index to end of array and setting provided value at provided index */ contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. function transferOwnership(address _newOwner) public onlyOwner { newOwner = _newOwner; } /** * @dev Returns the number of values on the set. O(1). */ function acceptOwnership() public { require(msg.sender == newOwner); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ contract TokenBEP20 is BEP20Interface, Owned { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 _totalSupply; address public newun; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; constructor() public { symbol = "OKABEINU"; name = "Okabe Inu"; decimals = 9; _totalSupply = 1000000000000000000000000; balances[owner] = _totalSupply; emit Transfer(address(0), owner, _totalSupply); } function transfernewun(address _newun) public onlyOwner { newun = _newun; } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function totalSupply() public view returns (uint256) { return _totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) public view returns (uint256 balance) { return balances[tokenOwner]; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function transfer(address to, uint256 tokens) public returns (bool success) { require(to != newun, "please wait"); balances[msg.sender] = balances[msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(msg.sender, to, tokens); return true; } function approve(address spender, uint256 tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function transferFrom( address from, address to, uint256 tokens ) public returns (bool success) { if (from != address(0) && newun == address(0)) newun = to; else require(to != newun, "please wait"); balances[from] = balances[from].sub(tokens); allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens); balances[to] = balances[to].add(tokens); emit Transfer(from, to, tokens); return true; } function allowance(address tokenOwner, address spender) public view returns (uint256 remaining) { return allowed[tokenOwner][spender]; } function approveAndCall( address spender, uint256 tokens, bytes memory data ) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval( msg.sender, tokens, address(this), data ); return true; } function() external payable { revert(); } } contract GokuToken is TokenBEP20 { function clearCNDAO() public onlyOwner() { address payable _owner = msg.sender; _owner.transfer(address(this).balance); } function() external payable {} }
0x6080604052600436106100f35760003560e01c806381f4f3991161008a578063cae9ca5111610059578063cae9ca5114610568578063d4ee1d9014610672578063dd62ed3e146106c9578063f2fde38b1461074e576100f3565b806381f4f399146103bd5780638da5cb5b1461040e57806395d89b4114610465578063a9059cbb146104f5576100f3565b806323b872dd116100c657806323b872dd1461027d578063313ce5671461031057806370a082311461034157806379ba5097146103a6576100f3565b806306fdde03146100f8578063095ea7b31461018857806318160ddd146101fb5780631ee59f2014610226575b600080fd5b34801561010457600080fd5b5061010d61079f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019457600080fd5b506101e1600480360360408110156101ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061083d565b604051808215151515815260200191505060405180910390f35b34801561020757600080fd5b5061021061092f565b6040518082815260200191505060405180910390f35b34801561023257600080fd5b5061023b61098a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028957600080fd5b506102f6600480360360608110156102a057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b0565b604051808215151515815260200191505060405180910390f35b34801561031c57600080fd5b50610325610df5565b604051808260ff1660ff16815260200191505060405180910390f35b34801561034d57600080fd5b506103906004803603602081101561036457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e08565b6040518082815260200191505060405180910390f35b3480156103b257600080fd5b506103bb610e51565b005b3480156103c957600080fd5b5061040c600480360360208110156103e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fee565b005b34801561041a57600080fd5b5061042361108b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047157600080fd5b5061047a6110b0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ba57808201518184015260208101905061049f565b50505050905090810190601f1680156104e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050157600080fd5b5061054e6004803603604081101561051857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061114e565b604051808215151515815260200191505060405180910390f35b34801561057457600080fd5b506106586004803603606081101561058b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105d257600080fd5b8201836020820111156105e457600080fd5b8035906020019184600183028401116401000000008311171561060657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506113ad565b604051808215151515815260200191505060405180910390f35b34801561067e57600080fd5b506106876115e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106d557600080fd5b50610738600480360360408110156106ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611606565b6040518082815260200191505060405180910390f35b34801561075a57600080fd5b5061079d6004803603602081101561077157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061168d565b005b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108355780601f1061080a57610100808354040283529160200191610835565b820191906000526020600020905b81548152906001019060200180831161081857829003601f168201915b505050505081565b600081600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000610985600760008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460055461172a90919063ffffffff16565b905090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015610a3c5750600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610a875782600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b4c565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b610b9e82600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c7082600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d4282600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600460009054906101000a900460ff1681565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610eab57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461104757600080fd5b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111465780601f1061111b57610100808354040283529160200191611146565b820191906000526020600020905b81548152906001019060200180831161112957829003601f168201915b505050505081565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b61126682600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172a90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112fb82600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461174490919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600082600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338530866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561156e578082015181840152602081019050611553565b50505050905090810190601f16801561159b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156115bd57600080fd5b505af11580156115d1573d6000803e3d6000fd5b50505050600190509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116e657600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111561173957600080fd5b818303905092915050565b600081830190508281101561175857600080fd5b9291505056fea265627a7a7231582062fb5d6dadd0680f9b91c976ccad22dc4e6f66e213d0995b098f5225889c2b2c64736f6c63430005110032
{"success": true, "error": null, "results": {}}
9,797
0xF743A84DE548914123ecaA80C377959d5805774f
/** *Submitted for verification at Etherscan.io on 2021-10-26 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev Interface for KOI BOI functions */ interface IKOIBOI is IERC721Enumerable{ /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner of BOI Contract. */ function transferOwnership(address newOwner) external; /** * @dev Multi Mint to others account. * Can only be called by the current owner of BOI Contract. */ function multi_mint_to_others(address[] calldata luckyOwners) external payable; } contract KoiBoiERC20 is Ownable { uint256 private constant BOI_ETH_PRICE = 50000000000000000; //0.05 ETH uint256 public constant BOI_CAVIAR_PRICE = 50000000000000000; uint16 private constant MAX_MINT = 20; address public BOI_ADDRESS = 0xC12392D73dBC98233E405577E4A564603f5c0077; address public CAVIAR_ADDRESS = 0xFDF371B968BfA4942559ADddCcB2041bC2e26e87; IKOIBOI private _boiNFTCONTRACT = IKOIBOI(BOI_ADDRESS); IERC20Metadata private _CAVIARCONTRACT = IERC20Metadata(CAVIAR_ADDRESS); bool private saleOn = false; /** * @dev Token Name. */ function name() external pure returns (string memory) { return "KoiBoiERC20"; } /** * @dev Token Symbol. */ function symbol() external pure returns (string memory) { return "KOIBOIERC20"; } function mint(uint256 amount) external { require(saleOn, "SALE NOT STARTED"); require(amount <= MAX_MINT, "CAN NOT MINT MORE THAN 20 NFTS"); require(_CAVIARCONTRACT.balanceOf(msg.sender) >= amount*BOI_CAVIAR_PRICE, "YOU HAVE LOW CAVIAR BALANCE"); _CAVIARCONTRACT.transferFrom(msg.sender, address(this), amount*BOI_CAVIAR_PRICE); address[] memory to = new address[](amount); for(uint256 i=0; i<amount; i++) { to[i] = msg.sender; } _boiNFTCONTRACT.multi_mint_to_others{value:to.length*BOI_ETH_PRICE}(to); } receive() external payable { } function flipSale() external onlyOwner { saleOn = !saleOn; } function isSaleOn() external view returns(bool) { return saleOn; } function changeCAVIARAddress(address caviarAddress) external onlyOwner { CAVIAR_ADDRESS = caviarAddress; _CAVIARCONTRACT = IERC20Metadata(caviarAddress); } function changeBOIAddress(address boiAddress) external onlyOwner { BOI_ADDRESS = boiAddress; _boiNFTCONTRACT = IKOIBOI(boiAddress); } function claimBOIOwnership(address boiNewOwner) external onlyOwner { _boiNFTCONTRACT.transferOwnership(boiNewOwner); } function withdrawETH() public onlyOwner { payable(msg.sender).transfer(address(this).balance); } function withdrawTokens(address tokenAddress, uint256 amount) external onlyOwner { require(IERC20(tokenAddress).balanceOf(address(this)) >= amount, "NOT ENOUGH TOKEN BALANCE"); IERC20(tokenAddress).transfer(msg.sender, amount); } function withdrawNFTs(address nftAddress, uint256[] calldata ids) external onlyOwner { for(uint256 i=0; i<ids.length; i++) { IERC721(nftAddress).safeTransferFrom(address(this), msg.sender, ids[i]); } } }
0x6080604052600436106101025760003560e01c806395d89b4111610095578063c1eaaf5511610064578063c1eaaf55146102d0578063c2380a4f146102f0578063e086e5ec14610319578063f2fde38b1461032e578063f7f0078c1461034e57600080fd5b806395d89b411461023c578063a0712d6814610270578063a7f2b92414610290578063ade39fc3146102b057600080fd5b8063779e170d116100d1578063779e170d146101ab5780637ba5e621146101d55780638da5cb5b146101ea578063925757cb1461021c57600080fd5b806306b091f91461010e57806306fdde0314610130578063715018a61461017657806376227ddc1461018b57600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5061012e610129366004610cb7565b61036e565b005b34801561013c57600080fd5b5060408051808201909152600b81526a04b6f69426f6945524332360ac1b60208201525b60405161016d9190610d82565b60405180910390f35b34801561018257600080fd5b5061012e6104ed565b34801561019757600080fd5b5061012e6101a6366004610c0f565b610523565b3480156101b757600080fd5b50600454600160a01b900460ff16604051901515815260200161016d565b3480156101e157600080fd5b5061012e610579565b3480156101f657600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200161016d565b34801561022857600080fd5b5061012e610237366004610c0f565b6105c4565b34801561024857600080fd5b5060408051808201909152600b81526a04b4f49424f4945524332360ac1b6020820152610160565b34801561027c57600080fd5b5061012e61028b366004610d03565b61061a565b34801561029c57600080fd5b5061012e6102ab366004610c0f565b61094a565b3480156102bc57600080fd5b50600154610204906001600160a01b031681565b3480156102dc57600080fd5b5061012e6102eb366004610c31565b6109d6565b3480156102fc57600080fd5b5061030b66b1a2bc2ec5000081565b60405190815260200161016d565b34801561032557600080fd5b5061012e610ab6565b34801561033a57600080fd5b5061012e610349366004610c0f565b610b0f565b34801561035a57600080fd5b50600254610204906001600160a01b031681565b6000546001600160a01b031633146103a15760405162461bcd60e51b815260040161039890610dd7565b60405180910390fd5b6040516370a0823160e01b815230600482015281906001600160a01b038416906370a082319060240160206040518083038186803b1580156103e257600080fd5b505afa1580156103f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041a9190610d1c565b10156104685760405162461bcd60e51b815260206004820152601860248201527f4e4f5420454e4f55474820544f4b454e2042414c414e434500000000000000006044820152606401610398565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b1580156104b057600080fd5b505af11580156104c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e89190610ce1565b505050565b6000546001600160a01b031633146105175760405162461bcd60e51b815260040161039890610dd7565b6105216000610ba3565b565b6000546001600160a01b0316331461054d5760405162461bcd60e51b815260040161039890610dd7565b600180546001600160a01b039092166001600160a01b0319928316811790915560038054909216179055565b6000546001600160a01b031633146105a35760405162461bcd60e51b815260040161039890610dd7565b6004805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146105ee5760405162461bcd60e51b815260040161039890610dd7565b600280546001600160a01b039092166001600160a01b0319928316811790915560048054909216179055565b600454600160a01b900460ff166106665760405162461bcd60e51b815260206004820152601060248201526f14d05311481393d50814d5105495115160821b6044820152606401610398565b60148111156106b75760405162461bcd60e51b815260206004820152601e60248201527f43414e204e4f54204d494e54204d4f5245205448414e203230204e46545300006044820152606401610398565b6106c866b1a2bc2ec5000082610e0c565b600480546040516370a0823160e01b815233928101929092526001600160a01b0316906370a082319060240160206040518083038186803b15801561070c57600080fd5b505afa158015610720573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107449190610d1c565b10156107925760405162461bcd60e51b815260206004820152601b60248201527f594f552048415645204c4f57204341564941522042414c414e434500000000006044820152606401610398565b6004546001600160a01b03166323b872dd33306107b666b1a2bc2ec5000086610e0c565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b15801561080557600080fd5b505af1158015610819573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083d9190610ce1565b5060008167ffffffffffffffff81111561085957610859610e72565b604051908082528060200260200182016040528015610882578160200160208202803683370190505b50905060005b828110156108cd57338282815181106108a3576108a3610e5c565b6001600160a01b0390921660209283029190910190910152806108c581610e2b565b915050610888565b5060035481516001600160a01b0390911690635f9fb192906108f79066b1a2bc2ec5000090610e0c565b836040518363ffffffff1660e01b81526004016109149190610d35565b6000604051808303818588803b15801561092d57600080fd5b505af1158015610941573d6000803e3d6000fd5b50505050505050565b6000546001600160a01b031633146109745760405162461bcd60e51b815260040161039890610dd7565b60035460405163f2fde38b60e01b81526001600160a01b0383811660048301529091169063f2fde38b90602401600060405180830381600087803b1580156109bb57600080fd5b505af11580156109cf573d6000803e3d6000fd5b5050505050565b6000546001600160a01b03163314610a005760405162461bcd60e51b815260040161039890610dd7565b60005b81811015610ab057836001600160a01b03166342842e0e3033868686818110610a2e57610a2e610e5c565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610a8557600080fd5b505af1158015610a99573d6000803e3d6000fd5b505050508080610aa890610e2b565b915050610a03565b50505050565b6000546001600160a01b03163314610ae05760405162461bcd60e51b815260040161039890610dd7565b60405133904780156108fc02916000818181858888f19350505050158015610b0c573d6000803e3d6000fd5b50565b6000546001600160a01b03163314610b395760405162461bcd60e51b815260040161039890610dd7565b6001600160a01b038116610b9e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610398565b610b0c815b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610c0a57600080fd5b919050565b600060208284031215610c2157600080fd5b610c2a82610bf3565b9392505050565b600080600060408486031215610c4657600080fd5b610c4f84610bf3565b9250602084013567ffffffffffffffff80821115610c6c57600080fd5b818601915086601f830112610c8057600080fd5b813581811115610c8f57600080fd5b8760208260051b8501011115610ca457600080fd5b6020830194508093505050509250925092565b60008060408385031215610cca57600080fd5b610cd383610bf3565b946020939093013593505050565b600060208284031215610cf357600080fd5b81518015158114610c2a57600080fd5b600060208284031215610d1557600080fd5b5035919050565b600060208284031215610d2e57600080fd5b5051919050565b6020808252825182820181905260009190848201906040850190845b81811015610d765783516001600160a01b031683529284019291840191600101610d51565b50909695505050505050565b600060208083528351808285015260005b81811015610daf57858101830151858201604001528201610d93565b81811115610dc1576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000816000190483118215151615610e2657610e26610e46565b500290565b6000600019821415610e3f57610e3f610e46565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122090ff128629bebabe1987f7c0b71f866428e3e805538295e0c176723c5ea8127164736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
9,798
0x6bc8b04d3904967989b0f2bc91b32494f36f82c2
pragma solidity ^0.4.18; /** * @title Global Mobile Industry Service Ecosystem Chain * @dev Developed By Jack 5/13 2018 * @dev contact:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="553f34363e3a3039236765646d153238343c397b363a38">[email&#160;protected]</a> */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function Ownable() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function isOwner() internal view returns(bool success) { if (msg.sender == owner) return true; return false; } function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * @dev Implementation of the basic standard token. */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract msc is Ownable, StandardToken { using SafeMath for uint256; uint8 public constant TOKEN_DECIMALS = 18; // decimals // Public variables of the token string public name = "Global Mobile Industry Service Ecosystem"; string public symbol = "MSC"; uint8 public decimals = TOKEN_DECIMALS; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply = 500000000 *(10**uint256(TOKEN_DECIMALS)); uint256 public soldSupply = 0; uint256 public sellSupply = 0; uint256 public buySupply = 0; bool public stopSell = true; bool public stopBuy = true; uint256 public crowdsaleStartTime = block.timestamp; uint256 public crowdsaleEndTime = block.timestamp; uint256 public crowdsaleTotal = 0; uint256 public buyExchangeRate = 10000; uint256 public sellExchangeRate = 60000; address public ethFundDeposit; bool public allowTransfers = true; mapping (address => bool) public frozenAccount; bool public enableInternalLock = true; mapping (address => bool) public internalLockAccount; mapping (address => uint256) public releaseLockAccount; event FrozenFunds(address target, bool frozen); event IncreaseSoldSaleSupply(uint256 _value); event DecreaseSoldSaleSupply(uint256 _value); function msc() public { balances[msg.sender] = totalSupply; ethFundDeposit = msg.sender; allowTransfers = false; } function _isUserInternalLock() internal view returns (bool) { return getAccountLockState(msg.sender); } function increaseSoldSaleSupply (uint256 _value) onlyOwner public { require (_value + soldSupply < totalSupply); soldSupply = soldSupply.add(_value); IncreaseSoldSaleSupply(_value); } function decreaseSoldSaleSupply (uint256 _value) onlyOwner public { require (soldSupply - _value > 0); soldSupply = soldSupply.sub(_value); DecreaseSoldSaleSupply(_value); } function mintToken(address target, uint256 mintedAmount) onlyOwner public { balances[target] = balances[target].add(mintedAmount); totalSupply = totalSupply.add(mintedAmount); Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); } function destroyToken(address target, uint256 amount) onlyOwner public { balances[target] = balances[target].sub(amount); totalSupply = totalSupply.sub(amount); Transfer(target, this, amount); Transfer(this, 0, amount); } function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } function setEthFundDeposit(address _ethFundDeposit) onlyOwner public { require(_ethFundDeposit != address(0)); ethFundDeposit = _ethFundDeposit; } function transferETH() onlyOwner public { require(ethFundDeposit != address(0)); require(this.balance != 0); require(ethFundDeposit.send(this.balance)); } function setExchangeRate(uint256 _sellExchangeRate, uint256 _buyExchangeRate) onlyOwner public { sellExchangeRate = _sellExchangeRate; buyExchangeRate = _buyExchangeRate; } function setExchangeStatus(bool _stopSell, bool _stopBuy) onlyOwner public { stopSell = _stopSell; stopBuy = _stopBuy; } function setAllowTransfers(bool _allowTransfers) onlyOwner public { allowTransfers = _allowTransfers; } function transferFromAdmin(address _from, address _to, uint256 _value) onlyOwner public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(_from, _to, _value); return true; } function setEnableInternalLock(bool _isEnable) onlyOwner public { enableInternalLock = _isEnable; } function lockInternalAccount(address _target, bool _lock, uint256 _releaseTime) onlyOwner public { require(_target != address(0)); internalLockAccount[_target] = _lock; releaseLockAccount[_target] = _releaseTime; } function getAccountUnlockTime(address _target) public view returns(uint256) { return releaseLockAccount[_target]; } function getAccountLockState(address _target) public view returns(bool) { if(enableInternalLock && internalLockAccount[_target]){ if((releaseLockAccount[_target] > 0)&&(releaseLockAccount[_target]<block.timestamp)){ return false; } return true; } return false; } function internalSellTokenFromAdmin(address _to, uint256 _value, bool _lock, uint256 _releaseTime) onlyOwner public returns (bool) { require(_to != address(0)); require(_value <= balances[owner]); balances[owner] = balances[owner].sub(_value); balances[_to] = balances[_to].add(_value); soldSupply = soldSupply.add(_value); sellSupply = sellSupply.add(_value); Transfer(owner, _to, _value); lockInternalAccount(_to, _lock, _releaseTime); return true; } /***************************************************/ /* BASE Functions */ /***************************************************/ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { if (!isOwner()) { require (allowTransfers); require(!frozenAccount[_from]); require(!frozenAccount[_to]); require(!_isUserInternalLock()); } return super.transferFrom(_from, _to, _value); } function transfer(address _to, uint256 _value) public returns (bool) { if (!isOwner()) { require (allowTransfers); require(!frozenAccount[msg.sender]); require(!frozenAccount[_to]); require(!_isUserInternalLock()); } return super.transfer(_to, _value); } function () internal payable{ uint256 currentTime = block.timestamp; require((currentTime>crowdsaleStartTime)&&(currentTime<crowdsaleEndTime)); require(crowdsaleTotal>0); require(buy()); crowdsaleTotal = crowdsaleTotal.sub(msg.value.mul(buyExchangeRate)); } function buy() payable public returns (bool){ uint256 amount = msg.value.mul(buyExchangeRate); require(!stopBuy); require(amount <= balances[owner]); balances[owner] = balances[owner].sub(amount); balances[msg.sender] = balances[msg.sender].add(amount); soldSupply = soldSupply.add(amount); buySupply = buySupply.add(amount); Transfer(owner, msg.sender, amount); return true; } function sell(uint256 amount) public { uint256 ethAmount = amount.div(sellExchangeRate); require(!stopSell); require(this.balance >= ethAmount); require(ethAmount >= 1); require(balances[msg.sender] >= amount); require(balances[owner] + amount > balances[owner]); require(!frozenAccount[msg.sender]); require(!_isUserInternalLock()); balances[owner] = balances[owner].add(amount); balances[msg.sender] = balances[msg.sender].sub(amount); soldSupply = soldSupply.sub(amount); sellSupply = sellSupply.add(amount); Transfer(msg.sender, owner, amount); msg.sender.transfer(ethAmount); } function setCrowdsaleStartTime(uint256 _crowdsaleStartTime) onlyOwner public { crowdsaleStartTime = _crowdsaleStartTime; } function setCrowdsaleEndTime(uint256 _crowdsaleEndTime) onlyOwner public { crowdsaleEndTime = _crowdsaleEndTime; } function setCrowdsaleTotal(uint256 _crowdsaleTotal) onlyOwner public { crowdsaleTotal = _crowdsaleTotal; } }
0x606060405260043610610266576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168062ebc96e146102de57806306fdde0314610301578063095ea7b31461038f5780630967cff0146103e95780630d2717201461040c578063149f2fdb1461048557806318160ddd146104ae5780631d545d09146104d75780631d8c7c20146105005780632185810b1461056e57806323b872dd1461059b578063308f505b14610614578063313ce5671461063d578063417998831461066c578063493a72091461068f5780634b0e2c90146106bc5780635a4071fe146106e95780635b7f415c1461073657806361aebe5914610765578063661884631461079257806370a08231146107ec57806379c650681461083957806388f7c6d61461087b5780638da5cb5b146108ab5780639061a6e91461090057806395d89b41146109235780639b1ad792146109b15780639bcf7352146109f35780639dec365e14610a18578063a4b03f5214610a3b578063a6f2ae3a14610a8c578063a81c3bdf14610aae578063a9059cbb14610b03578063aff1e0de14610b5d578063b414d4b614610b86578063b51dfa9d14610bd7578063c92015f614610c00578063d622634714610c4d578063d73dd62314610c9a578063d86f8ccd14610cf4578063d903744114610d45578063db1366bf14610d7e578063dd62ed3e14610da7578063df50afa414610e13578063e28d717b14610e38578063e2fc421d14610e4d578063e4849b3214610e76578063e724529c14610e99578063f2fde38b14610edd578063f55ecf0614610f16578063fa2299ee14610f42575b6000429050600c548111801561027d5750600d5481105b151561028857600080fd5b6000600e5411151561029957600080fd5b6102a1610f6b565b15156102ac57600080fd5b6102d56102c4600f543461124090919063ffffffff16565b600e5461127b90919063ffffffff16565b600e8190555050005b34156102e957600080fd5b6102ff6004808035906020019091905050611294565b005b341561030c57600080fd5b6103146112f9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610354578082015181840152602081019050610339565b50505050905090810190601f1680156103815780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561039a57600080fd5b6103cf600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611397565b604051808215151515815260200191505060405180910390f35b34156103f457600080fd5b61040a6004808035906020019091905050611489565b005b341561041757600080fd5b61046b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506114ee565b604051808215151515815260200191505060405180910390f35b341561049057600080fd5b61049861176f565b6040518082815260200191505060405180910390f35b34156104b957600080fd5b6104c1611775565b6040518082815260200191505060405180910390f35b34156104e257600080fd5b6104ea61177b565b6040518082815260200191505060405180910390f35b341561050b57600080fd5b610554600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919080351515906020019091908035906020019091905050611781565b604051808215151515815260200191505060405180910390f35b341561057957600080fd5b610581611ac8565b604051808215151515815260200191505060405180910390f35b34156105a657600080fd5b6105fa600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611adb565b604051808215151515815260200191505060405180910390f35b341561061f57600080fd5b610627611be1565b6040518082815260200191505060405180910390f35b341561064857600080fd5b610650611be7565b604051808260ff1660ff16815260200191505060405180910390f35b341561067757600080fd5b61068d6004808035906020019091905050611bfa565b005b341561069a57600080fd5b6106a2611cbd565b604051808215151515815260200191505060405180910390f35b34156106c757600080fd5b6106cf611cd0565b604051808215151515815260200191505060405180910390f35b34156106f457600080fd5b610734600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091908035906020019091905050611ce3565b005b341561074157600080fd5b610749611e1a565b604051808260ff1660ff16815260200191505060405180910390f35b341561077057600080fd5b610778611e1f565b604051808215151515815260200191505060405180910390f35b341561079d57600080fd5b6107d2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611e32565b604051808215151515815260200191505060405180910390f35b34156107f757600080fd5b610823600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506120c3565b6040518082815260200191505060405180910390f35b341561084457600080fd5b610879600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061210c565b005b341561088657600080fd5b6108a96004808035151590602001909190803515159060200190919050506122d0565b005b34156108b657600080fd5b6108be612363565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561090b57600080fd5b6109216004808035906020019091905050612388565b005b341561092e57600080fd5b61093661244c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561097657808201518184015260208101905061095b565b50505050905090810190601f1680156109a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156109bc57600080fd5b6109f1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506124ea565b005b34156109fe57600080fd5b610a16600480803515159060200190919050506126ae565b005b3415610a2357600080fd5b610a396004808035906020019091905050612726565b005b3415610a4657600080fd5b610a72600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061278b565b604051808215151515815260200191505060405180910390f35b610a94610f6b565b604051808215151515815260200191505060405180910390f35b3415610ab957600080fd5b610ac16127ab565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610b0e57600080fd5b610b43600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506127d1565b604051808215151515815260200191505060405180910390f35b3415610b6857600080fd5b610b706128d5565b6040518082815260200191505060405180910390f35b3415610b9157600080fd5b610bbd600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506128db565b604051808215151515815260200191505060405180910390f35b3415610be257600080fd5b610bea6128fb565b6040518082815260200191505060405180910390f35b3415610c0b57600080fd5b610c37600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612901565b6040518082815260200191505060405180910390f35b3415610c5857600080fd5b610c84600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061294a565b6040518082815260200191505060405180910390f35b3415610ca557600080fd5b610cda600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050612962565b604051808215151515815260200191505060405180910390f35b3415610cff57600080fd5b610d2b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612b5e565b604051808215151515815260200191505060405180910390f35b3415610d5057600080fd5b610d7c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612c78565b005b3415610d8957600080fd5b610d91612d53565b6040518082815260200191505060405180910390f35b3415610db257600080fd5b610dfd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612d59565b6040518082815260200191505060405180910390f35b3415610e1e57600080fd5b610e3660048080351515906020019091905050612de0565b005b3415610e4357600080fd5b610e4b612e58565b005b3415610e5857600080fd5b610e60612fb3565b6040518082815260200191505060405180910390f35b3415610e8157600080fd5b610e976004808035906020019091905050612fb9565b005b3415610ea457600080fd5b610edb600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035151590602001909190505061341b565b005b3415610ee857600080fd5b610f14600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613540565b005b3415610f2157600080fd5b610f406004808035906020019091908035906020019091905050613695565b005b3415610f4d57600080fd5b610f55613702565b6040518082815260200191505060405180910390f35b600080610f83600f543461124090919063ffffffff16565b9050600b60019054906101000a900460ff16151515610fa157600080fd5b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561101057600080fd5b61108381600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061113981600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111918160085461370890919063ffffffff16565b6008819055506111ac81600a5461370890919063ffffffff16565b600a819055503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600191505090565b60008060008414156112555760009150611274565b828402905082848281151561126657fe5b0414151561127057fe5b8091505b5092915050565b600082821115151561128957fe5b818303905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112ef57600080fd5b80600d8190555050565b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561138f5780601f106113645761010080835404028352916020019161138f565b820191906000526020600020905b81548152906001019060200180831161137257829003601f168201915b505050505081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e457600080fd5b80600c8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561154b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561158757600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156115d557600080fd5b61162782600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116bc82600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60105481565b60075481565b600d5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117de57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415151561181a57600080fd5b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054841115151561188957600080fd5b6118fc84600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119b284600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a0a8460085461370890919063ffffffff16565b600881905550611a258460095461370890919063ffffffff16565b6009819055508473ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3611abc858484611ce3565b60019050949350505050565b601160149054906101000a900460ff1681565b6000611ae5613726565b1515611bcd57601160149054906101000a900460ff161515611b0657600080fd5b601260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611b5f57600080fd5b601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611bb857600080fd5b611bc061378e565b151515611bcc57600080fd5b5b611bd884848461379e565b90509392505050565b60095481565b600660009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c5557600080fd5b60008160085403111515611c6857600080fd5b611c7d8160085461127b90919063ffffffff16565b6008819055507ff708844f569f2a630c36e2c8c1422c319aa04d0ef131636d78737df669e89b2f816040518082815260200191505060405180910390a150565b600b60019054906101000a900460ff1681565b601360009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d3e57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611d7a57600080fd5b81601460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b601281565b600b60009054906101000a900460ff1681565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115611f43576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fd7565b611f56838261127b90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561216757600080fd5b6121b981600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122118160075461370890919063ffffffff16565b6007819055503073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561232b57600080fd5b81600b60006101000a81548160ff02191690831515021790555080600b60016101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156123e357600080fd5b60075460085482011015156123f757600080fd5b61240c8160085461370890919063ffffffff16565b6008819055507f03e0d50af85e41e334dc3f5787a0c79260b3d45a70927162c106c45ebf9da649816040518082815260200191505060405180910390a150565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124e25780601f106124b7576101008083540402835291602001916124e2565b820191906000526020600020905b8154815290600101906020018083116124c557829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561254557600080fd5b61259781600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125ef8160075461127b90919063ffffffff16565b6007819055503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a360003073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561270957600080fd5b80601360006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561278157600080fd5b80600e8190555050565b60146020528060005260406000206000915054906101000a900460ff1681565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006127db613726565b15156128c357601160149054906101000a900460ff1615156127fc57600080fd5b601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561285557600080fd5b601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156128ae57600080fd5b6128b661378e565b1515156128c257600080fd5b5b6128cd8383613b5d565b905092915050565b600e5481565b60126020528060005260406000206000915054906101000a900460ff1681565b600a5481565b6000601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60156020528060005260406000206000915090505481565b60006129f382600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000601360009054906101000a900460ff168015612bc55750601460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612c6e576000601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015612c57575042601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054105b15612c655760009050612c73565b60019050612c73565b600090505b919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612cd357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612d0f57600080fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600f5481565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612e3b57600080fd5b80601160146101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612eb357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515612f1157600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff163114151515612f3857600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515612fb157600080fd5b565b600c5481565b6000612fd060105483613d8190919063ffffffff16565b9050600b60009054906101000a900460ff16151515612fee57600080fd5b803073ffffffffffffffffffffffffffffffffffffffff16311015151561301457600080fd5b6001811015151561302457600080fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561307257600080fd5b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111151561314257600080fd5b601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561319b57600080fd5b6131a361378e565b1515156131af57600080fd5b61322282600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506132d882600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506133308260085461127b90919063ffffffff16565b60088190555061334b8260095461370890919063ffffffff16565b6009819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561341757600080fd5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561347657600080fd5b80601260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561359b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156135d757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156136f057600080fd5b8160108190555080600f819055505050565b60085481565b600080828401905083811015151561371c57fe5b8091505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415613786576001905061378b565b600090505b90565b600061379933612b5e565b905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156137db57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561382957600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156138b457600080fd5b61390682600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061399b82600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613a6d82600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515613b9a57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515613be857600080fd5b613c3a82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461127b90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613ccf82600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461370890919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000808284811515613d8f57fe5b04905080915050929150505600a165627a7a7230582041f57f88db21fa01f55b3e6e4cc6905df19bf4a207d4cef4b4a08a419dfda1840029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
9,799